-
-
Notifications
You must be signed in to change notification settings - Fork 0
BTEMP
Brendan G Bohannon edited this page Dec 7, 2015
·
2 revisions
Based on BTIC CTLV.
Normally will use UDP port 16980. It is intended mostly for LAN use.
Messages begin with a sync marker, generally with either a TWOCC or FOURCC tag following. If a message has a sync marker followed by a context-dependent marker, data will be compressed and in (Faux)Zlib format.
- 'PING', Ping
- Optional Data, used to probe for hosts.
- NodeID:GUID, NodeFlags:U32
- Identifies the node and its status flags.
- 'PIAK', Ping Acknowledge
- NodeID:GUID, NodeFlags:U32
- Identifies the node and its status flags.
- 'RCTR', Register Controller
- Used to validate controller with robot.
- NodeID:GUID, NodeAuth:GUID, AuthTag:U16, FmtTag:U16
- AuthTag: Indicates how authentication is done.
- FmtTag: Indicates control message format.
- 'RCAK', Register Controller Acknowledge
- 'CTRL', Control Message
- Depends on control message format.
- May be encrypted.
- 'IDLE', Idle Keepalive Message.
- Sent when there is nothing worthwhile to send.
- Indicates that the other end is still live.
- 'PINS', Sends GPIO Pins Status
- InMask:U32, OutMask:U32
- PdmMask:U32, PdmActive:U32
- InMask indicates which GPIO input pins are set.
- OutMask indicates which output pins are currently set.
- PdmMask indicates output pins (for PDM/PWM).
- PdmActive indicates which pins have PDM output active.
- For any pins set in PdmMask, a byte follows giving the current target duty-cycle.
- Low 5 bits identify node type:
- 0=Unknown/Undefined
- 1=Controller
- 2=Robot
- 3-31=Reserved
- Bit 6/7: Response Request
- 0=Default Response (PING/PIAK)
- 1=No Response (PING only)
- 2/3=Reserved
- Impulse1:u32
- Bits 0-9, Indicate numeric keypad bits digits.
- Bits 10-13, Up, Down, Left Right keys.
- Impulse2:u32
- Throt1,Throt2,Throt3,Throt4:byte
- Give 4 throttle controls as bytes.
Markers
- 'VS1G': Frame Segment (Uncompressed)
- 'VZ1G': Frame Segment (Deflate / BTLZH Compressed)
- 'VS1H': Frame Segment (BTIC1H)
- streamId:byte, stream ID number
- msgFlag:byte, message flags
- frameNumber:u16, frame number (modulo)
- startBlock:u16, low bits of starting block number for segment
- endBlock:u16, low bits of ending block number for segment.
- startBlockHigh:byte, high bits of starting block number
- endBlockHigh:byte, high bits of ending block number
- 24 bits allows a max resolution of 16384x16384.
- 20 bits would limit it to 4096x4096.
- 16 bits would limit it to 1024x1024.
- Though, yes, all are bigger than 640x480 or 320x240...