OSAL处理来自AF的数据包.docVIP

  • 3
  • 0
  • 约1.44万字
  • 约 11页
  • 2017-12-14 发布于河南
  • 举报
OSAL处理来自AF的数据包

以下为系统处理来自AF层数据包的大致流程, afIncomingData() ——afBuildMSGIncoming() ——osal_msg_send() —— osal_set_event()—— 根据task_id调用事件处理函数(如SampleApp_ProcessEvent()) ——判断具体事件类型调用相应回调函数(如SampleApp_MessageMSGCB()) ——实现具体现象 ? ??? afIncomingData()函数用来从APS层传递一个ASDU到AF层;中间调用了afBuildMSGIncoming()函数,这个函数是用来为APS层建立一个特定格式的消息包,然后再调用osal_msg_send()把消息(包含了ASDU)传往AF层. AF层规定接收的数据包的类型如下: typedef struct { osal_event_hdr_t hdr; uint16 groupId; uint16 clusterId; afAddrType_t srcAddr; byte endPoint; byte wasBroadcast; byte LinkQuality; byte SecurityUse; uint32 timestamp; afMSGCommandFormat_t cmd; } afIncomingMSG

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档