binary icon indicating copy to clipboard operation
binary copied to clipboard

Binary utilities

Open WhittlesJr opened this issue 6 years ago • 4 comments

Hi! So I recently (finally) (sort of) finished my BACnet implementation. I ended up with a bunch of generic utility functions. I'd much prefer to contribute to an existing project, rather than spin off a new one, so I thought I'd ask if you'd want to merge any or all of the following as a separate util namespace?

https://gist.github.com/WhittlesJr/dd94e7e4d9e21460b4dd9cd31b9fcaa1

The "util.core" namespace has more generic functions. I'm thinking of making a separate library for my map-matching functions, but I included them in the gist so you could see what they are.

I included the npdu example so you can get a sense for my use case, but it's just a small part of the BACnet protocol.

WhittlesJr avatar Nov 19 '18 18:11 WhittlesJr

I will have a look as soon as I can find the time. Thanks for suggesting these.

smee avatar Nov 22 '18 13:11 smee

After discovering graph and specter, I was able to drastically cut down the amount of helper functions.

Here's what my binary utility NS has been reduced to:

https://gist.github.com/WhittlesJr/b5bdc6880d7639ec795a1e293af70a34

WhittlesJr avatar Nov 27 '18 22:11 WhittlesJr

The complex-bytes-related stuff could be removed also if we could come up with a codec for bit.

WhittlesJr avatar Nov 27 '18 22:11 WhittlesJr

Any thought on these helper functions? I've come to the point that I have had to split them off from my BACnet repository into a separate library to share between several projects of mine. I'm sure many of them are not as generic as I think they are but possibly a few of them would be helpful generally.

WhittlesJr avatar Mar 19 '19 14:03 WhittlesJr