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.

How to access current number of messages that the mailbox contains in real time in the code?

Hi,

I know we can access the current number of messages that the mailbox contains and the maximum number of messages that the mailbox can hold in Kernel/Object View Debugger from CCS. Is there a way to access these two information in the code using some API function?

Thanks,

Bin

  • Hi Bin,

                MailBox size [Max number of messages] is what is set by user. Apart from that the following API's should help you..

    SizeT Mailbox_getMsgSize(Mailbox_Object *obj)
    {

    }

    Int Mailbox_getNumFreeMsgs(Mailbox_Object *obj)
    {

    }

    Int Mailbox_getNumPendingMsgs(Mailbox_Object *obj)
    {

    }

    Thanks

    RC Reddy

  • Hi, Reddy,

    Thanks for your reply. It seems the API function you mentioned in your reply is only supported in SYS/BIOS. I am using DSP/BIOS. Do you know if there is any API in DSP/BIOS which has the same functionality as the API used in SYS/BIOS?

    Thanks,

    Bin

  • Bin,

    There is no API, but if you look in mbx.h you can see the object structure of the mailbox.  You can use this information to get the information you need.

    DSP/BIOS is a legacy product at this point and its not actively being developed so it should be safe to do this.

    Judah