This covers the PC side communications. Comments and suggestions are welcome. I'll get going on the hardware side once the console side is firmed up. I'll get my project in source control next. Brian is the consumer, correct?

1) The PC will communicate with the hardware via RS-232 over USB.
2) The PC will have an object called ‘RainbowComm’ to use to communicate with the hardware.
3) RainbowComm will have two methods of use to the client.
· The constructor: RainbowComm::RainbowComm(). This object will determine the serial port to be used for communication.
· Int RainbowComm::SendMessage(string szCommand, out string szResponse). The return code will be either:
o Success
o Port Not Available
o Hardware Not Responding
4) RainbowComm will use the ‘pipe’ character ‘|’ in its transmission. Client may not embed this character in its command.
5) Transmissions will end with the ‘newline’ and ‘carriage return’ characters. These characters may not be used by the client.
6) The ‘command’ and ‘response’ strings have the following structure:
· Device|Port|Information
‘Device’ is one alphabetic character followed by up to two numeric characters.
‘Port’ is one numeric character.
‘Information’ is a string of alphanumeric characters no longer than 120 characters.
Device, Port and Information are separated by the pipe character.
7) A ‘transmission’ will have the following structure:
· STX|Packet|\r\n
8) When a transmission is received from the hardware (called an ‘event’), either RainbowComm will call a callback function provided by the client or it will deposit the transmission in a file at a location known to both the client and RainbowComm.

Last edited Dec 31, 2010 at 9:08 PM by aarono, version 1

Comments

No comments yet.