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

C++ interface to psiAsciiTableInput_t functionality. More...

#include <PsiInterface.hpp>

Public Member Functions

 PsiAsciiTableInput (const char *name, int src_type=1)
 Constructor for PsiAsciiTableInput. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed. More...
 
 ~PsiAsciiTableInput ()
 Destructor for PsiAsciiTableInput. See cleanup_pati in PsiInterface.h for details.
 
int recv (char **data, int len)
 Recv a nolimit message from a table input queue. See at_psi_recv in PsiInterface.h for details. More...
 
int recv_row (int nargs,...)
 Recv and parse a row from the table file/queue. See at_recv_row in PsiInterface.h for details. More...
 
int recv_array (int nargs,...)
 Recv and parse columns from a table file/queue. See at_recv_array in PsiInterface.h for details. More...
 

Detailed Description

C++ interface to psiAsciiTableInput_t functionality.

The PsiAsciiTableInput class is a basic wrapper around the C psiAsciiTableInput_t structure and associated functions from the PsiInterface.h header. It provides the user with C++ style access to basic ASCII table input operations.

Constructor & Destructor Documentation

◆ PsiAsciiTableInput()

PsiAsciiTableInput::PsiAsciiTableInput ( const char *  name,
int  src_type = 1 
)
inline

Constructor for PsiAsciiTableInput. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed.

Parameters
[in]nameconstant character pointer to path of local table or name of an input queue.
[in]src_typeint 0 if name refers to a local table, 1 if it is a queue.

Member Function Documentation

◆ recv()

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

Recv a nolimit message from a table input queue. See at_psi_recv in PsiInterface.h for details.

Parameters
[in]datacharacter pointer to pointer to memory where received message should be stored. It does not need to be allocated, only defined.
[in]lenint length of allocated buffer.
Returns
int -1 if message could not be received. Length of the received message if message was received.

◆ recv_array()

int PsiAsciiTableInput::recv_array ( int  nargs,
  ... 
)
inline

Recv and parse columns from a table file/queue. See at_recv_array in PsiInterface.h for details.

Parameters
[in]nargsint Number of arguments being passed.
[in]...Pointers to pointers to memory where columns from the parsed table should be stored. They need not be allocated, only declared.
Returns
int Number of rows received. Negative values indicate errors.

◆ recv_row()

int PsiAsciiTableInput::recv_row ( int  nargs,
  ... 
)
inline

Recv and parse a row from the table file/queue. See at_recv_row in PsiInterface.h for details.

Parameters
[in]nargsint Number of arguments being passed.
[in]...Pointers to memory where variables from the parsed row should be stored.
Returns
int -1 if message could not be received or parsed, otherwise the length of the received is returned.

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