module ti.sdo.ipc.MessageQ

Message-passing with queuing

The MessageQ module supports the structured sending and receiving of variable length messages. This module can be used for homogeneous (DSP to DSP) or heterogeneous (Arm to DSP) multi-processor messaging. [ more ... ]
XDCspec summary sourced in ti/sdo/ipc/MessageQ.xdc
@ModuleStartup
module MessageQ {  ...
// inherits xdc.runtime.IModule
instance:  ...
C synopsis target-domain
#include <ti/sdo/ipc/MessageQ.h>
module-wide constants & types
    #define MessageQ_HIGHPRI//  (UInt)1
    #define MessageQ_RESERVEDPRI//  (UInt)2
    #define MessageQ_URGENTPRI//  (UInt)3
 
    typedef UInt32 MessageQ_QueueId// MessageQ ID;
module-wide config parameters
    extern const Bool MessageQ_traceFlag// Trace setting;
module-wide functions
    Bool MessageQ_registerTransport// Register a transport with MessageQ( IMessageQTransport_Handle transport, UInt16 procId, UInt priority );
    Void MessageQ_unregisterTransport// Unregister a transport with MessageQ( UInt16 procId, UInt priority );
module-wide built-ins
per-instance object types
 
per-instance config parameters
        IInstance_Params *instance;
    } MessageQ_Params;
 
per-instance built-ins
 
XDCscript usage meta-domain
var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
local proxy modules
        MessageQ.SetupTransportProxy.delegate$ = ITransportSetup.Module null
module-wide constants & types
    const MessageQ.HIGHPRI//  = 1;
    const MessageQ.RESERVEDPRI//  = 2;
    const MessageQ.URGENTPRI//  = 3;
module-wide config parameters
        msg: "A_cannotFreeStaticMsg: Cannot call MessageQ_free with static msg"
    };
        msg: "A_heapIdInvalid: heapId is invalid"
    };
        msg: "A_invalidContext: Cannot call with an open/create handle"
    };
        msg: "A_invalidMsg: Invalid message"
    };
        msg: "A_invalidObj: an invalid obj is used"
    };
        msg: "A_invalidParam: an invalid parameter was passed in"
    };
        msg: "A_invalidQueueId: Invalid queueId is used"
    };
        msg: "A_invalidUnblock: Trying to unblock a remote MessageQ or a queue with non-blocking synchronizer"
    };
        msg: "A_procIdInvalid: procId is invalid"
    };
        msg: "A_unregisteredTransport: transport is not registered"
    };
        msg: "E_maxReached: All objects in use. MessageQ.maxRuntimeEntries is %d"
    };
        msg: "E_unregisterHeapId: Heap id %d not registered"
    };
        mask: Diags.USER1,
        msg: "LM_alloc: Message 0x%x (seqNum = %d, srcProc = %d) was allocated"
    };
        mask: Diags.USER1,
        msg: "LM_free: Message 0x%x (seqNum = %d, srcProc = %d) was freed"
    };
        mask: Diags.USER1,
        msg: "LM_get: Message 0x%x (seqNum = %d, srcProc = %d) was received by queue 0x%x"
    };
        mask: Diags.USER1,
        msg: "LM_putLocal: Message 0x%x (seqNum = %d, srcProc = %d) was placed onto queue 0x%x"
    };
        mask: Diags.USER1,
        msg: "LM_putRemote: Message 0x%x (seqNum = %d, srcProc = %d) was given to processor %d transport"
    };
        mask: Diags.USER1,
        msg: "LM_rcvByTransport: Message 0x%x (seqNum = %d, srcProc = %d) was received"
    };
        mask: Diags.USER1,
        msg: "LM_setTrace: Message 0x%x (seqNum = %d, srcProc = %d) traceFlag = %d"
    };
        mask: Diags.USER1,
        msg: "LM_staticMsgInit: Message 0x%x (seqNum = %d, srcProc = %d) was set in MessageQ_staticMsgInit"
    };
    MessageQ.traceFlag// Trace setting = Bool false;
 
module-wide functions
per-instance config parameters
    var params = new MessageQ.Params// Instance config-params object;
 
XDCspec declarations sourced in ti/sdo/ipc/MessageQ.xdc
package ti.sdo.ipc;
 
@ModuleStartup
module MessageQ {
local proxy modules
    proxy SetupTransportProxy inherits ITransportSetup;
module-wide constants & types
    const UInt HIGHPRI//  = 1;
    const UInt RESERVEDPRI//  = 2;
    const UInt URGENTPRI//  = 3;
 
    typedef UInt32 QueueId// MessageQ ID;
module-wide config parameters
        msg: "A_cannotFreeStaticMsg: Cannot call MessageQ_free with static msg"
    };
        msg: "A_heapIdInvalid: heapId is invalid"
    };
        msg: "A_invalidContext: Cannot call with an open/create handle"
    };
        msg: "A_invalidMsg: Invalid message"
    };
        msg: "A_invalidObj: an invalid obj is used"
    };
        msg: "A_invalidParam: an invalid parameter was passed in"
    };
        msg: "A_invalidQueueId: Invalid queueId is used"
    };
        msg: "A_invalidUnblock: Trying to unblock a remote MessageQ or a queue with non-blocking synchronizer"
    };
        msg: "A_procIdInvalid: procId is invalid"
    };
        msg: "A_unregisteredTransport: transport is not registered"
    };
        msg: "E_maxReached: All objects in use. MessageQ.maxRuntimeEntries is %d"
    };
        msg: "E_unregisterHeapId: Heap id %d not registered"
    };
        mask: Diags.USER1,
        msg: "LM_alloc: Message 0x%x (seqNum = %d, srcProc = %d) was allocated"
    };
        mask: Diags.USER1,
        msg: "LM_free: Message 0x%x (seqNum = %d, srcProc = %d) was freed"
    };
        mask: Diags.USER1,
        msg: "LM_get: Message 0x%x (seqNum = %d, srcProc = %d) was received by queue 0x%x"
    };
        mask: Diags.USER1,
        msg: "LM_putLocal: Message 0x%x (seqNum = %d, srcProc = %d) was placed onto queue 0x%x"
    };
        mask: Diags.USER1,
        msg: "LM_putRemote: Message 0x%x (seqNum = %d, srcProc = %d) was given to processor %d transport"
    };
        mask: Diags.USER1,
        msg: "LM_rcvByTransport: Message 0x%x (seqNum = %d, srcProc = %d) was received"
    };
        mask: Diags.USER1,
        msg: "LM_setTrace: Message 0x%x (seqNum = %d, srcProc = %d) traceFlag = %d"
    };
        mask: Diags.USER1,
        msg: "LM_staticMsgInit: Message 0x%x (seqNum = %d, srcProc = %d) was set in MessageQ_staticMsgInit"
    };
    config UInt16 numHeaps// Number of heapIds in the system = 1;
    config Bool traceFlag// Trace setting = false;
 
    metaonly config String tableSection// Section name is used to place the names table = null;
module-wide functions
    Bool registerTransport// Register a transport with MessageQ( IMessageQTransport.Handle transport, UInt16 procId, UInt priority );
    Void unregisterTransport// Unregister a transport with MessageQ( UInt16 procId, UInt priority );
 
    metaonly Void registerHeapMeta// Statically register a heap with MessageQ( IHeap.Handle heap, UInt16 heapId );
    metaonly Void registerTransportMeta// Statically register a transport with MessageQ( IMessageQTransport.Handle transport, UInt16 procId, UInt priority );
 
 
instance:
per-instance config parameters
}
DETAILS
The MessageQ module supports the structured sending and receiving of variable length messages. This module can be used for homogeneous (DSP to DSP) or heterogeneous (Arm to DSP) multi-processor messaging.
MessageQ provides more sophisticated messaging than other modules. It is typically used for complex situations such as multi-processor messaging.
The following are key features of the MessageQ module:
  • Writers and readers can be relocated to another processor with no runtime code changes.
  • Timeouts are allowed when receiving messages.
  • Readers can determine the writer and reply back.
  • Receiving a message is deterministic when the timeout is zero.
  • Messages can reside on any message queue.
  • Supports zero-copy transfers.
  • Can send and receive from any type of thread.
  • Notification mechanism is specified by application.
  • Allows QoS (quality of service) on message buffer pools. For example, using specific buffer pools for specific message queues.
Messages are sent and received by being placed on and removed from a message queue. A reader is a thread that gets (reads) messages from a message queue. A writer is a thread that puts (writes) a message to a message queue. Each message queue has one reader and can have many writers. A thread may read from or write to multiple message queues.
Conceptually, the reader thread owns a message queue. The reader thread creates a message queue. The writer threads open a created message queue to get access to them.
Message queues are identified by a system-wide unique name. Internally, MessageQ uses the ti.sdo.utils.NameServer module for managing these names. The names are used for opening a message queue.
Messages must be allocated from the MessageQ module. Once a message is allocated, it can be sent to any message queue. Once a message is sent, the writer loses ownership of the message and should not attempt to modify the message. Once the reader receives the message, it owns the message. It may either free the message or re-use the message.
Messages in a message queue can be of variable length. The only requirement is that the first field in the definition of a message must be a MsgHeader structure. For example:
  typedef struct MyMsg {
      MessageQ_MsgHeader header;
      ...
  } MyMsg;
The MessageQ API uses the MessageQ_MsgHeader internally. Your application should not modify or directly access the fields in the MessageQ_MsgHeader.
All messages sent via the MessageQ module must be allocated from a xdc.runtime.IHeap implementation. The heap can also be used for other memory allocation not related to MessageQ.
An application can use multiple heaps. The purpose of having multiple heaps is to allow an application to regulate its message usage. For example, an application can allocate critical messages from one heap of fast on-chip memory and non-critical messages from another heap of slower external memory.
The registerHeap and registerHeapMeta are APIs used to assign a MessageQ heapId to a heap. When allocating a message, the heapId is used, not the heap handle. This heapId is actually placed into the message (part of the MsgHeader). Care must be taken when assigning heapIds. Refer to the registerHeap and registerHeapMeta descriptions for more details.
MessageQ also supports the usage of messages that are not allocated via the alloc function. Please refer to the staticMsgInit function description for more details.
MessageQ supports reads/writes of different thread models. This is accomplished by having the creator of the message queue specify a xdc.runtime.knl.ISync.Object via the synchronizer configuration parameter. The xdc.runtime.knl.ISync.signal portion of the ISync instance is called whenever the put is called. The xdc.runtime.knl.ISync.wait portion is called in the get if and only if there are no messages.
Since ISyncs are binary, the reader must drain the message queue of all messages before waiting for another signal. For example, if the reader was a SYSBIOS Swi, the xdc.runtime.knl.ISync instance could be a SyncSwi. If a put was called, the Swi_post() would be called. The Swi would run and it must call get until no messages are returned.
In a multiple processor system, MessageQ communicates to other processors via IMessageQTransport instances. MessageQ supports a high priority and a normal priority transport between any two processors. The IMessageQTransport instances are created via the SetupTransportProxy. The instances are responsible for registering themselves with MessageQ. This is accomplished via the registerTransport function.
 
proxy MessageQ.SetupTransportProxy

MessageQ transport setup proxy

XDCscript usage meta-domain
MessageQ.SetupTransportProxy = ITransportSetup.Module null
// some delegate module inheriting the ITransportSetup interface
    MessageQ.SetupTransportProxy.delegate$ = ITransportSetup.Module null
    // explicit access to the currently bound delegate module
 
 
const MessageQ.HIGHPRI
XDCscript usage meta-domain
const MessageQ.HIGHPRI = 1;
C synopsis target-domain
#define MessageQ_HIGHPRI (UInt)1
 
 
const MessageQ.NORMALPRI

Message priority values. These must match the values defined in ti/ipc/MessageQ.h but are needed here for ROV

XDCscript usage meta-domain
const MessageQ.NORMALPRI = 0;
C synopsis target-domain
#define MessageQ_NORMALPRI (UInt)0
 
 
const MessageQ.RESERVEDPRI
XDCscript usage meta-domain
const MessageQ.RESERVEDPRI = 2;
C synopsis target-domain
#define MessageQ_RESERVEDPRI (UInt)2
 
 
const MessageQ.URGENTPRI
XDCscript usage meta-domain
const MessageQ.URGENTPRI = 3;
C synopsis target-domain
#define MessageQ_URGENTPRI (UInt)3
 
 
typedef MessageQ.QueueId

MessageQ ID

C synopsis target-domain
typedef UInt32 MessageQ_QueueId;
 
 
config MessageQ.A_cannotFreeStaticMsg  // module-wide

Assert raised when attempting to free a static message

XDCscript usage meta-domain
MessageQ.A_cannotFreeStaticMsg = Assert.Desc {
    msg: "A_cannotFreeStaticMsg: Cannot call MessageQ_free with static msg"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_cannotFreeStaticMsg;
 
 
config MessageQ.A_heapIdInvalid  // module-wide

Assert raised when using an invalid heapId

XDCscript usage meta-domain
MessageQ.A_heapIdInvalid = Assert.Desc {
    msg: "A_heapIdInvalid: heapId is invalid"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_heapIdInvalid;
 
 
config MessageQ.A_invalidContext  // module-wide

Assert raised when calling API with wrong handle

XDCscript usage meta-domain
MessageQ.A_invalidContext = Assert.Desc {
    msg: "A_invalidContext: Cannot call with an open/create handle"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidContext;
 
DETAILS
Some APIs can only be called with an opened handle (e.g. close. Some can only be called with a created handle (e.g. get).
 
config MessageQ.A_invalidMsg  // module-wide

Assert raised when an invalid message is supplied

XDCscript usage meta-domain
MessageQ.A_invalidMsg = Assert.Desc {
    msg: "A_invalidMsg: Invalid message"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidMsg;
 
 
config MessageQ.A_invalidObj  // module-wide

Assert raised for an invalid MessageQ object

XDCscript usage meta-domain
MessageQ.A_invalidObj = Assert.Desc {
    msg: "A_invalidObj: an invalid obj is used"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidObj;
 
 
config MessageQ.A_invalidParam  // module-wide

Assert raised for an invalid parameter

XDCscript usage meta-domain
MessageQ.A_invalidParam = Assert.Desc {
    msg: "A_invalidParam: an invalid parameter was passed in"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidParam;
 
 
config MessageQ.A_invalidQueueId  // module-wide

Assert raised when an invalid queueId is supplied

XDCscript usage meta-domain
MessageQ.A_invalidQueueId = Assert.Desc {
    msg: "A_invalidQueueId: Invalid queueId is used"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidQueueId;
 
 
config MessageQ.A_invalidUnblock  // module-wide

Assert raised when attempting to unblock a remote MessageQ or one that has been configured with a non-blocking synchronizer

XDCscript usage meta-domain
MessageQ.A_invalidUnblock = Assert.Desc {
    msg: "A_invalidUnblock: Trying to unblock a remote MessageQ or a queue with non-blocking synchronizer"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_invalidUnblock;
 
 
config MessageQ.A_procIdInvalid  // module-wide

Assert raised when using an invalid procId

XDCscript usage meta-domain
MessageQ.A_procIdInvalid = Assert.Desc {
    msg: "A_procIdInvalid: procId is invalid"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_procIdInvalid;
 
 
config MessageQ.A_unregisteredTransport  // module-wide

Assert raised when attempting to send a message to a core where a transport has not been registered

XDCscript usage meta-domain
MessageQ.A_unregisteredTransport = Assert.Desc {
    msg: "A_unregisteredTransport: transport is not registered"
};
C synopsis target-domain
extern const Assert_Id MessageQ_A_unregisteredTransport;
 
 
config MessageQ.E_maxReached  // module-wide

Error raised if all the message queue objects are taken

XDCscript usage meta-domain
MessageQ.E_maxReached = Error.Desc {
    msg: "E_maxReached: All objects in use. MessageQ.maxRuntimeEntries is %d"
};
C synopsis target-domain
extern const Error_Id MessageQ_E_maxReached;
 
 
config MessageQ.E_unregisterHeapId  // module-wide

Error raised when heapId has not been registered

XDCscript usage meta-domain
MessageQ.E_unregisterHeapId = Error.Desc {
    msg: "E_unregisterHeapId: Heap id %d not registered"
};
C synopsis target-domain
extern const Error_Id MessageQ_E_unregisterHeapId;
 
 
config MessageQ.LM_alloc  // module-wide

Logged when allocating a message

XDCscript usage meta-domain
MessageQ.LM_alloc = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_alloc: Message 0x%x (seqNum = %d, srcProc = %d) was allocated"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_alloc;
 
DETAILS
When the traceFlag is true, all message allocations are logged.
 
config MessageQ.LM_free  // module-wide

Logged when freeing a message

XDCscript usage meta-domain
MessageQ.LM_free = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_free: Message 0x%x (seqNum = %d, srcProc = %d) was freed"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_free;
 
DETAILS
When the traceFlag is true, all freeing of messages are logged. If an individual message's tracing was enabled via setMsgTrace, the MessageQ_free is also logged.
 
config MessageQ.LM_get  // module-wide

Logged when a message is received off the queue

XDCscript usage meta-domain
MessageQ.LM_get = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_get: Message 0x%x (seqNum = %d, srcProc = %d) was received by queue 0x%x"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_get;
 
DETAILS
When the traceFlag is true, all getting of messages are logged. If an individual message's tracing was enabled via setMsgTrace, the MessageQ_get is also logged.
 
config MessageQ.LM_putLocal  // module-wide

Logged when a message is placed onto a local queue

XDCscript usage meta-domain
MessageQ.LM_putLocal = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_putLocal: Message 0x%x (seqNum = %d, srcProc = %d) was placed onto queue 0x%x"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_putLocal;
 
DETAILS
When the traceFlag is true, all putting of messages are logged. If an individual message's tracing was enabled via setMsgTrace, the MessageQ_put is also logged.
 
config MessageQ.LM_putRemote  // module-wide

Logged when a message is given to a transport

XDCscript usage meta-domain
MessageQ.LM_putRemote = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_putRemote: Message 0x%x (seqNum = %d, srcProc = %d) was given to processor %d transport"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_putRemote;
 
DETAILS
When the traceFlag is true, all putting of messages to a transport are logged. If an individual message's tracing was enabled via setMsgTrace, the MessageQ_put is also logged.
 
config MessageQ.LM_rcvByTransport  // module-wide

Logged when a transport receives an incoming message

XDCscript usage meta-domain
MessageQ.LM_rcvByTransport = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_rcvByTransport: Message 0x%x (seqNum = %d, srcProc = %d) was received"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_rcvByTransport;
 
DETAILS
When the traceFlag is true, all incoming messages are logged. If an individual message's tracing was enabled via setMsgTrace, the receiving of a message is also logged.
 
config MessageQ.LM_setTrace  // module-wide

Logged when setting the trace flag on a message

XDCscript usage meta-domain
MessageQ.LM_setTrace = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_setTrace: Message 0x%x (seqNum = %d, srcProc = %d) traceFlag = %d"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_setTrace;
 
DETAILS
This is logged when tracing on a message is set via setMsgTrace.
 
config MessageQ.LM_staticMsgInit  // module-wide

Logged when statically initializing a message

XDCscript usage meta-domain
MessageQ.LM_staticMsgInit = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_staticMsgInit: Message 0x%x (seqNum = %d, srcProc = %d) was set in MessageQ_staticMsgInit"
};
C synopsis target-domain
extern const Log_Event MessageQ_LM_staticMsgInit;
 
DETAILS
When the traceFlag is true, all messages that are statically initialized via staticMsgInit are logged.
 
config MessageQ.maxNameLen  // module-wide

Maximum length for Message queue names

XDCscript usage meta-domain
MessageQ.maxNameLen = UInt 32;
C synopsis target-domain
extern const UInt MessageQ_maxNameLen;
 
 
config MessageQ.maxRuntimeEntries  // module-wide

Maximum number of MessageQs that can be dynamically created

XDCscript usage meta-domain
MessageQ.maxRuntimeEntries = UInt NameServer.ALLOWGROWTH;
C synopsis target-domain
extern const UInt MessageQ_maxRuntimeEntries;
 
 
config MessageQ.nameTableGate  // module-wide

Gate used to make the name table thread safe

XDCscript usage meta-domain
MessageQ.nameTableGate = IGateProvider.Handle null;
C synopsis target-domain
extern const IGateProvider_Handle MessageQ_nameTableGate;
 
DETAILS
This gate is used when accessing the name table during a create, delete, and open.
This gate is also used to protect MessageQ when growing internal tables in the create.
The table is in local memory, not shared memory. So a single processor gate will work.
The default will be xdc.runtime.knl.GateThread instance.
 
config MessageQ.numHeaps  // module-wide

Number of heapIds in the system

XDCscript usage meta-domain
MessageQ.numHeaps = UInt16 1;
C synopsis target-domain
extern const UInt16 MessageQ_numHeaps;
 
DETAILS
This allows MessageQ to pre-allocate the heaps table. The heaps table is used when registering heaps.
The default is 1.
There is no default heap, so unless the system is only using staticMsgInit, the application must register a heap.
 
config MessageQ.traceFlag  // module-wide

Trace setting

XDCscript usage meta-domain
MessageQ.traceFlag = Bool false;
C synopsis target-domain
extern const Bool MessageQ_traceFlag;
 
DETAILS
This flag allows the configuration of the default module trace settings.
 
metaonly config MessageQ.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
MessageQ.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config MessageQ.tableSection  // module-wide

Section name is used to place the names table

XDCscript usage meta-domain
MessageQ.tableSection = String null;
 
 
MessageQ.registerTransport( )  // module-wide

Register a transport with MessageQ

C synopsis target-domain
Bool MessageQ_registerTransport( IMessageQTransport_Handle transport, UInt16 procId, UInt priority );
 
ARGUMENTS
transport — transport to register
procId — MultiProc id that transport communicates with
priority — priority of transport
RETURNS
Whether the register was successful.
DETAILS
This API is called by the transport when it is created.
 
MessageQ.unregisterTransport( )  // module-wide

Unregister a transport with MessageQ

C synopsis target-domain
Void MessageQ_unregisterTransport( UInt16 procId, UInt priority );
 
ARGUMENTS
procId — unregister transport that communicates with this remote processor
priority — priority of transport
 
metaonly MessageQ.registerHeapMeta( )  // module-wide

Statically register a heap with MessageQ

XDCscript usage meta-domain
MessageQ.registerHeapMeta( IHeap.Handle heap, UInt16 heapId ) returns Void
 
ARGUMENTS
heap — Heap to register
heapId — heapId associated with the heap
DETAILS
Build error if heapId is in use.
 
metaonly MessageQ.registerTransportMeta( )  // module-wide

Statically register a transport with MessageQ

XDCscript usage meta-domain
MessageQ.registerTransportMeta( IMessageQTransport.Handle transport, UInt16 procId, UInt priority ) returns Void
 
ARGUMENTS
transport — transport to register
procId — procId that transport communicaties with
priority — priority of transport
DETAILS
Build error if remote processor already has a transport registered.
 
module-wide built-ins

C synopsis target-domain
Types_ModuleId MessageQ_Module_id( );
// Get this module's unique id
 
Bool MessageQ_Module_startupDone( );
// Test if this module has completed startup
 
IHeap_Handle MessageQ_Module_heap( );
// The heap from which this module allocates memory
 
Bool MessageQ_Module_hasMask( );
// Test whether this module has a diagnostics mask
 
Bits16 MessageQ_Module_getMask( );
// Returns the diagnostics mask for this module
 
Void MessageQ_Module_setMask( Bits16 mask );
// Set the diagnostics mask for this module
 
per-instance object types

C synopsis target-domain
typedef struct MessageQ_Object MessageQ_Object;
// Opaque internal representation of an instance object
 
typedef MessageQ_Object *MessageQ_Handle;
// Client reference to an instance object
 
typedef struct MessageQ_Struct MessageQ_Struct;
// Opaque client structure large enough to hold an instance object
 
MessageQ_Handle MessageQ_handle( MessageQ_Struct *structP );
// Convert this instance structure pointer into an instance handle
 
MessageQ_Struct *MessageQ_struct( MessageQ_Handle handle );
// Convert this instance handle into an instance structure pointer
 
per-instance config parameters

XDCscript usage meta-domain
var params = new MessageQ.Params;
// Instance config-params object
    params.synchronizer = ISync.Handle null;
    // ISync handle used to signal IO completion
C synopsis target-domain
typedef struct MessageQ_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
    ISync_Handle synchronizer;
    // ISync handle used to signal IO completion
} MessageQ_Params;
 
Void MessageQ_Params_init( MessageQ_Params *params );
// Initialize this config-params structure with supplier-specified defaults before instance creation
 
config MessageQ.synchronizer  // per-instance

ISync handle used to signal IO completion

XDCscript usage meta-domain
var params = new MessageQ.Params;
  ...
params.synchronizer = ISync.Handle null;
C synopsis target-domain
struct MessageQ_Params {
      ...
    ISync_Handle synchronizer;
 
DETAILS
The ISync instance is used in the get and put. The xdc.runtime.knl.ISync.signal is called as part of the put call. The xdc.runtime.knl.ISync.wait is called in the get if there are no messages present.
 
per-instance built-ins

C synopsis target-domain
Int MessageQ_Object_count( );
// The number of statically-created instance objects
 
MessageQ_Handle MessageQ_Object_get( MessageQ_Object *array, Int i );
// The handle of the i-th statically-created instance object (array == NULL)
 
MessageQ_Handle MessageQ_Object_first( );
// The handle of the first dynamically-created instance object, or NULL
 
MessageQ_Handle MessageQ_Object_next( MessageQ_Handle handle );
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle MessageQ_Object_heap( );
// The heap used to allocate dynamically-created instance objects
 
Types_Label *MessageQ_Handle_label( MessageQ_Handle handle, Types_Label *buf );
// The label associated with this instance object
 
String MessageQ_Handle_name( MessageQ_Handle handle );
// The name of this instance object
generated on Fri, 09 Apr 2010 01:41:05 GMT