Network - Robot DHQ

Go to content

Network

Design > Node-to-node Comm
Network

The robot components (nodes) need to communicate and the details of the communications network will appear here.

1. Logic components are called nodes.

2. Routing nodes have to Node type prefix of "R".

3. Nodes that perform communication routing functions have a common behavior. The idea here is to isolate routing from other functions so that all operations can be encapsulated as much as possible.

4. Example command received by a routing node: "R11S1999" meaning if this node's activation code is "R1" then save the characters that follow "R11" and transmit them on serial communication interface number 1. If the command started with "R12" the message would be retransmitted on serial communication interface number 2, etc. The router needs to remember which interface received the command in order to pass the response back to the correct sender.

5. Router nodes must handle a number of contingencies.

6. Contingency #1. Commands can fail silently. If a response is not received within a certain number of microseconds certain actions are taken. The number of microseconds, i.e. the wait time, can be read and set remotely. The actions include clearing the busy flag and clearing all memory of the failed message except for summary information for post mortem analysis. One effect of this is the received command also fails silently.

7. Contingency #2. Multiple commands can be received at the same time or nearly the same time. If this happens certain actions are taken. A busy flag indicates that a command is in the midst of being relayed. The router node can be configured to process, buffer or ignore incoming commands while the busy flag is set.  The configuration setting can be read and set remotely. If unable to process or buffer the additional incoming command, it may be ignored resullting in a silent fail. A silent fail means all memory of the failed received command is cleared except for summary information for post mortem analysis. The Arduino Nano has 14 digital IO pins meaning that it could possibly have 7 serial IO interfaces making these considerations necessary.

8. If the command prefix does not match the node's activation code certain actions are taken. Firstly, the characters received subsequently are ignored up to the next CR or LF. This amounts to a silent fail. The actions also include clearing the busy flag and clearing all memory of the failed message except for summary information for post mortem analysis.

9. If the serial interface number specified in the received command is not implemented in the routing node certain actions are taken. First of all, the characters received subsequently are ignored up to the next CR or LF. This is a silent fail. The actions also include clearing the busy flag and clearing all memory of the failed message except for summary information for post mortem analysis.

Additions and suggestions are invited using the forms on this website.
Back to content