Functions | Defines | Data Structures | Typedefs

RcmServer

Remote Command Message Server Module. An RcmServer processes inbound messages received from an RcmClient. More...

Functions

Int RcmServer_addSymbol (RcmServer_Handle handle, String name, RcmServer_MsgFxn addr, UInt32 *index)
 Add a symbol to the server's function table.
Int RcmServer_construct (RcmServer_Struct *structPtr, String name, const RcmServer_Params *params)
 Initialize a new instance object inside the provided structure.
Int RcmServer_create (String name, RcmServer_Params *params, RcmServer_Handle *handle)
 Create an RcmServer instance.
Int RcmServer_delete (RcmServer_Handle *handlePtr)
 Delete an RcmServer instance.
Int RcmServer_destruct (RcmServer_Struct *structPtr)
 Finalize the instance object inside the provided structure.
Void RcmServer_exit (Void)
 Finalize the RcmServer module.
Void RcmServer_init (Void)
 Initialize the RcmServer module.
Void RcmServer_Params_init (RcmServer_Params *params)
 Initialize the instance create params structure.
Int RcmServer_removeSymbol (RcmServer_Handle handle, String name)
 Remove a symbol and from the server's function table.
Int RcmServer_start (RcmServer_Handle handle)
 Start the server.

Defines

#define RcmServer_S_SUCCESS   (0)
 Success return code.
#define RcmServer_E_FAIL   (-1)
 General failure return code.
#define RcmServer_E_NOMEMORY   (-2)
 The was insufficient memory left on the heap.
#define RcmServer_E_SYMBOLNOTFOUND   (-3)
 The given symbol was not found in the server's symbol table.
#define RcmServer_E_SYMBOLSTATIC   (-4)
 The given symbols is in the static table, it cannot be removed.
#define RcmServer_E_SYMBOLTABLEFULL   (-5)
 The server's symbol table is full.

Data Structures

struct  RcmServer_FxnDesc
 Function descriptor. More...
struct  RcmServer_FxnDescAry
 Function descriptor array. More...
struct  RcmServer_ThreadPoolDesc
 Worker pool descriptor. More...
struct  RcmServer_ThreadPoolDescAry
 Worker pool descriptor array. More...
struct  RcmServer_Params
 RcmServer Instance create parameters. More...
struct  RcmServer_Struct
 Opaque client structure large enough to hold an instance object. More...

Typedefs

typedef Int32(* RcmServer_MsgFxn )(UInt32, UInt32 *)
 Remote function type.
typedef struct
RcmServer_Object_tag * 
RcmServer_Handle
 RcmServer instance object handle.

Detailed Description

Remote Command Message Server Module. An RcmServer processes inbound messages received from an RcmClient.

The RcmServer module is used to create an server instance. RcmClients send their messages to only one RcmServer instance for processing. The server instance can be created with a function dispatch table and additional tables can be added as requested by the clients.

Diagnostics

Diags_INFO - full detail log events Diags_USER1 - message processing

See also:
RcmClient
RCM Overview

Function Documentation

Int RcmServer_addSymbol ( RcmServer_Handle  handle,
String  name,
RcmServer_MsgFxn  addr,
UInt32 *  index 
)

Add a symbol to the server's function table.

This function adds a new symbol to the server's function table. This is useful for supporting Dynamic Load Libraries (DLLs).

Parameters:
[in]handleHandle to an instance object.
[in]nameThe function's name.
[in]addrThe function's address in the server's address space.
[out]indexThe function's index value to be used in the RcmClient_Message.fxnIdx field.
Return values:
RcmClient_S_SUCCESS
RcmServer_E_NOMEMORY
RcmServer_E_SYMBOLTABLEFULL
Int RcmServer_construct ( RcmServer_Struct structPtr,
String  name,
const RcmServer_Params params 
)

Initialize a new instance object inside the provided structure.

This function is the same as RcmServer_create() except that it does not allocate memory for the instance object. The instance object is constructed inside the provided structure. Call RcmServer_destruct() to finalize a constructed instance object.

Parameters:
[in]structPtrA pointer to an allocated structure.
[in]nameThe name of the server. The RcmClient will locate a server instance using this name. It must be unique to the system.
[in]paramsThe create params used to customize the instance object.
Return values:
RcmClient_S_SUCCESS
RcmServer_E_FAIL
RcmServer_E_NOMEMORY
See also:
RcmServer_create
Int RcmServer_create ( String  name,
RcmServer_Params params,
RcmServer_Handle handle 
)

Create an RcmServer instance.

A server instance is used to execute functions on behalf of an RcmClient instance. There can be multiple server instances on any given CPU. The servers typically reside on a remote CPU from the RcmClient instance.

Parameters:
[in]nameThe name of the server. The RcmClient will locate a server instance using this name. It must be unique to the system.
[in]paramsThe create params used to customize the instance object.
[out]handleAn opaque handle to the created instance object.
Return values:
RcmClient_S_SUCCESS
RcmServer_E_FAIL
RcmServer_E_NOMEMORY
Int RcmServer_delete ( RcmServer_Handle handlePtr )

Delete an RcmServer instance.

Parameters:
[in,out]handlePtrHandle to the instance object to delete.
Int RcmServer_destruct ( RcmServer_Struct structPtr )

Finalize the instance object inside the provided structure.

Parameters:
[in]structPtrA pointer to the structure containing the instance object to finalize.
Void RcmServer_exit ( Void   )

Finalize the RcmServer module.

This function is used to finalize the RcmServer module. Any resources acquired by RcmServer_init() will be released. Do not call any RcmServer functions after calling RcmServer_exit().

This function must be serialized by the caller.

Void RcmServer_init ( Void   )

Initialize the RcmServer module.

This function is used to initialize the RcmServer module. Call this function before calling any other RcmServer function.

This function must be serialized by the caller

Void RcmServer_Params_init ( RcmServer_Params params )

Initialize the instance create params structure.

Int RcmServer_removeSymbol ( RcmServer_Handle  handle,
String  name 
)

Remove a symbol and from the server's function table.

Useful when unloading a DLL from the server.

Parameters:
[in]handleHandle to an instance object.
[in]nameThe function's name.
Return values:
RcmClient_S_SUCCESS
RcmServer_E_SYMBOLNOTFOUND
RcmServer_E_SYMBOLSTATIC
Int RcmServer_start ( RcmServer_Handle  handle )

Start the server.

The server is created in stop mode. It will not start processing messages until it has been started.

Parameters:
[in]handleHandle to an instance object.
Return values:
RcmClient_S_SUCCESS
RcmServer_E_FAIL

Define Documentation

#define RcmServer_S_SUCCESS   (0)

Success return code.

#define RcmServer_E_FAIL   (-1)

General failure return code.

#define RcmServer_E_NOMEMORY   (-2)

The was insufficient memory left on the heap.

#define RcmServer_E_SYMBOLNOTFOUND   (-3)

The given symbol was not found in the server's symbol table.

This error could occur if the symbol spelling is incorrect or if the RcmServer is still loading its symbol table.

#define RcmServer_E_SYMBOLSTATIC   (-4)

The given symbols is in the static table, it cannot be removed.

All symbols installed at instance create time are added to the static symbol table. They cannot be removed. The statis symbol table must remain intact for the lifespan of the server instance.

#define RcmServer_E_SYMBOLTABLEFULL   (-5)

The server's symbol table is full.

The symbol table is full. You must remove some symbols before any new symbols can be added.


Typedef Documentation

typedef Int32(* RcmServer_MsgFxn)(UInt32, UInt32 *)

Remote function type.

All functions executed by the RcmServer must be of this type. Typically, these functions are simply wrappers to the vendor function. The server invokes this remote function by passing in the RcmClient_Message.dataSize field and the address of the RcmClient_Message.data array.

  RcmServer_MsgFxn fxn = ...;
  RcmClient_Message *msg = ...;
  msg->result = (*fxn)(msg->dataSize, msg->data);
typedef struct RcmServer_Object_tag* RcmServer_Handle

RcmServer instance object handle.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated