51uwb.cn

 找回密码
 立即注册
查看: 2866|回复: 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

主题

955

帖子

3994

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3994
沙发
发表于 2021-9-15 21:47:01 | 只看该作者
一样就没有必要定义两个了。
主要区别是地址长度,使用16bit 短地址还是使用64bit IEEE地址
回复

使用道具 举报

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

本版积分规则

bphero Inc.  

GMT+8, 2024-4-20 12:46 , Processed in 0.011209 second(s), 4 queries , File On.

Powered by Discuz! X3.3

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

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