Class RefSerialData::Tx

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.

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.

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
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

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 called msg, you can call getWaitTimeAfterGraphicSendMs(&msg).

Todo:
Deprecated:

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
struct Graphic1Message

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
GraphicData graphicData
uint16_t crc16
struct Graphic2Message

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
GraphicData graphicData[2]
uint16_t crc16
struct Graphic5Message

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
GraphicData graphicData[5]
uint16_t crc16
struct Graphic7Message

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
GraphicData graphicData[7]
uint16_t crc16
struct GraphicCharacterMessage

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
GraphicData graphicData
char msg[30]
uint16_t crc16
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
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
struct RobotToRobotMessage

Public Members

DJISerial::FrameHeader frameHeader
uint16_t cmdId
InteractiveHeader interactiveHeader
uint8_t dataAndCRC16[115]