C++ interface to psiAsciiTableInput_t functionality.
More...
#include <PsiInterface.hpp>
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.
◆ 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] | name | constant character pointer to path of local table or name of an input queue. |
[in] | src_type | int 0 if name refers to a local table, 1 if it is a queue. |
◆ 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] | data | character pointer to pointer to memory where received message should be stored. It does not need to be allocated, only defined. |
[in] | len | int 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] | nargs | int 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] | nargs | int 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: