PS_Fgen_FW  4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
expression.h
Go to the documentation of this file.
1/*-
2 * BSD 2-Clause License
3 *
4 * Copyright (c) 2012-2018, Jan Breuer
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * * Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
36#ifndef SCPI_EXPRESSION_H
37#define SCPI_EXPRESSION_H
38
40#include "../../../../libraries/scpi-parser/inc/scpi/types.h"
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46 enum _scpi_expr_result_t {
47 SCPI_EXPR_OK = 0,
48 SCPI_EXPR_ERROR,
49 SCPI_EXPR_NO_MORE,
50 };
51 typedef enum _scpi_expr_result_t scpi_expr_result_t;
52
53 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);
54 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);
55 scpi_expr_result_t SCPI_ExprNumericListEntryDouble(scpi_t * context, scpi_parameter_t * param, int index, scpi_bool_t * isRange, double * valueFrom, double * valueTo);
56 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);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* SCPI_EXPRESSION_H */
SCPI Configuration.
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.
Definition expression.c:267
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.
Definition expression.c:84
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.
Definition expression.c:135
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.
Definition expression.c:166