有几个疑惑:
1.当pktConf.bVarlen = 1时,那么数据包就会包括格式中的长度域?
2.如果需要地址,地址值填充到哪里呢?按描述是作为负载第一个字节,那格式中的地址域岂不是没用了?
请大神指教!
Viki Shi:
1、是的
2、这段有具体描述:Two kinds of addresses are supported. With the first option, the address is part of the header. In this case, the address size can be from 1 to 31 bits. The other option is to have an address after the header. If so, this address consists of from 1 to 8 bytes. To use an address as part of the header, addrConf.addrType must be set to 1. The number of bits in the address is given by addrConf.addrSize. These bits are read from bit number addrConf.addrPos from the first bit of the header. To use an address after the header, addrConf.addrType must be set to 0. In this case, the number of bytes in the address is given by addrConf.addrSize.
user4959119:
回复 Viki Shi:
看起来与手册里的格式还是有不同,手册里描述地址有0-8个字节,这个却是1到8个,这段话是从哪个资料里看的亲,提供下链接。。。
Viki Shi:
回复 user4959119:
就是TRM手册,在这个standard packet format下面还有个format,上下文多看一下
user4959119:
回复 Viki Shi:
OK 多谢