cis_config
Public Member Functions | List of all members
PsiRpc Class Reference

C++ interface to psiRpc_t functionality. More...

#include <PsiInterface.hpp>

Inheritance diagram for PsiRpc:
PsiRpcClient PsiRpcServer

Public Member Functions

 PsiRpc (const char *outName, char *outFormat, const char *inName, char *inFormat)
 Constructor for PsiRpc. More...
 
psiRpc_t pi ()
 Return the psiRpc_t structure. More...
 
int send (int nargs,...)
 Format and send a message to an RPC output queue. See rpcSend from PsiInterface.h for details. More...
 
int recv (int nargs,...)
 Receive and parse a message from an RPC input queue. See rpcRecv from PsiInterface.h for details. More...
 

Detailed Description

C++ interface to psiRpc_t functionality.

The PsiRpc class is a basic wrapper around the C psiRpc_t structure and associated functions from the PsiInterface.h header. It provides the user with C++ style access to basic RPC messaging via IPC queues.

Constructor & Destructor Documentation

◆ PsiRpc()

PsiRpc::PsiRpc ( const char *  outName,
char *  outFormat,
const char *  inName,
char *  inFormat 
)
inline

Constructor for PsiRpc.

Parameters
[in]outNameconstant character pointer name of the output queue.
[in]outFormatcharacter pointer to format that should be used for formatting output.
[in]inNameconstant character pointer to name of the input queue.
[in]inFormatcharacter pointer to format that should be used for parsing input.

Member Function Documentation

◆ pi()

psiRpc_t PsiRpc::pi ( )
inline

Return the psiRpc_t structure.

Returns
psiRpc_t structure underlying the class.

◆ recv()

int PsiRpc::recv ( int  nargs,
  ... 
)
inline

Receive and parse a message from an RPC input queue. See rpcRecv from PsiInterface.h for details.

Parameters
[in]nargsint Number of arguments being passed.
[out]...mixed arguments that should be assigned parameters extracted using the format string. Since these will be assigned, they should be pointers to memory that has already been allocated.
Returns
integer specifying if the receive was succesful. Values >= 0 indicate success.

◆ send()

int PsiRpc::send ( int  nargs,
  ... 
)
inline

Format and send a message to an RPC output queue. See rpcSend from PsiInterface.h for details.

Parameters
[in]nargsint Number of arguments being passed.
[in]...arguments for formatting.
Returns
integer specifying if the send was succesful. Values >= 0 indicate success.

The documentation for this class was generated from the following file: