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

Flag for checking if CisInterface.hpp has already been included. More...

#include <CisInterface.hpp>

Inheritance diagram for CisInput:
CisAsciiFileInput CisObjInput CisPlyInput CisAsciiArrayInput CisAsciiArrayInput_local CisAsciiFileInput_local CisAsciiTableInput CisAsciiTableInput_local

Public Member Functions

 CisInput (const char *name)
 Constructor for CisInput. More...
 
 CisInput (cisInput_t x)
 Empty constructor for inheritance.
 
 CisInput (const char *name, const char *fmt)
 Constructor for CisInput with format. More...
 
void _destroy_pi ()
 Alias to allow freeing of underlying C struct at the class level.
 
 ~CisInput ()
 Destructor for CisInput. See cis_free in CisInterface.h for details.
 
cisInput_t pi ()
 Return the cisInput_t structure. More...
 
int recv (char *data, const size_t len)
 Receive a message shorter than CIS_MSG_MAX from the input queue. See cis_recv in CisInterface.h for additional details. More...
 
int recv (const int nargs,...)
 Receive and parse a message shorter than CIS_MSG_MAX from the input queue. See cisRecv from CisInterface.h for details. More...
 
int recv_nolimit (char **data, const size_t len)
 Receive a message larger than CIS_MSG_MAX from the input queue. See cis_recv_nolimit in CisInterface.h for additional details. More...
 
int recv_nolimit (const int nargs,...)
 Receive and parse a message larger than CIS_MSG_MAX from the input queue. See cisRecv_nolimit from CisInterface.h for details. More...
 

Detailed Description

Flag for checking if CisInterface.hpp has already been included.

C++ interface to cisInput_t functionality.

The CisInput class is a basic wrapper around the C cisInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic input via an IPC queue.

Constructor & Destructor Documentation

◆ CisInput() [1/2]

CisInput::CisInput ( const char *  name)
inline

Constructor for CisInput.

Parameters
[in]nameconstant character pointer to name of input queue. This should be the argument to an input driver in the yaml specification file.

◆ CisInput() [2/2]

CisInput::CisInput ( const char *  name,
const char *  fmt 
)
inline

Constructor for CisInput with format.

Parameters
[in]nameconstant character pointer to name of input queue. This should be the argument to an input driver in the yaml specification file.
[in]fmtcharacter pointer to format string for parsing messages.

Member Function Documentation

◆ pi()

cisInput_t CisInput::pi ( )
inline

Return the cisInput_t structure.

Returns
cisInput_t structure underlying the class.

◆ recv() [1/2]

int CisInput::recv ( char *  data,
const size_t  len 
)
inline

Receive a message shorter than CIS_MSG_MAX from the input queue. See cis_recv in CisInterface.h for additional details.

Parameters
[out]datacharacter pointer to allocated buffer where the message should be saved.
[in]lensize_t length of the allocated message buffer in bytes.
Returns
int -1 if message could not be received. Length of the received message if message was received.

◆ recv() [2/2]

int CisInput::recv ( const int  nargs,
  ... 
)
inline

Receive and parse a message shorter than CIS_MSG_MAX from the input queue. See cisRecv from CisInterface.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.

◆ recv_nolimit() [1/2]

int CisInput::recv_nolimit ( char **  data,
const size_t  len 
)
inline

Receive a message larger than CIS_MSG_MAX from the input queue. See cis_recv_nolimit in CisInterface.h for additional details.

Parameters
[out]datacharacter pointer to allocated buffer where the message should be saved.
[in]lensize_t length of the allocated message buffer in bytes.
Returns
int -1 if message could not be received. Length of the received message if message was received.

◆ recv_nolimit() [2/2]

int CisInput::recv_nolimit ( const int  nargs,
  ... 
)
inline

Receive and parse a message larger than CIS_MSG_MAX from the input queue. See cisRecv_nolimit from CisInterface.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.

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