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

C++ interface to psiInput_t functionality. More...

#include <PsiInterface.hpp>

Public Member Functions

 PsiInput (const char *name)
 Constructor for PsiInput. More...
 
int recv (char *data, int len)
 Receive a message shorter than PSI_MSG_MAX from the input queue. See psi_recv in PsiInterface.h for additional details. More...
 
int recv_nolimit (char **data, int len)
 Receive a message larger than PSI_MSG_MAX from the input queue. See psi_recv_nolimit in PsiInterface.h for additional details. More...
 

Detailed Description

C++ interface to psiInput_t functionality.

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

Constructor & Destructor Documentation

◆ PsiInput()

PsiInput::PsiInput ( const char *  name)
inline

Constructor for PsiInput.

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

Member Function Documentation

◆ recv()

int PsiInput::recv ( char *  data,
int  len 
)
inline

Receive a message shorter than PSI_MSG_MAX from the input queue. See psi_recv in PsiInterface.h for additional details.

Parameters
[out]datacharacter pointer to allocated buffer where the message should be saved.
[in]lenint 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()

int PsiInput::recv_nolimit ( char **  data,
int  len 
)
inline

Receive a message larger than PSI_MSG_MAX from the input queue. See psi_recv_nolimit in PsiInterface.h for additional details.

Parameters
[out]datacharacter pointer to allocated buffer where the message should be saved.
[in]lenint 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.

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