Expressions handling.
More...
#include "../../../../libraries/scpi-parser/inc/scpi/config.h"
#include "../../../../libraries/scpi-parser/inc/scpi/types.h"
Go to the source code of this file.
|
typedef enum _scpi_expr_result_t | scpi_expr_result_t |
|
|
enum | _scpi_expr_result_t { SCPI_EXPR_OK = 0
, SCPI_EXPR_ERROR
, SCPI_EXPR_NO_MORE
} |
|
|
scpi_expr_result_t | SCPI_ExprNumericListEntry (scpi_t *context, scpi_parameter_t *param, int index, scpi_bool_t *isRange, scpi_parameter_t *valueFrom, scpi_parameter_t *valueTo) |
| Parse entry on specified position.
|
|
scpi_expr_result_t | SCPI_ExprNumericListEntryInt (scpi_t *context, scpi_parameter_t *param, int index, scpi_bool_t *isRange, int32_t *valueFrom, int32_t *valueTo) |
| Parse entry on specified position and convert result to int32_t.
|
|
scpi_expr_result_t | SCPI_ExprNumericListEntryDouble (scpi_t *context, scpi_parameter_t *param, int index, scpi_bool_t *isRange, double *valueFrom, double *valueTo) |
| Parse entry on specified position and convert result to double.
|
|
scpi_expr_result_t | SCPI_ExprChannelListEntry (scpi_t *context, scpi_parameter_t *param, int index, scpi_bool_t *isRange, int32_t *valuesFrom, int32_t *valuesTo, size_t length, size_t *dimensions) |
| Parse one list entry at specific position e.g.
|
|
◆ SCPI_ExprChannelListEntry()
scpi_expr_result_t SCPI_ExprChannelListEntry |
( |
scpi_t * | context, |
|
|
scpi_parameter_t * | param, |
|
|
int | index, |
|
|
scpi_bool_t * | isRange, |
|
|
int32_t * | valuesFrom, |
|
|
int32_t * | valuesTo, |
|
|
size_t | length, |
|
|
size_t * | dimensions ) |
Parse one list entry at specific position e.g.
"1!2:5!6"
- Parameters
-
context | |
param | |
index | |
isRange | return true if it is range |
valuesFrom | return array of values from |
valuesTo | return array of values to |
length | length of values arrays |
dimensions | real number of dimensions |
◆ SCPI_ExprNumericListEntry()
Parse entry on specified position.
- Parameters
-
context | scpi context |
param | input parameter |
index | index of position (start from 0) |
isRange | return true if expression at index was range |
valueFrom | return value from |
valueTo | return value to |
- Returns
- SCPI_EXPR_OK - parsing was succesful SCPI_EXPR_ERROR - parser error SCPI_EXPR_NO_MORE - no more data
- See also
- SCPI_ExprNumericListEntryInt, SCPI_ExprNumericListEntryDouble
◆ SCPI_ExprNumericListEntryDouble()
scpi_expr_result_t SCPI_ExprNumericListEntryDouble |
( |
scpi_t * | context, |
|
|
scpi_parameter_t * | param, |
|
|
int | index, |
|
|
scpi_bool_t * | isRange, |
|
|
double * | valueFrom, |
|
|
double * | valueTo ) |
Parse entry on specified position and convert result to double.
- Parameters
-
context | scpi context |
param | input parameter |
index | index of position (start from 0) |
isRange | return true if expression at index was range |
valueFrom | return value from |
valueTo | return value to |
- Returns
- SCPI_EXPR_OK - parsing was succesful SCPI_EXPR_ERROR - parser error SCPI_EXPR_NO_MORE - no more data
- See also
- SCPI_ExprNumericListEntry, SCPI_ExprNumericListEntryInt
◆ SCPI_ExprNumericListEntryInt()
scpi_expr_result_t SCPI_ExprNumericListEntryInt |
( |
scpi_t * | context, |
|
|
scpi_parameter_t * | param, |
|
|
int | index, |
|
|
scpi_bool_t * | isRange, |
|
|
int32_t * | valueFrom, |
|
|
int32_t * | valueTo ) |
Parse entry on specified position and convert result to int32_t.
- Parameters
-
context | scpi context |
param | input parameter |
index | index of position (start from 0) |
isRange | return true if expression at index was range |
valueFrom | return value from |
valueTo | return value to |
- Returns
- SCPI_EXPR_OK - parsing was succesful SCPI_EXPR_ERROR - parser error SCPI_EXPR_NO_MORE - no more data
- See also
- SCPI_ExprNumericListEntry, SCPI_ExprNumericListEntryDouble