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.

why NameServerMessageQ_create doesn't conflict with MessageQ_Create in srioIpcChipToChipExample project?

Hi All,

           I am having a doubt in the srioIpcChipToChipExample project 

[C:\Program Files (x86)\Texas Instruments\pdk_C6670_1_0_0_19\packages\ti\transport\ipc\examples\srioIpcChipToChipExample\producer]

In the Producer folder, 

below is the code

======================================================

/* Create messageQ to remote proc . This will use srioTransport to send/receive nameserver
* messages to/from remote chip. A MessageQ heap must be registered prior to calling
* NameServerMessageQ_create()*/

here MultiProcId+remoteChipClusterBase would be (0 + 2)

Error_init(&eb);
nsHandle = NameServerMessageQ_create(multiProcId+remoteChipClusterBase, NULL, &eb);
if (nsHandle == NULL)
{
System_abort("NameServerMessageQ_create() failed");
}

============================================

i will use following notations assuming communication is between Chip A and Chip B.

core in  chip A = Core_ChipA

core in chip B = Core_ChipB

and if i understand correctly a Core_ChipA creates a MessageQ in Core_ChipB [please correct me if i am wrong] and vice versa and assuming the same, i see the following lines after few lines.

==========================================================

/* Create the message queue. */
messageQ = MessageQ_create(localQueueName, NULL);
if (messageQ == NULL) {
System_abort("ERROR: MessageQ_create failed\n");
}

===========================================================

so now my understanding is assume Core_ChipA  creates a MessageQ named "CORE2" in Core_ChipB

and Core_ChipB creates a MessageQ named "CORE0" in Core_ChipA. Both entries will be listed in Nameserver

and will it not conflict with recreating them using

MessageQ_Create() again ?

Thanks

RC Reddy

  • RC,

    The NameServerMessageQ_create and MessageQ_create calls will not conflict as their functionalities are completely different.

    NameServerMessageQ_create is used to register a core from another device with NameServer.  Registering the remote core with NameServer allows it to query the remote core for a queue name specified in the MessageQ_open API.

    The MessageQ_create API is used to create a message queue locally.  It is not used to create a queue remotely.  The MessageQ_create API creates a local queue with the name specified.  Then a remote core will try to open that queue with the MessageQ_open API by specifying the queue name.


    Please refer to the IPC documentation and examples for the proper usage of MessageQ APIs.

    Justin

  • Hi Justin,

                     Can you please explain more on the statement "NameServerMessageQ_create is used to register a core from another device with NameServer.  Registering the remote core with NameServer allows it to query the remote core for a queue name specified in the MessageQ_open API." [using the below code as example]

    Can the below highlighted line in the code be changed as it gives wrong notion of its functionality.

    /* Create messageQ to remote proc . This will use srioTransport to send/receive nameserver
    * messages to/from remote chip. A MessageQ heap must be registered prior to calling
    * NameServerMessageQ_create()*/

    here MultiProcId+remoteChipClusterBase would be (0 + 2)

    Error_init(&eb);
    nsHandle = NameServerMessageQ_create(multiProcId+remoteChipClusterBase, NULL, &eb);
    if (nsHandle == NULL)
    {
    System_abort("NameServerMessageQ_create() failed");
    }

    Also can you please w.r.t to above piece of code, what is the expectation when i open the field of Nameserver in ROV.

    Thanks

    RC Reddy