51uwb.cn

 找回密码
 立即注册
查看: 2746|回复: 1

请问这几个消息格式有什么区别?

[复制链接]

35

主题

76

帖子

197

积分

官方会员

Rank: 8Rank: 8

积分
197
发表于 2021-9-15 15:34:40 | 显示全部楼层 |阅读模式
typedef struct
{
    uint8 frameCtrl[2];                             //  frame control bytes 00-01
    uint8 seqNum;                                   //  sequence_number 02
    uint8 panID[2];                                 //  PAN ID 03-04
    uint8 destAddr[ADDR_BYTE_SIZE_L];               //  05-12 using 64 bit addresses
    uint8 sourceAddr[ADDR_BYTE_SIZE_L];             //  13-20 using 64 bit addresses
    uint8 messageData[MAX_USER_PAYLOAD_STRING_LL] ; //  22-124 (application data and any user payload)
    uint8 fcs[2] ;                                  //  125-126  we allow space for the CRC as it is logically part of the message. However ScenSor TX calculates and adds these bytes.
} srd_msg_dlsl ;

typedef struct
{
    uint8 frameCtrl[2];                             //  frame control bytes 00-01
    uint8 seqNum;                                   //  sequence_number 02
    uint8 panID[2];                                 //  PAN ID 03-04
    uint8 destAddr[ADDR_BYTE_SIZE_S];               //  05-06
    uint8 sourceAddr[ADDR_BYTE_SIZE_S];             //  07-08
    uint8 messageData[MAX_USER_PAYLOAD_STRING_SS] ; //  09-124 (application data and any user payload)
    uint8 fcs[2] ;                                  //  125-126  we allow space for the CRC as it is logically part of the message. However ScenSor TX calculates and adds these bytes.
} srd_msg_dsss ;

还有srd_msg_dlss ; srd_msg_dssl ;
结构体中的定义应该是一样的吧?


回复

使用道具 举报

35

主题

941

帖子

3912

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3912
发表于 2021-9-15 21:47:01 | 显示全部楼层
一样就没有必要定义两个了。
主要区别是地址长度,使用16bit 短地址还是使用64bit IEEE地址
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

bphero Inc.  

GMT+8, 2024-3-28 17:12 , Processed in 0.011999 second(s), 4 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

快速回复 返回顶部 返回列表