hi !
when ZC receive a Msg(Device_annce) from ZED ,ZC can get the MSG in ZDO_MSG_CB
the MSG was define as zdoIncomingMsg_t *pMsg
typedef struct
{
osal_event_hdr_t hdr;
zAddrType_t srcAddr;
uint8 wasBroadcast;
cId_t clusterID;
uint8 SecurityUse;
uint8 TransSeq;
uint8 asduLen;
uint16 macDestAddr;
uint8 *asdu;
uint16 macSrcAddr;
} zdoIncomingMsg_t;
i was confused of those address variable
For ZC (the code in ZC side) what is macDestAddr and macSrcAddr ?
is that right as below:
the first srcAddr ======》 ZED address(include short address and extern address)?
macDestAddr ======》 ZC address( extern address)?
macSrcAddr ======》 ZC address( short address )?
if there is a address variable was defined afAddrType_t *dstAddr,(this variable was used for sending MSG)
how could we pick out the MSG from zdoIncomingMsg_t to afAddrType_t *dstAddr
if panid and endpoint have not setting ,is that OK?
typedef enum
{
afAddrNotPresent = AddrNotPresent,
afAddr16Bit = Addr16Bit,
afAddr64Bit = Addr64Bit,
afAddrGroup = AddrGroup,
afAddrBroadcast = AddrBroadcast
} afAddrMode_t;
typedef struct
{
union
{
uint16 shortAddr;
ZLongAddr_t extAddr;
} addr;
afAddrMode_t addrMode;
uint8 endPoint;
uint16 panId; // used for the INTER_PAN feature
} afAddrType_t;