mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Doc update
This commit is contained in:
parent
50c14e79ae
commit
f63ec3a6c9
3 changed files with 108 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
|||
allOf:
|
||||
- $ref: common.yaml
|
||||
- $ref: rms.yaml
|
||||
- type: object
|
||||
required:
|
||||
- window_size
|
||||
properties:
|
||||
window_size:
|
||||
type: integer
|
||||
min: 1
|
||||
example: 1000
|
||||
description: The number of samples in the window.
|
||||
|
|
|
@ -8,3 +8,94 @@ allOf:
|
|||
$ref: ../format_spec.yaml
|
||||
|
||||
- $ref: ../node.yaml
|
||||
- type: object
|
||||
required:
|
||||
- sample_rate
|
||||
properties:
|
||||
interface_type:
|
||||
type: string
|
||||
enum:
|
||||
- usb
|
||||
- bluetooth
|
||||
- ethernet
|
||||
- any
|
||||
description: The interface to which the ADC is connected. Check manual for your device.
|
||||
device_id:
|
||||
type: string
|
||||
example: 10000
|
||||
description: The used device type. If empty it is auto detected.
|
||||
in:
|
||||
type: object
|
||||
description: Configuration for the ul201
|
||||
signals:
|
||||
type: object
|
||||
range:
|
||||
type: string
|
||||
description: The range for a specific channel. See `range` for allowed values
|
||||
input_mode:
|
||||
type: string
|
||||
description: The input mode for a specific channel. See `input_mode` for allowed values
|
||||
channel:
|
||||
type: integer
|
||||
example: 5
|
||||
description: The channel input number of the device.
|
||||
description: A list of used channels
|
||||
sample_rate:
|
||||
type: integer
|
||||
min: 0
|
||||
example: 10000
|
||||
description: The sampling rate of the input signal.
|
||||
range:
|
||||
type: string
|
||||
enum:
|
||||
- bipolar-60
|
||||
- bipolar-60
|
||||
- bipolar-30
|
||||
- bipolar-15
|
||||
- bipolar-20
|
||||
- bipolar-10
|
||||
- bipolar-5
|
||||
- bipolar-4
|
||||
- bipolar-2.5
|
||||
- bipolar-2
|
||||
- bipolar-1.25
|
||||
- bipolar-1
|
||||
- bipolar-0.625
|
||||
- bipolar-0.5
|
||||
- bipolar-0.25
|
||||
- bipolar-0.125
|
||||
- bipolar-0.2
|
||||
- bipolar-0.1
|
||||
- bipolar-0.078
|
||||
- bipolar-0.05
|
||||
- bipolar-0.01
|
||||
- bipolar-0.005
|
||||
- unipolar-60
|
||||
- unipolar-30
|
||||
- unipolar-15
|
||||
- unipolar-20
|
||||
- unipolar-10
|
||||
- unipolar-5
|
||||
- unipolar-4
|
||||
- unipolar-2.5
|
||||
- unipolar-2
|
||||
- unipolar-1.25
|
||||
- unipolar-1
|
||||
- unipolar-0.625
|
||||
- unipolar-0.5
|
||||
- unipolar-0.25
|
||||
- unipolar-0.125
|
||||
- unipolar-0.2
|
||||
- unipolar-0.1
|
||||
- unipolar-0.078
|
||||
- unipolar-0.05
|
||||
- unipolar-0.01
|
||||
- unipolar-0.005
|
||||
description: The input range. Check manual for your device.
|
||||
input_mode:
|
||||
type: string
|
||||
enum:
|
||||
- differential
|
||||
- single-ended
|
||||
- pseudo-differential
|
||||
description: The sampling type. Check manual for you device
|
||||
|
|
|
@ -71,18 +71,24 @@ public:
|
|||
void parse(json_t *json)
|
||||
{
|
||||
int ret;
|
||||
int windowSizeIn;
|
||||
json_error_t err;
|
||||
|
||||
assert(state != State::STARTED);
|
||||
|
||||
MultiSignalHook::parse(json);
|
||||
|
||||
ret = json_unpack_ex(json, &err, 0, "{ s?: i }",
|
||||
"window_size", &windowSize
|
||||
ret = json_unpack_ex(json, &err, 0, "{ s: i }",
|
||||
"window_size", &windowSizeIn
|
||||
);
|
||||
if (ret)
|
||||
throw ConfigError(json, err, "node-config-hook-rms");
|
||||
|
||||
if (windowSizeIn < 1)
|
||||
throw ConfigError(json, "node-config-hook-rms", "Window size must be greater 0 but is set to {}", windowSizeIn);
|
||||
|
||||
windowSize = (unsigned)windowSizeIn;
|
||||
|
||||
state = State::PARSED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue