This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1310: CC1310 15.4 collector processIncomingICallMsg 问题

Part Number: CC1310
Other Parts Discussed in Thread: CC1350

各位专家:我在分析 CC1310 15.4 collector  中 MAC 事件回调程序中 processIncomingICallMsg 加入新的回调事件

case UART_MESSAGE_IND: //OSAL 发过来的消息 add by jhy 2022-02-28 加入UART_MESSAGE_IND 事件,在程序中用 OsalPort_msgSend(appTaskId, (uint8_t*)pMsg ); 发送消息到APPTASK

现在已经接到这个消息回调。

现在我想显示消息中数据,macCbackEvent_t *pMsg

macCbackEvent_t  中加入了自己定义的消息结构

typedef struct _UserTaskEventInd
{
macEventHdr_t hdr; // Internal use only */
uint8_t SrcTaskId; //发送的源TASK_ID
uint8_t EventId; //
char *EventData; //MESSAGE BODY
uint8_t EventDataLen; //MESSAGE BODY LEN
} UserTaskEventInd_t;

/* Union of callback structures */
typedef union
{
macEventHdr_t hdr;
macMlmeAssociateInd_t associateInd; /* MAC_MLME_ASSOCIATE_IND */
macMlmeAssociateCnf_t associateCnf; /* MAC_MLME_ASSOCIATE_CNF */
macMlmeDisassociateInd_t disassociateInd; /* MAC_MLME_DISASSOCIATE_IND */
macMlmeDisassociateCnf_t disassociateCnf; /* MAC_MLME_DISASSOCIATE_CNF */
macMlmeBeaconNotifyInd_t beaconNotifyInd; /* MAC_MLME_BEACON_NOTIFY_IND */
macMlmeOrphanInd_t orphanInd; /* MAC_MLME_ORPHAN_IND */
macMlmeScanCnf_t scanCnf; /* MAC_MLME_SCAN_CNF */
macMlmeStartCnf_t startCnf; /* MAC_MLME_START_CNF */
macMlmeSyncLossInd_t syncLossInd; /* MAC_MLME_SYNC_LOSS_IND */
macMlmePollCnf_t pollCnf; /* MAC_MLME_POLL_CNF */
macMlmeCommStatusInd_t commStatusInd; /* MAC_MLME_COMM_STATUS_IND */
macMlmePollInd_t pollInd; /* MAC_MLME_POLL_IND */
macMcpsDataCnf_t dataCnf; /* MAC_MCPS_DATA_CNF */
macMcpsDataInd_t dataInd; /* MAC_MCPS_DATA_IND */
macMcpsPurgeCnf_t purgeCnf; /* MAC_MCPS_PURGE_CNF */
macMlmeWSAsyncInd_t asyncInd; /* MAC_MLME_WS_ASYNC_FRAME_IND */
macMlmeWSAsyncCnf_t asyncCnf; /* MAC_MLME_WS_ASYNC_FRAME_CNF */
macNpiMtMsg_t npiMtMsg; /* NPI MT message */
UserTaskEventInd_t useruartdataInd; /* 用户UART 任务发送过来的队列信息 add by jhy 2022-03-01 */
} macCbackEvent_t;

我在应用MAC 回调处理时加入如下语句:

case UART_MESSAGE_IND: //OSAL 发过来的消息 add by jhy 2022-02-28

DisPlayStr=Board_Lcd_IntToString("\r\nUART_MESSAGE_IND_len=",pMsg->useruartdataInd,10);

UART_write(hUart, DisPlayStr, strlen(DisPlayStr));

编译时,始终显示../Application/api_mac.c", line 1491: error #137: union "<unnamed>" has no field "useruartdataInd"
1 error detected in the compilation of "../Application/api_mac.c".
为什么呀,我在回调信息定义中已经加入了UserTaskEventInd_t useruartdataInd; /* 用户UART 任务发送过来的队列信息 add by jhy 2022-03-01 */ 。

调试半天没找到问题,请教。多谢。