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.

RTOS/LAUNCHXL-CC1352R1: Setting Priorities in Message Queues

Part Number: LAUNCHXL-CC1352R1

Tool/software: TI-RTOS

Hello,

My aim is to send different messages having different priorities and receiving them in the order of high priority to low priority.

I was able to work with basic mq_send and mq_recieve commands using the following commands.

1.  ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,unsigned int *msg_prio);

2.  int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,unsigned int msg_prio);

 

While I was doing so, I kept the priority argument as NULL. Now I wish to prioritize the messages that are being sent to the queue.
I found the following link which had the reference to setting up priorities in message queues in TI-RTOS. 

It had the following priorities

  • MessageQ_NORMALPRI = 0
  • MessageQ_HIGHPRI = 1
  • MessageQ_URGENTPRI = 3


I tried using those but wasn't able to make it work.

1) Is there any other document/link to which I can refer to implement priority-based message queues.

2) Is there any way in which I can see the queue after it's completely filled up?

Thanks and Regards,

Yash.