Interface Module
The interface module actually features two distinct interfaces: a Keyboard and a Generic HID Device.
When a keyboard message is received over the CAN bus, it is translated into a keystroke, mimicking the behavior of a regular keyboard. All other messages are encapsulated within a 15-byte report of the generic Human Interface Device (HID). This report can be easily parsed by any program capable of reading HID reports.
In order to send a message over the CAN bus, a 15-byte report has to be sent from the PC host.
Byte | Description |
---|---|
0 | Report ID (normally 1, 2 for keyboard) |
1 | CAN-ID high byte |
2 | CAN-ID low byte |
3 | CAN data byte 0 |
4 | CAN data byte 1 |
5 | CAN data byte 2 |
6 | CAN data byte 3 |
7 | CAN data byte 4 |
8 | CAN data byte 5 |
9 | CAN data byte 6 |
10 | CAN data byte 7 |
11 | CAN timestamp upper byte |
12 | CAN timestamp high byte |
13 | CAN timestamp middle byte |
14 | CAN timestamp low byte |
In addition to its message transmission and reception capabilities, the interface module also generates and transmits a reference message at regular intervals over the CAN bus. These reference messages can be utilized when employing the time-triggered bus scheduling feature of CanAerospace. The reference message can be switched on and off via the USB interface.
The message format adheres to the Node Synchronisation Service (NSS) as outlined in the Canaerospace specification:
Data Bytes | Description | Values |
---|---|---|
0 | Node ID | 0 |
1 | Data Type | 4 |
2 | Service Code | 1 |
3 | Message Code | 0 |
4-7 | Message Data | <timestamp> |
The reference messages are transmitted at a time interval of 12.5 ms by defaut. This value can be modified using a HID feature report sent from the PC host.