AMU Library 3.0
C/C++ library for communicating with AMU (Aerospace Measurement Unit) devices
Loading...
Searching...
No Matches
units.h
Go to the documentation of this file.
1/*-
2 * Copyright (c) 2012-2013 Jan Breuer,
3 *
4 * All Rights Reserved
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 * 1. Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
36
37#ifndef SCPI_UNITS_H
38#define SCPI_UNITS_H
39
40#include "types.h"
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46 extern const scpi_unit_def_t scpi_units_def[];
47 extern const scpi_choice_def_t scpi_special_numbers_def[];
48
49 scpi_bool_t SCPI_ParamNumber(scpi_t * context, const scpi_choice_def_t * special, scpi_number_t * value, scpi_bool_t mandatory);
50
52 size_t SCPI_NumberToStr(scpi_t * context, const scpi_choice_def_t * special, scpi_number_t * value, char * str, size_t len);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* SCPI_UNITS_H */
59
bool scpi_bool_t
Definition types.h:67
scpi_token_t scpi_parameter_t
Definition types.h:362
const scpi_choice_def_t scpi_special_numbers_def[]
Definition units.c:275
const scpi_unit_def_t scpi_units_def[]
Definition units.c:65
scpi_bool_t SCPI_ParamTranslateNumberVal(scpi_t *context, scpi_parameter_t *parameter)
scpi_bool_t SCPI_ParamNumber(scpi_t *context, const scpi_choice_def_t *special, scpi_number_t *value, scpi_bool_t mandatory)
Definition units.c:371
size_t SCPI_NumberToStr(scpi_t *context, const scpi_choice_def_t *special, scpi_number_t *value, char *str, size_t len)
Definition units.c:475