Class RefSerialData::Tx
Defined in File ref_serial_data.hpp
Nested Relationships
This class is a nested type of Class RefSerialData.
Nested Types
Class Documentation
-
class Tx
Contains enum and struct definitions specific to sending data to the referee serial class. Includes structure for sending different types of graphic messages.
Public Types
-
enum DeleteGraphicOperation
Graphic operations that can be passed to a delete graphic operation. Using this enum you can specify if you would like to delete a graphic layer (multiple graphics can be drawn on one of a number of layers) or delete all the graphics on the screen.
Values:
-
enumerator DELETE_GRAPHIC_NO_OP
Do nothing, no-op.
-
enumerator DELETE_GRAPHIC_LAYER
Delete a particular graphic layer (specified later on)
-
enumerator DELETE_ALL
Delete all graphic in all graphic layers.
-
enumerator DELETE_GRAPHIC_NO_OP
-
enum GraphicOperation
Graphic operations that can be passed in an add graphic operation.
Values:
-
enumerator GRAPHIC_NO_OP
Do nothing, no-op.
-
enumerator GRAPHIC_ADD
Add a new graphic. If the graphic has a unique id not already registered with the UI, the graphic will be uniquely added, otherwise the graphic with the same graphic ID will be replaced. If you have a graphic that is already drawn that you want to change, you should use GRAPHIC_MODIFY instead
-
enumerator GRAPHIC_MODIFY
Modify an existing graphic (by graphic ID). The graphic must already exist for this to work properly.
-
enumerator GRAPHIC_DELETE
Delete a particular graphic.
-
enumerator GRAPHIC_NO_OP
-
enum class GraphicType : uint8_t
The type of graphic being drawn (some geometry, or a string/number)
Values:
-
enumerator STRAIGHT_LINE
-
enumerator RECTANGLE
-
enumerator CIRCLE
-
enumerator ELLIPSE
-
enumerator ARC
-
enumerator FLOATING_NUM
-
enumerator INTEGER
-
enumerator CHARACTER
-
enumerator STRAIGHT_LINE
-
enum class GraphicColor : uint8_t
The color of the graphic being drawn.
Values:
-
enumerator RED_AND_BLUE
-
enumerator YELLOW
-
enumerator GREEN
-
enumerator ORANGE
-
enumerator PURPLISH_RED
-
enumerator PINK
-
enumerator CYAN
-
enumerator BLACK
-
enumerator WHITE
-
enumerator RED_AND_BLUE
Public Static Functions
-
template<typename T>
static inline uint32_t getWaitTimeAfterGraphicSendMs(T*) Get the min wait time after which you can send more data to the client. Sending faster than this time may cause dropped packets.
Pass a pointer to some graphic message. For example, if you have a
Graphic1Message
calledmsg
, you can callgetWaitTimeAfterGraphicSendMs(&msg)
.- Template Parameters:
T – The type of the graphic message that was just been sent.
Public Static Attributes
-
static uint32_t MAX_TRANSMIT_SPEED_BYTES_PER_S = 1000
You cannot send messages faster than this speed to the referee system.
Source: https://bbs.robomaster.com/forum.php?mod=viewthread&tid=9120
Changed from 1280 to 1000 as the HUD was still unreliable.
-
struct DeleteGraphicLayerMessage
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
uint8_t deleteOperation
-
uint8_t layer
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct Graphic1Message
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
GraphicData graphicData
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct Graphic2Message
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
GraphicData graphicData[2]
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct Graphic5Message
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
GraphicData graphicData[5]
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct Graphic7Message
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
GraphicData graphicData[7]
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct GraphicCharacterMessage
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
GraphicData graphicData
-
char msg[30]
-
uint16_t crc16
-
DJISerial::FrameHeader frameHeader
-
struct GraphicData
Public Members
-
uint8_t name[3]
-
uint32_t operation
-
uint32_t type
-
uint32_t layer
-
uint32_t color
-
uint32_t startAngle
-
uint32_t endAngle
-
uint32_t lineWidth
-
uint32_t startX
-
uint32_t startY
-
uint32_t radius
-
uint32_t endX
-
uint32_t endY
-
int32_t value
- union tap::communication::serial::RefSerialData::Tx::GraphicData
-
uint8_t name[3]
-
struct InteractiveHeader
Each graphic message has a graphic header inside of the message data.
Public Members
-
uint16_t dataCmdId
-
uint16_t senderId
-
uint16_t receiverId
-
uint16_t dataCmdId
-
struct RobotToRobotMessage
Public Members
-
DJISerial::FrameHeader frameHeader
-
uint16_t cmdId
-
InteractiveHeader interactiveHeader
-
uint8_t dataAndCRC16[115]
-
DJISerial::FrameHeader frameHeader
-
enum DeleteGraphicOperation