.Net <-> BS2
After struggling for some time with RDS, I decided I'd just write my own program. The result is a .Net user control called BoESerialPort that can be plopped down on any form and just works. Not sure if anyone would want such a thing, but if there is interest I will compile it and drop it on this thread as an attachment.
Features thus far:
Properties - Baud / Data Bits / Port
Can set a start/stop character for messages (like a ~ or !)
Raises an event called MessageReceived whenever there is a complete message in the queue waiting
Has a BuildMessage and SendMessage functions that allow for posting messages to the BoE
Built in SerialPort object, so there is no need for any other serial work.
One can literally just drop it on a form, set a couple of properties in the designer, run the app and send it an "Open" command, and it works.
Let me know if anyone is interested, and I'll share.
Features thus far:
Properties - Baud / Data Bits / Port
Can set a start/stop character for messages (like a ~ or !)
Raises an event called MessageReceived whenever there is a complete message in the queue waiting
Has a BuildMessage and SendMessage functions that allow for posting messages to the BoE
Built in SerialPort object, so there is no need for any other serial work.
One can literally just drop it on a form, set a couple of properties in the designer, run the app and send it an "Open" command, and it works.
Let me know if anyone is interested, and I'll share.
Comments
Gregory
Even still, you need to program the 'bot to receive and handle those messages. At that point, I feel you might as well do it yourself. All I did was create a custom user control that has an embedded serialport object, and then put in a few functions to deal with building the messages how I want them (they start with a 255 and end with a 0) and also receive messages (starting and ending with a ~) and then raising an even when a full message is received. (That gets rid of a lot of the threading issues you can run into with serial communications on a PC).
The rest was putting the code on the BoE to deal with receiving and sending the messages (of which I have 3 right now). It was pretty straight forward, and I know some people had tried to do it, so I thought I'd share.
The ONLY issue I have right now, is that I am using Express Edition of C# so I cannot compile the stupid control to a .dll or .ocx. I'll probably just "find" a copy of enterprise edition and use that.