Line 14: |
Line 14: |
| | | |
| == Gesture Specification == | | == Gesture Specification == |
− | The following is STINGR Gesture Specification II, which replaces the theoretical, but never implemented, [[STINGR Gesture Specification I]]. | + | The following is STINGR Gesture Specification II, which replaces the theoretical, but never implemented, [[STINGR Gesture Specification I]].<br/> |
− | As mentioned above, a Gesture consists of a series of frames, each with a specific purpose. Each Gesture is transmitted on the CAN Bus, and allows all boards to determine if a Gesture is targeted towards them, and act appropriately. This section defines the specification of a Gesture, including a description of each of the frames. | + | As mentioned above, a Gesture consists of a series of CAN Packets -- these packets specify the source and destination of a gesture, some auxiliary data, and the primary data payload. STINGR manages CAN Packets, which are obfuscated from the end-user. |
| | | |
− | More explicitly, a Gesture looks as so, with the leftmost frames being transmitted first, and the rightmost frames being transmitted last. | + | More explicitly, a Gesture looks is comprised of an initialization CAN Packet, followed by up to 256 additional CAN Packets, each comprised of a 1 byte header and 7 byte data payload, for a total possible data length of 256 * 7 = 1,792 bytes. The initialization CAN Packet consists of the standard header, 2 bytes of additional information, and 5 bytes of data payload. Subsequent CAN Packets consist of the 1 byte header and up to 7 bytes of data. The general structure of this format is as such: |
| + | |
| + | {| class="wikitable" |
| + | |Initialization Packet (8 bytes) |
| + | |Data Packets (up to 256) |
| + | |} |
| + | |
| + | The following is the general structure of a generic CAN Packet -- specifically, the 1 byte header and 7 byte data payload sections. |
| + | |
| + | {| class="wikitable" |
| + | | style="background-color: #4CC9FF;"| |
| + | Source (0 - 16) (4 bit) |
| + | | style="background-color: #8AFFDF;"| |
| + | IsInit (1 bit) |
| + | | style="background-color: #FFA6CE;"| |
| + | Parity (1 bit) |
| + | | style="background-color: #EDFF7A;"| |
| + | Message ID (2 bit) |
| + | | style="background-color: #AD6DF9;"| |
| + | Data (7 bytes) |
| + | |} |
| + | |
| + | The following is the initialization CAN Packet -- the first packet sent to begin a gesture transmission. It consists of a standard header followed by a two-byte auxiliary information frame. |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
| | style="background-color: #4CC9FF;"| | | | style="background-color: #4CC9FF;"| |
− | Type (Req/Resp) (1 bit)
| + | Header (1 byte) |
| | style="background-color: #8AFFDF;"| | | | style="background-color: #8AFFDF;"| |
− | State Flags (7 bits)
| + | Destination Identifier (4 bits) |
| | style="background-color: #FFA6CE;"| | | | style="background-color: #FFA6CE;"| |
− | Source Identifier (8 bit)
| + | Flags (4 bits) |
| | style="background-color: #EDFF7A;"| | | | style="background-color: #EDFF7A;"| |
− | Destination Identifier (8 bit)
| + | Message Length (in # Packets) (8 bits) |
| | style="background-color: #AD6DF9;"| | | | style="background-color: #AD6DF9;"| |
− | Data (4-500 bytes) | + | Data (5 bytes) |
− | | style="background-color: #C25959;"|
| |
− | Checksum (8 byte)
| |
| |} | | |} |
| + | |
| | | |
| === Type Frame === | | === Type Frame === |