I finally got around to doing more work on PAC, mostly through the downtime from helping out others at a Python study group at a local hackerspace (of which I'll go more into detail in a later post). My original whiteboard drawing has been kind enough to act as a guiding force, albeit not the actual outline for the full implementation.
The message order will now follow this series:
- Alert the MCU and confirm that it is there over a send/receive handshake.
- Send an identifier byte.
- Notify the MCU of the amount of incoming data.
- Send aforementioned data.
- This is where it differs from the whiteboard photo, and my original intent: Wait for a confirmation byte / second handshake from the MCU that data has been received.
- Receive a byte telling the PC how much data is being returned.
- Receive said data.
- Send confirmation byte.
- Process the data appropriately. Return it.
Functions for each message object is being broken down more then I expected, but this is not problematic.
A user will create the Message object for their particular object. Each message object has a very basic process( ) function, which will do nothing more than return what it receives by default. A user-created extension of the Message class shall have a more complicated, fine-tuned process( ) function for their application.
More information shall come as I work on it...
No comments:
Post a Comment