Start adding push message support

This commit is contained in:
2024-04-10 13:49:18 -05:00
parent 9de914dfa8
commit 72b9a2ba92
4 changed files with 79 additions and 0 deletions
+24
View File
@@ -280,6 +280,28 @@ struct PACKED StreamCtrlResp {
struct Footer footer;
};
struct PACKED AddSubMsgReq {
struct Header header;
uint8_t node_id;
uint8_t msg_id;
uint8_t reserved;
uint8_t sub_mode;
uint8_t subject_count;
uint64_t subject_uuid;
uint16_t freq;
struct Footer footer;
};
struct PACKED AddSubMsgResp {
struct Header header;
uint8_t retcode;
uint8_t pub_node_id;
uint8_t ack_node_id;
uint8_t ack_msg_id;
uint32_t ack_err_uid_data;
struct Footer footer;
};
union Request {
struct Header header;
struct SetSdkConnectionReq sdkconn;
@@ -295,6 +317,7 @@ union Request {
struct GimbalCtrlSpeedReq gimbspeed;
struct BlasterFireReq blaster;
struct StreamCtrlReq stream;
struct AddSubMsgReq sub;
};
union Response {
struct Header header;
@@ -311,6 +334,7 @@ union Response {
struct GimbalCtrlSpeedResp gimbspeed;
struct BlasterFireResp blaster;
struct StreamCtrlResp stream;
struct AddSubMsgResp sub;
};
union Message {
struct Header header;
+30
View File
@@ -108,3 +108,33 @@ subscribe_add_node (
uint16_t seq,
bool ack );
#define ADD_SUB_MSG_CMD 0x0348
#define DDS_BATTERY 0x000200096862229f
#define DDS_GIMBAL_BASE 0x00020009f5882874
#define DDS_VELOCITY 0x0002000949a4009c
#define DDS_ESC 0x00020009c14cb7c5
#define DDS_ATTITUDE 0x000200096b986306
#define DDS_IMU 0x00020009a7985b8d
#define DDS_POSITION 0x00020009eeb7cece
#define DDS_SA_STATUS 0x000200094a2c6d55
#define DDS_CHASSIS_MODE 0x000200094fcb1146
#define DDS_SBUS 0x0002000988223568
#define DDS_SERVO 0x000200095f0059e7
#define DDS_ARM 0x0002000926abd64d
#define DDS_GRIPPER 0x00020009124d156a
#define DDS_GIMBAL_POS 0x00020009f79b3c97
#define DDS_STICK 0x0002000955e9a0fa
#define DDS_MOVE_MODE 0x00020009784c7bfd
#define DDS_TOF 0x0002000986e4c05a
#define DDS_PINBOARD 0x00020009eebb9ffc
void
add_sub_msg (
union Request* req,
uint16_t seq,
bool ack,
uint8_t node_id,
uint8_t msg_id,
uint8_t freq,
uint64_t subject_uuid );