module ti.sdo.ipc.nsremote.NameServerMessageQ

Used by NameServer to communicate to remote processors

This module is used by ti.sdo.utils.NameServer to communicate to remote processors using ti.sdo.ipc.MessageQ. There needs to be one instance between each two cores in the system. Interrupts must be enabled before using this module. This module does not require any share memory.
C synopsis target-domain sourced in ti/sdo/ipc/nsremote/NameServerMessageQ.xdc
#include <ti/sdo/ipc/nsremote/NameServerMessageQ.h>
Functions
Void
Void
Void
Void
Functions common to all INameServerRemote modules
Int 
Int 
Int 
NameServerMessageQ_get// (NameServerMessageQ_Handle handle, String instanceName, String name, Ptr value, UInt32 *valueLen, ISync_Handle syncHandle, Error_Block *eb);
SizeT 
Functions common to all target instances
Functions common to all target modules
Defines
#define
Typedefs
typedef struct
typedef struct
typedef enum
typedef struct
Constants
extern const Assert_Id 
extern const Assert_Id 
extern const Error_Id 
extern const UInt16 
extern const UInt 
 
 
const NameServerMessageQ_maxNameLen

maximum number of characters for name in bytes

C synopsis target-domain
#define NameServerMessageQ_maxNameLen (UInt)32
 
 
enum NameServerMessageQ_Status

Status codes returned by certain calls

C synopsis target-domain
typedef enum NameServerMessageQ_Status {
    NameServerMessageQ_S_SUCCESS,
    NameServerMessageQ_E_FAIL,
    NameServerMessageQ_E_ERROR
} NameServerMessageQ_Status;
 
 
config NameServerMessageQ_A_nameIsTooLong  // module-wide

Assert raised if too many characters in the name

C synopsis target-domain
extern const Assert_Id NameServerMessageQ_A_nameIsTooLong;
 
 
config NameServerMessageQ_A_reservedMsgQueueId  // module-wide

Assert raised if first MessageQ created already

C synopsis target-domain
extern const Assert_Id NameServerMessageQ_A_reservedMsgQueueId;
 
 
config NameServerMessageQ_E_outOfMemory  // module-wide

Error raised if all the message queue objects are taken

C synopsis target-domain
extern const Error_Id NameServerMessageQ_E_outOfMemory;
 
 
config NameServerMessageQ_heapId  // module-wide

The heap from which to alloc a message

C synopsis target-domain
extern const UInt16 NameServerMessageQ_heapId;
 
 
config NameServerMessageQ_timeoutInMicroSecs  // module-wide

The timeout value in terms of microseconds

C synopsis target-domain
extern const UInt NameServerMessageQ_timeoutInMicroSecs;
 
DETAILS
A NameServer request will return after this amout of time without a response. The default timeout value is 1 s. To not wait, use the value of '0'. To wait forever, use '~(0)'.
 
NameServerMessageQ_attach()  // module-wide

Function is called by Ipc_attach() through NameServer_SetupProxy

C synopsis target-domain
Int NameServerMessageQ_attach(UInt16 remoteProcId, Ptr sharedAddr);
 
 
NameServerMessageQ_detach()  // module-wide

Function is called by Ipc_detach() through NameServer_SetupProxy

C synopsis target-domain
Int NameServerMessageQ_detach(UInt16 remoteProcId);
 
 
NameServerMessageQ_sharedMemReq()  // module-wide

Returns the shared memory size requirement for a single instance

C synopsis target-domain
SizeT NameServerMessageQ_sharedMemReq(Ptr sharedAddr);
 
ARGUMENTS
sharedAddr — Shared address
RETURNS
Number of MAUs needed to create the instance.
DETAILS
Function is called during Ipc_attach() through NameServer_SetupProxy.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId NameServerMessageQ_Module_id();
// Get this module's unique id
 
Bool NameServerMessageQ_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle NameServerMessageQ_Module_heap();
// The heap from which this module allocates memory
 
Bool NameServerMessageQ_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 NameServerMessageQ_Module_getMask();
// Returns the diagnostics mask for this module
 
Void NameServerMessageQ_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct NameServerMessageQ_Object NameServerMessageQ_Object;
// Opaque internal representation of an instance object
 
typedef NameServerMessageQ_Object *NameServerMessageQ_Handle;
// Client reference to an instance object
 
typedef struct NameServerMessageQ_Struct NameServerMessageQ_Struct;
// Opaque client structure large enough to hold an instance object
 
NameServerMessageQ_Handle NameServerMessageQ_handle(NameServerMessageQ_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
NameServerMessageQ_Struct *NameServerMessageQ_struct(NameServerMessageQ_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct NameServerMessageQ_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
} NameServerMessageQ_Params;
 
Void NameServerMessageQ_Params_init(NameServerMessageQ_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
Instance Creation

C synopsis target-domain
NameServerMessageQ_Handle NameServerMessageQ_create(UInt16 procId, const NameServerMessageQ_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle
 
Void NameServerMessageQ_construct(NameServerMessageQ_Struct *structP, UInt16 procId, const NameServerMessageQ_Params *params);
// Initialize a new instance object inside the provided structure
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
Instance Deletion

C synopsis target-domain
Void NameServerMessageQ_delete(NameServerMessageQ_Handle *handleP);
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
 
Void NameServerMessageQ_destruct(NameServerMessageQ_Struct *structP);
// Finalize the instance object inside the provided structure
 
NameServerMessageQ_get()  // instance
C synopsis target-domain
Int NameServerMessageQ_get(NameServerMessageQ_Handle handle, String instanceName, String name, Ptr value, UInt32 *valueLen, ISync_Handle syncHandle, Error_Block *eb);
 
ARGUMENTS
handle — handle of a previously-created NameServerMessageQ instance object
Instance Convertors

C synopsis target-domain
INameServerRemote_Handle NameServerMessageQ_Handle_upCast(NameServerMessageQ_Handle handle);
// unconditionally move one level up the inheritance hierarchy
 
NameServerMessageQ_Handle NameServerMessageQ_Handle_downCast(INameServerRemote_Handle handle);
// conditionally move one level down the inheritance hierarchy; NULL upon failure
Instance Built-Ins

C synopsis target-domain
Int NameServerMessageQ_Object_count();
// The number of statically-created instance objects
 
NameServerMessageQ_Handle NameServerMessageQ_Object_get(NameServerMessageQ_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
NameServerMessageQ_Handle NameServerMessageQ_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
NameServerMessageQ_Handle NameServerMessageQ_Object_next(NameServerMessageQ_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle NameServerMessageQ_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *NameServerMessageQ_Handle_label(NameServerMessageQ_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String NameServerMessageQ_Handle_name(NameServerMessageQ_Handle handle);
// The name of this instance object
 
XDCscript usage meta-domain sourced in ti/sdo/ipc/nsremote/NameServerMessageQ.xdc
var NameServerMessageQ = xdc.useModule('ti.sdo.ipc.nsremote.NameServerMessageQ');
module-wide constants & types
 
        const NameServerMessageQ.S_SUCCESS;
        const NameServerMessageQ.E_FAIL;
        const NameServerMessageQ.E_ERROR;
module-wide config parameters
        msg: "Too many characters in name"
    };
        msg: "MessageQ Id 0 is reserved for NameServer"
    };
        msg: "E_outOfMemory: MessageQ_alloc faild from heap: %d"
    };
 
per-instance config parameters
    var params = new NameServerMessageQ.Params// Instance config-params object;
per-instance creation
    var inst = NameServerMessageQ.create// Create an instance-object(UInt16 procId, params);
 
 
const NameServerMessageQ.maxNameLen

maximum number of characters for name in bytes

XDCscript usage meta-domain
const NameServerMessageQ.maxNameLen = 32;
 
C SYNOPSIS
 
enum NameServerMessageQ.Status

Status codes returned by certain calls

XDCscript usage meta-domain
values of type NameServerMessageQ.Status
    const NameServerMessageQ.S_SUCCESS;
    const NameServerMessageQ.E_FAIL;
    const NameServerMessageQ.E_ERROR;
 
C SYNOPSIS
 
config NameServerMessageQ.A_nameIsTooLong  // module-wide

Assert raised if too many characters in the name

XDCscript usage meta-domain
NameServerMessageQ.A_nameIsTooLong = Assert.Desc {
    msg: "Too many characters in name"
};
 
C SYNOPSIS
 
config NameServerMessageQ.A_reservedMsgQueueId  // module-wide

Assert raised if first MessageQ created already

XDCscript usage meta-domain
NameServerMessageQ.A_reservedMsgQueueId = Assert.Desc {
    msg: "MessageQ Id 0 is reserved for NameServer"
};
 
C SYNOPSIS
 
config NameServerMessageQ.E_outOfMemory  // module-wide

Error raised if all the message queue objects are taken

XDCscript usage meta-domain
NameServerMessageQ.E_outOfMemory = Error.Desc {
    msg: "E_outOfMemory: MessageQ_alloc faild from heap: %d"
};
 
C SYNOPSIS
 
config NameServerMessageQ.heapId  // module-wide

The heap from which to alloc a message

XDCscript usage meta-domain
NameServerMessageQ.heapId = UInt16 0;
 
C SYNOPSIS
 
config NameServerMessageQ.timeoutInMicroSecs  // module-wide

The timeout value in terms of microseconds

XDCscript usage meta-domain
NameServerMessageQ.timeoutInMicroSecs = UInt 1000000;
 
DETAILS
A NameServer request will return after this amout of time without a response. The default timeout value is 1 s. To not wait, use the value of '0'. To wait forever, use '~(0)'.
C SYNOPSIS
 
metaonly config NameServerMessageQ.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
NameServerMessageQ.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.
Instance Config Parameters

XDCscript usage meta-domain
var params = new NameServerMessageQ.Params;
// Instance config-params object
Instance Creation

XDCscript usage meta-domain
var params = new NameServerMessageQ.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = NameServerMessageQ.create(UInt16 procId, params);
// Create an instance-object
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
generated on Tue, 22 May 2012 23:44:59 GMT