module ti.sdo.ipc.nsremote.NameServerRemoteNotify

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.Notify and shared memory. There needs to be one instance between each two cores in the system. Interrupts must be enabled before using this module. For critical memory management, a GateMP gate can be specified. Currently supports transferring up to 300-bytes between two cores.
C synopsis target-domain sourced in ti/sdo/ipc/nsremote/NameServerRemoteNotify.xdc
#include <ti/sdo/ipc/nsremote/NameServerRemoteNotify.h>
Functions
Void
Void
Void
Void
Functions common to all INameServerRemote modules
Int 
Int 
Int 
NameServerRemoteNotify_get// (NameServerRemoteNotify_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
Typedefs
typedef struct
typedef struct
typedef struct
typedef enum
typedef struct
Constants
extern const Assert_Id 
extern const UInt 
extern const UInt 
 
 
enum NameServerRemoteNotify_Status

Status codes returned by certain calls

C synopsis target-domain
typedef enum NameServerRemoteNotify_Status {
    NameServerRemoteNotify_S_SUCCESS,
    NameServerRemoteNotify_E_FAIL,
    NameServerRemoteNotify_E_ERROR
} NameServerRemoteNotify_Status;
 
 
struct NameServerRemoteNotify_Message
C synopsis target-domain
typedef struct NameServerRemoteNotify_Message {
    Bits32 request;
    Bits32 response;
    Bits32 requestStatus;
    Bits32 value;
    Bits32 valueLen;
    Bits32 instanceName[8];
    Bits32 name[8];
    Bits32 valueBuf[75];
} NameServerRemoteNotify_Message;
 
 
config NameServerRemoteNotify_A_invalidValueLen  // module-wide

Assert raised when length of value larger then 300 bytes

C synopsis target-domain
extern const Assert_Id NameServerRemoteNotify_A_invalidValueLen;
 
 
config NameServerRemoteNotify_notifyEventId  // module-wide

The Notify event ID

C synopsis target-domain
extern const UInt NameServerRemoteNotify_notifyEventId;
 
 
config NameServerRemoteNotify_timeoutInMicroSecs  // module-wide

The timeout value in terms of microseconds

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

Function is called by Ipc_attach() through NameServer_SetupProxy

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

Function is called by Ipc_detach() through NameServer_SetupProxy

C synopsis target-domain
Int NameServerRemoteNotify_detach(UInt16 remoteProcId);
 
 
NameServerRemoteNotify_sharedMemReq()  // module-wide

Returns the shared memory size requirement for a single instance

C synopsis target-domain
SizeT NameServerRemoteNotify_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 NameServerRemoteNotify_Module_id();
// Get this module's unique id
 
Bool NameServerRemoteNotify_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle NameServerRemoteNotify_Module_heap();
// The heap from which this module allocates memory
 
Bool NameServerRemoteNotify_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 NameServerRemoteNotify_Module_getMask();
// Returns the diagnostics mask for this module
 
Void NameServerRemoteNotify_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct NameServerRemoteNotify_Object NameServerRemoteNotify_Object;
// Opaque internal representation of an instance object
 
typedef NameServerRemoteNotify_Object *NameServerRemoteNotify_Handle;
// Client reference to an instance object
 
typedef struct NameServerRemoteNotify_Struct NameServerRemoteNotify_Struct;
// Opaque client structure large enough to hold an instance object
 
NameServerRemoteNotify_Handle NameServerRemoteNotify_handle(NameServerRemoteNotify_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
NameServerRemoteNotify_Struct *NameServerRemoteNotify_struct(NameServerRemoteNotify_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct NameServerRemoteNotify_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
    GateMP_Handle gate;
    // GateMP used for critical region management of the shared memory
    Ptr sharedAddr;
    // Physical address of the shared memory
} NameServerRemoteNotify_Params;
 
Void NameServerRemoteNotify_Params_init(NameServerRemoteNotify_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
 
config NameServerRemoteNotify_gate  // instance

GateMP used for critical region management of the shared memory

C synopsis target-domain
      ...
    GateMP_Handle gate;
 
DETAILS
Using the default value of NULL will result in the default GateMP being used for context protection.
 
config NameServerRemoteNotify_sharedAddr  // instance

Physical address of the shared memory

C synopsis target-domain
      ...
    Ptr sharedAddr;
 
DETAILS
The shared memory that will be used for maintaining shared state information. This value must be the same for both processors when creating the instance between a pair of processors.
Instance Creation

C synopsis target-domain
NameServerRemoteNotify_Handle NameServerRemoteNotify_create(UInt16 procId, const NameServerRemoteNotify_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle
 
Void NameServerRemoteNotify_construct(NameServerRemoteNotify_Struct *structP, UInt16 procId, const NameServerRemoteNotify_Params *params, Error_Block *eb);
// 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 NameServerRemoteNotify_delete(NameServerRemoteNotify_Handle *handleP);
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
 
Void NameServerRemoteNotify_destruct(NameServerRemoteNotify_Struct *structP);
// Finalize the instance object inside the provided structure
 
NameServerRemoteNotify_get()  // instance
C synopsis target-domain
Int NameServerRemoteNotify_get(NameServerRemoteNotify_Handle handle, String instanceName, String name, Ptr value, UInt32 *valueLen, ISync_Handle syncHandle, Error_Block *eb);
 
ARGUMENTS
handle — handle of a previously-created NameServerRemoteNotify instance object
Instance Convertors

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

C synopsis target-domain
Int NameServerRemoteNotify_Object_count();
// The number of statically-created instance objects
 
NameServerRemoteNotify_Handle NameServerRemoteNotify_Object_get(NameServerRemoteNotify_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
NameServerRemoteNotify_Handle NameServerRemoteNotify_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
NameServerRemoteNotify_Handle NameServerRemoteNotify_Object_next(NameServerRemoteNotify_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle NameServerRemoteNotify_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *NameServerRemoteNotify_Handle_label(NameServerRemoteNotify_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String NameServerRemoteNotify_Handle_name(NameServerRemoteNotify_Handle handle);
// The name of this instance object
 
XDCscript usage meta-domain sourced in ti/sdo/ipc/nsremote/NameServerRemoteNotify.xdc
var NameServerRemoteNotify = xdc.useModule('ti.sdo.ipc.nsremote.NameServerRemoteNotify');
module-wide constants & types
        const NameServerRemoteNotify.S_SUCCESS;
        const NameServerRemoteNotify.E_FAIL;
        const NameServerRemoteNotify.E_ERROR;
 
    var obj = new NameServerRemoteNotify.Message// ;
        obj.request = Bits32  ...
        obj.response = Bits32  ...
        obj.requestStatus = Bits32  ...
        obj.value = Bits32  ...
        obj.valueLen = Bits32  ...
        obj.instanceName = Bits32[8]  ...
        obj.name = Bits32[8]  ...
        obj.valueBuf = Bits32[75]  ...
module-wide config parameters
        msg: "A_invalidValueLen: Invalid valueLen (too large)"
    };
 
per-instance config parameters
    var params = new NameServerRemoteNotify.Params// Instance config-params object;
        params.sharedAddr// Physical address of the shared memory = Ptr null;
per-instance creation
    var inst = NameServerRemoteNotify.create// Create an instance-object(UInt16 procId, params);
 
 
enum NameServerRemoteNotify.Status

Status codes returned by certain calls

XDCscript usage meta-domain
values of type NameServerRemoteNotify.Status
    const NameServerRemoteNotify.S_SUCCESS;
    const NameServerRemoteNotify.E_FAIL;
    const NameServerRemoteNotify.E_ERROR;
 
C SYNOPSIS
 
struct NameServerRemoteNotify.Message
XDCscript usage meta-domain
var obj = new NameServerRemoteNotify.Message;
 
    obj.request = Bits32  ...
    obj.response = Bits32  ...
    obj.requestStatus = Bits32  ...
    obj.value = Bits32  ...
    obj.valueLen = Bits32  ...
    obj.instanceName = Bits32[8]  ...
    obj.name = Bits32[8]  ...
    obj.valueBuf = Bits32[75]  ...
 
C SYNOPSIS
 
config NameServerRemoteNotify.A_invalidValueLen  // module-wide

Assert raised when length of value larger then 300 bytes

XDCscript usage meta-domain
NameServerRemoteNotify.A_invalidValueLen = Assert.Desc {
    msg: "A_invalidValueLen: Invalid valueLen (too large)"
};
 
C SYNOPSIS
 
config NameServerRemoteNotify.notifyEventId  // module-wide

The Notify event ID

XDCscript usage meta-domain
NameServerRemoteNotify.notifyEventId = UInt 4;
 
C SYNOPSIS
 
config NameServerRemoteNotify.timeoutInMicroSecs  // module-wide

The timeout value in terms of microseconds

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

Common module configuration parameters

XDCscript usage meta-domain
NameServerRemoteNotify.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 NameServerRemoteNotify.rovViewInfo  // module-wide
XDCscript usage meta-domain
NameServerRemoteNotify.rovViewInfo = ViewInfo.Instance ViewInfo.create;
 
Instance Config Parameters

XDCscript usage meta-domain
var params = new NameServerRemoteNotify.Params;
// Instance config-params object
    params.gate = GateMP.Handle null;
    // GateMP used for critical region management of the shared memory
    params.sharedAddr = Ptr null;
    // Physical address of the shared memory
 
config NameServerRemoteNotify.gate  // instance

GateMP used for critical region management of the shared memory

XDCscript usage meta-domain
var params = new NameServerRemoteNotify.Params;
  ...
params.gate = GateMP.Handle null;
 
DETAILS
Using the default value of NULL will result in the default GateMP being used for context protection.
C SYNOPSIS
 
config NameServerRemoteNotify.sharedAddr  // instance

Physical address of the shared memory

XDCscript usage meta-domain
var params = new NameServerRemoteNotify.Params;
  ...
params.sharedAddr = Ptr null;
 
DETAILS
The shared memory that will be used for maintaining shared state information. This value must be the same for both processors when creating the instance between a pair of processors.
C SYNOPSIS
Instance Creation

XDCscript usage meta-domain
var params = new NameServerRemoteNotify.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = NameServerRemoteNotify.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 Sat, 11 Feb 2012 00:38:06 GMT