Saturday, December 18, 2010

Data Protocol: High Level First Swag

There are some hardware conditions that dictate some basic requirements of how the device will communicate with each other. Almost all are tied to the requirement that each controller devices (Arduinos) may be running from battery, and, the desire for low power consumption, even when the devices are powered by the ship's electrical system. The short and skinny is we want to keep the size of the transmitted data as small as possible for the following reasons
  • smaller data means less airtime on the wireless
  • less airtime means less power consumption
  • less airtime means reduced competition for airtime as more devices are added
There are some characteristics that work with and against this basic requirement. Specifically
  • CON: the smaller the data, the less rich it can be. This can be limiting when future devices and features are added
  • PRO: the smaller the data, the faster it can be processed by the devices. The computing power provided the chips on the Arduino devices are limited. As these devices will be controlling physical devices in real time, the less time they need to spend processing data, the more time they have to manage their physical devices. 
With that, I am starting out with something simple that will serve the needs known in the short term. The trick is to engineer it such that it can be expanded, with least effort, as the system evolves.

Length - overall size of the packet. Limited to 255 bytes at this time.
Header - contains unique identifier for the packet, whether it is a call or response, addressing information for the target device (or all devices) and type information that indicates what details follow in the next section.
Detail - specific data that supports the call/response indicated in the header.


No comments:

Post a Comment