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: is there a way to know how many messages are in the queue of a sensor node to be sent to a collector node in TI-15.4 stack?

Part Number: CC1310

Hi Community,

I am trying to get the size of queue of pending messages in a sensor node. I found the following function:

/**************************************************************************************************
 * @fn          MAC_CbackCheckPending
 *
 * @brief       This callback function returns the number of pending indirect messages queued in
 *              the application. Most applications do not queue indirect data and can simply
 *              always return zero. The number of pending indirect messages only needs to be
 *              returned if macCfg.appPendingQueue to TRUE.
 *
 * input parameters
 *
 * None.
 *
 * output parameters
 *
 * None.
 *
 * @return      The number of indirect messages queued in the application or zero.
 **************************************************************************************************
*/
extern uint8 MAC_CbackCheckPending(void);

Is this the right function to call?

Thanks in advance.

  • Hi Zhiyong,

    The indirect transmissions are used by the collector device for transmission, the sensor device sends direct messages to the  collector in the example. 

    In the file macTask.c, there is a structure macData that is being used. This structure also has an element directCount which is the number of direct frames in the TX queue. This can be used to track the number of pending messages.

    Regards,

    Sid

  • A further question, can we use the count of pending indirect messages on collector node to track how many are in their queues to be sent to sensor nodes?

  • Yes, it should be possible to track the indirect count as well on the collector.

  • For now I just track pending messages for each connected device and then add them together. This works but not ideal.

    I was wondering if there is way to directly track the number of pending messages. I tried MAC_CbackCheckPending(). The didn't work. It always return 0, even if I know there are pending messages.

  • HI Zhiyong,

    The MAC_CbackCheckPending() returns only the number of indirect messages. So it is possibly not transmitting any indirect messages, which is true in a lot of cases. When you say it is not ideal, what do you mean? Are you facing any discrepancies from the expected number of mesages? 

    Regards,

    Sid