Blackboard communication protocol
Direction --->> means a transmission from the client to a server. Direction <<--- means messages which are sent from the server to a client. The messages are:
Command | Direction | Description |
---|---|---|
c | --->> | Create component message |
d | <<--- | Create reply |
s | --->> | Subscribe message |
z | --->> | Unsubscribe message |
p | --->> | Push data message |
u | <<--- | Update client message |
r | --->> | Request data message |
l | --->> | List components message |
m | <<--- | Component list message |
a | <<--- | ACK / Error message |
x | --->> | Delete component message |
k | --->> | Command message |
Create component message - C
1 |
4 |
4 |
4 |
n |
CMD |
TYPE ID |
USER ID |
USER NAME LENGTH |
USER NAME |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
USER NAME LENGTH - length of the user name field
USER NAME - the user name of the user
Create response - d
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
Subscribe message - s
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
Unsubscribe message - z
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
Push data - p
1 |
4 |
4 |
n |
CMD |
COMPONENT ID |
DATA LENGTH |
DATA |
-
CMD - command byte
COMPONENT ID - the intended receiver of this data inside the blackboard. Set to 0xFFFFFFFF to send to all subscribers, and to 0 to send to any one subscriber.
DATA LENGTH - length of the data field
DATA - data to be pushed to the blackboard
Update client message - u
1 |
4 |
4 |
4 |
4 |
n |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
DATA LENGTH |
DATA |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
DATA LENGTH - length of the data field
DATA - data message
Request data message - r
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
List components message - l
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
Component list message - m
1 |
4 |
CMD |
NUMBER OF COMPONENTS |
-
CMD - command byte
NUMBER OF COMPONENTS - the number of components in the message
The following sequense is repeated NUMBER OF COMPONENTS times in the message:
4 |
4 |
4 |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
ACK / Error message - a
1 |
1 |
1 |
4 |
n |
CMD |
ACK MESSAGE COMMAND |
STATUS |
MESSAGE LENGTH |
MESSAGE |
-
CMD - command byte
ACK MESSAGE COMMAND - command byte of the message being acknowledged
STATUS - status byte (error / ok / fail / etc)
MESSAGE LENGTH - length of the message field
MESSAGE - message (if any) associated with the ack / error
Delete component - x
1 |
4 |
4 |
4 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
-
CMD - command byte
TYPE ID - the type of the component
USER ID - the id number associated with the user name
COMPONENT ID - identification number assigned to the component
Command message - k
1 |
4 |
4 |
4 |
4 |
1 |
1 |
CMD |
TYPE ID |
USER ID |
COMPONENT ID |
SENDER CID |
SIGNAL |
NUMBER OF PARAMETERS |
-
CMD - command byte. Always k for this message.
TYPE ID - the type of the target component(s).
USER ID - the id number associated with the user name sending the message.
COMPONENT ID - identification number assigned to the target component(s).
SENDER CID - identification number assigned to the sender component.
SIGNAL - the signal or command sent to the component.
q
quits a component,r
restarts,m
sets a component to manual read mode and requests a single data read (if possible),s
sets the component to streaming mode. Upon reception of a m message to a component that does not support single data read, an AckOrError message with code 2 and message "Single data read unsupported" should be returned.p
pauses the streaming, if sent to a paused component restarts it.d
deletes data items. The parameter in this case must be a data field name used in the component, such as"XAcc Byte"
or"Signal Strength"
. For identified fields, the current data values should be removed from the Blackboard.g
gets data of a component. The reply to it should be a returnData message, targeted to the component identified by SENDERCID. If any parameters are given, they must be valid data field names, such as in the case of deleting data items.t
allows setting the read frequency for a component. The parameter in this case is a string representation of the frequency, such as"1200"
(parameter length would be 4 in this example). The command message will be acknowledged with an ack message describing the status of the operation.x
signifies a component-specific signal. In this case, the parameters are interpreted by the component, and it will act accordingly. The command message will be acknowledged with an ack message describing the status of the operation.NUMBER OF PARAMETERS - Number of parameters to the SIGNAL. Depends on the SIGNAL used.
The following sequense is repeated NUMBER OF PARAMETERS times in the message:
1 |
n |
PARAMETER LENGTH |
PARAMETER DATA |
-
PARAMETER LENGTH - length of parameter data.
PARAMETER DATA - the data of the parameter.