.NET DLL for Finding NetBurners on the LAN
Posted: Tue Jun 12, 2012 5:09 pm
I tend to write a lot of C# .NET GUIs for the instruments we make. Usually there is a place for the user to enter the IP address of the instrument. I finally decided it would be more convenient to just find the device automatically much the way AutoUpdate and IPSetup do. Since NetBurner provides the source code for those apps and a tech note on the process, it wasn't too tough. However, there are some nitty-gritty details like dealing with big endian/little endian and making sure the UDP listener was configured to use the same port for both send and receive. Also parsing out byte streams tends to be a dark unexplored corner of C# but there's lots of support, and multiple ways to achieve the goal.
Since anyone else writing .NET apps to control a NetBurner based device might find this useful I'm uploading the .dll itself, along with the source code and a couple of sample applications showing how to use it to a Mercurial repository on BitBucket. One app is a very simple console app and the other is a more complicated WPF app.
The Mercurial (aka Hg) project has a wiki page with a little more information. Right now the code only reads the config record, it doesn't write it. Feel free to pull the code and make changes and push them back. I moved this from GitHub to BitBucketsince that is now the hosting service I use for all my Hg code. BitBucket is much more affordable (free) for lone (up to 5) developers that have a lot of projects. All of my private projects are moving from svn to the much nicer Hg distributed code control system. Plus BitBucket makes it simple to have both private and public repos.
For those already familar with hg the full clone syntax is:
hg clone https://bitbucket.org/tgentille/syncor-netburnerfinder
if you use ssh (much nicer once you set up your private/public key) the syntax is
hg clone ssh://hg@bitbucket.org/tgentille/syncor-netburnerfinder
Addendum
For those that aren't interested in the source code and building it themselves The .dll and a read me with hopefully enough info to get going are attached.
Since anyone else writing .NET apps to control a NetBurner based device might find this useful I'm uploading the .dll itself, along with the source code and a couple of sample applications showing how to use it to a Mercurial repository on BitBucket. One app is a very simple console app and the other is a more complicated WPF app.
The Mercurial (aka Hg) project has a wiki page with a little more information. Right now the code only reads the config record, it doesn't write it. Feel free to pull the code and make changes and push them back. I moved this from GitHub to BitBucketsince that is now the hosting service I use for all my Hg code. BitBucket is much more affordable (free) for lone (up to 5) developers that have a lot of projects. All of my private projects are moving from svn to the much nicer Hg distributed code control system. Plus BitBucket makes it simple to have both private and public repos.
For those already familar with hg the full clone syntax is:
hg clone https://bitbucket.org/tgentille/syncor-netburnerfinder
if you use ssh (much nicer once you set up your private/public key) the syntax is
hg clone ssh://hg@bitbucket.org/tgentille/syncor-netburnerfinder
Addendum
For those that aren't interested in the source code and building it themselves The .dll and a read me with hopefully enough info to get going are attached.