OpenClovis Logo

Files | Classes | Macros | Typedefs | Functions
API Reference Pages
Remote Method Dispatch

Defines, Structures, Typedefs, Functions. More...

Files

file  clRmdApi.h
 Header file of RMD Interface.
file  clRmdConfigApi.h
 Header file of config RMD definitions.
file  clRmdErrors.h
 Header file of RMD related Error Codes.

Classes

struct  ClRmdAsyncOptions
 This structure ClRmdAsyncOptionsT contains additional asynchronous call parameters. More...
struct  ClRmdOptions
 This is a structure to pass optional parameters. More...

Macros

#define CL_RMD_CALL_ASYNC   (1<<0)
 0x0001 If you want to make a synchronous call, set this bit to 0.
#define CL_RMD_CALL_ATMOST_ONCE   (1<<2)
 0x0004 If you want to perform Atmost Once Semantics, you are required to set this bit to 1.
#define CL_RMD_CALL_DO_NOT_OPTIMIZE   (1<<3)
 0x0008 If you want to make a non-optimized RMD call, you are required to set this bit to 1.
#define CL_RMD_CALL_IN_SESSION   (1<<5)
 0x0020 If you want to use the services of the same EO instance as in previous call, you are required to set this bit.
#define CL_RMD_CALL_NEED_REPLY   (1<<1)
 0x0002 If you do not require to check the reply, set this bit to 0.
#define CL_RMD_CALL_NON_PERSISTENT   (1<<4)
 0x0010 If you want RMD to use and free its input message, you are required to set this bit to 1.
#define CL_RMD_DEFAULT_OPTIONS
 Default values for the options.
#define CL_RMD_DEFAULT_PRIORITY   CL_IOC_DEFAULT_PRIORITY
 Default priority of the RMD call.
#define CL_RMD_DEFAULT_RETRIES   5
 Default retries for the RMD call.
#define CL_RMD_DEFAULT_TIMEOUT   10000
 Default timeout for the RMD call - 10 seconds QNX has a traffic shaper leaky bucket.
#define CL_RMD_DEFAULT_TRANSPORT_HANDLE   0
 Default transport handle for the RMD call.
#define CL_RMD_RC(ERROR_CODE)   CL_RC(CL_CID_RMD, (ERROR_CODE))
 RMD Specific Error Codes.
#define CL_RMD_TIMEOUT_FOREVER   -1
 When this is used, RMD waits forever for the call to complete and does not issue timeouts.

Typedefs

typedef void(* ClRmdAsyncCallbackT )(ClRcT retCode, ClPtrT pCookie, ClBufferHandleT inMsgHdl, ClBufferHandleT outMsgHdl)
 Callback function pointer for the async RMD call.
typedef struct ClRmdAsyncOptions ClRmdAsyncOptionsT
 This structure ClRmdAsyncOptionsT contains additional asynchronous call parameters.
typedef struct ClRmdOptions ClRmdOptionsT
 This is a structure to pass optional parameters.

Functions

ClRcT clRmdWithMsg (CL_IN ClIocAddressT remoteObjAddr, CL_IN ClUint32T funcId, CL_IN ClBufferHandleT inMsgHdl, CL_OUT ClBufferHandleT outMsgHdl, CL_IN ClUint32T flags, CL_IN ClRmdOptionsT *pOptions, CL_IN ClRmdAsyncOptionsT *pAsyncOptions)
 Invokes a Remote Function Call when the parameters are passed as messages.

Detailed Description

Defines, Structures, Typedefs, Functions.

Macro Definition Documentation

#define CL_RMD_CALL_ASYNC   (1<<0)

0x0001 If you want to make a synchronous call, set this bit to 0.

When this bit is set to 1, it is an asynchronous call.

#define CL_RMD_DEFAULT_TIMEOUT   10000

Default timeout for the RMD call - 10 seconds QNX has a traffic shaper leaky bucket.

So have higher timeouts.

Typedef Documentation

typedef void(* ClRmdAsyncCallbackT)(ClRcT retCode, ClPtrT pCookie, ClBufferHandleT inMsgHdl, ClBufferHandleT outMsgHdl)

Callback function pointer for the async RMD call.

Parameters
retCodeThe return code of the remote function or RMD return code.
pCookieThe value that you passed when you made the RMD call.
inMsgHdlInput passed when making the call.
outMsgHdlThis is the output from the remote server. You must "free" this pointer and ONLY this pointer.
Description:
Callback function pointer for the asynchronous call. You need to free the output message only.
See Also
clRmdWithMsg()

This structure ClRmdAsyncOptionsT contains additional asynchronous call parameters.

It is used to pass these parameters.

Function Documentation

ClRcT clRmdWithMsg ( CL_IN ClIocAddressT  remoteObjAddr,
CL_IN ClUint32T  funcId,
CL_IN ClBufferHandleT  inMsgHdl,
CL_OUT ClBufferHandleT  outMsgHdl,
CL_IN ClUint32T  flags,
CL_IN ClRmdOptionsT pOptions,
CL_IN ClRmdAsyncOptionsT pAsyncOptions 
)

Invokes a Remote Function Call when the parameters are passed as messages.

Header File:
clRmdApi.h
Parameters
remoteObjAddrAddress of the destination Object.
funcIdFunction Id to be executed.
inMsgHdlCreated and freed by the caller except when CL_RMD_CALL_NON_PERSISTENT is set. In this case, RMD frees the message. NULL indicates no value is passed to the remote end by you.
outMsgHdl[out] Created and freed by the caller. If it is NULL and CL_RMD_CALL_NEED_REPLY flag is set, CL_RMD_RC(CL_ERR_INVALID_PARAM) will be returned.
flagsIt informs RMD to decide the type of call. You must specify the flag to indicate whether the call is Synchronous or Asynchronous, or whether Reply and Atmost Once semantics are required or not.
optionsOptional parameter that can be passed like- priority, timeout, cookie, retries, and callback function.
If it is NULL, default values be assumed.
pAsyncOptionsThis is to be passed only if the call made is asynchronous. In this parameter, optional parameters, like cookies and callback functions can be passed.
Return values
CL_OKThe API executed successfully
Return values
CL_ERR_NO_MEMORYIf system memory is no longer available
CL_ERR_TIMEOUTIf reply is not received in specified time or an invalid IOC port id is passed
CL_ERR_NULL_PTROn passing a NULL pointer
CL_INVALID_PARAMETEROn passing invalid parameters.
CL_ERR_NOT_INITIALIZEDIf RMD Library is not initialized.
CL_ERR_NOT_IMPLEMENTEDIf call type is not supported. It also returns some OS defined error codes.
Error Codes listed above are generated by RMD, therefore the return value contains the RMD Component Identifier.
Return values
CL_EO_ERR_FUNC_NOT_REGISTEREDIf the requested function is not registered.
CL_EO_ERR_EO_SUSPENDEDIf the remote EO is in suspended state.
Error codes listed above are generated by EO, therefore the return value contains the EO Component Identifier.
Return values
CL_IOC_ERR_RECV_UNBLOCKEDIf the receiver is unblocked.
CL_IOC_ERR_HOST_UNREACHABLEIf an invalid node address is passed.
CL_IOC_ERR_COMP_UNREACHABLEIf an invalid commport address is passed.
CL_ERR_NOT_EXISTIf an invalid logical address is passed.
Error codes listed above are generated by IOC, therefore the return value contains the IOC Component Identifier.
Description:
This API is used to invoke a Remote Function Call. You must pass the the the following parameters.
  • destination address, that is, the remote ObjectId where the function is exposed,
  • the functionId to invoke
  • input parameter in a message
  • output message to receive the reply
  • RMD specific flags
  • RMD options
  • RMD asynchronous calls options
While making an asynchronous call, you need to pass options like- priority, timeout value, retries, cookie, and the callback function in a structure ClRmdAsyncOptions. But all the parameters are not mandatory for each and every call. As in case of synchronous call, cookie and callback function are not required to pass.
The remote function is identifed by the remote object address and the Function ID.
Library File:
libClRmd

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen