Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ build:openapi:
needs: []
image: node:24-alpine
script:
- npx -y @redocly/cli build-docs doc/openapi/openapi.yaml --output openapi.html
- npx -y @redocly/cli lint --config doc/redocly.yaml doc/openapi/openapi.yaml
- npx -y @redocly/cli build-docs --config doc/redocly.yaml doc/openapi/openapi.yaml --output openapi.html
artifacts:
paths:
- openapi.html
Expand Down
2 changes: 1 addition & 1 deletion doc/openapi/components/schemas/config/hooks/_rms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ allOf:
properties:
window_size:
type: integer
min: 1
minimum: 1
example: 1000
description: The number of samples in the window.
4 changes: 1 addition & 3 deletions doc/openapi/components/schemas/config/hooks/digest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ allOf:
- type: object
required:
- uri
- mode
- interval
- algorithm

properties:
uri:
description: The output file for digests.
example: digest.txt
type: string
format: uri

algorithm:
description: The algorithm used for calculating digests.
Expand Down
2 changes: 1 addition & 1 deletion doc/openapi/components/schemas/config/hooks/dp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ allOf:
type: number
description: The rate of the input samples. Exclusive with `dt` setting.
harmonics:
type: object
type: array
description: A list of selected harmonics which should be calculated.
example: [0, 1, 3, 5 ]
items:
Expand Down
10 changes: 5 additions & 5 deletions doc/openapi/components/schemas/config/hooks/pmu_dft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ allOf:
sample_rate:
type: integer
default: 0
min: 0
minimum: 0
example: 10000
description: The sampling rate of the input signal.
start_frequency:
type: number
min: 0
minimum: 0
example: 49.7
description: The lowest frequency bin.
end_frequency:
type: number
example: 50.3
min: 0
minimum: 0
description: The highest frequency bin.
frequency_resolution:
type: number
example: 0.1
min: 0
minimum: 0
description: The frequency resolution of the DFT.
dft_rate:
type: integer
example: 1
min: 1
minimum: 1
description: The number of phasor calculations performed per second.
window_size_factor:
type: integer
Expand Down
2 changes: 1 addition & 1 deletion doc/openapi/components/schemas/config/nodes/can.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ allOf:
signals:
type: array
items:
$$ref: ./signals/can_signal.yaml
$ref: ./signals/can_signal.yaml

- $ref: ../node.yaml
8 changes: 4 additions & 4 deletions doc/openapi/components/schemas/config/nodes/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ allOf:
properties:
setting1:
type: integer
min: 0 # Make sure any constraints of the values are checked by ExampleNode::check().
max: 100
minimum: 0 # Make sure any constraints of the values are checked by ExampleNode::check().
maximum: 100
default: 72 # Make sure the default values match ExampleNode::ExampleNode().
description: A first setting

setting2:
type: string
min: 0
max: 10
minimum: 0
maximum: 10
default: something
description: Another setting

Expand Down
54 changes: 27 additions & 27 deletions doc/openapi/components/schemas/config/nodes/exec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ allOf:
If not set, we will directly execute the sub-process via `execvpe(2)`.
In this case the exec setting must be given as an array (`argv[]`).

exec:
description: |
The program which should be executed in the sub-process.

The option is passed to the system shell for execution.

oneOf:
- type: array
items:
type: string
- type: string

flush:
type: boolean
default: true
description: |
Flush stream every time VILLASnode passes data the sub-process.

working_directory:
type: string
description: |
If set, the working directory for the sub-process will be changed.

environment:
type: object
description: |
A object of key/value pairs of environment variables which should be passed to the sub-process in addition to the parent environment.
exec:
description: |
The program which should be executed in the sub-process.

The option is passed to the system shell for execution.

oneOf:
- type: array
items:
type: string
- type: string

flush:
type: boolean
default: true
description: |
Flush stream every time VILLASnode passes data the sub-process.

working_directory:
type: string
description: |
If set, the working directory for the sub-process will be changed.

environment:
type: object
description: |
A object of key/value pairs of environment variables which should be passed to the sub-process in addition to the parent environment.

- $ref: ../node_signals.yaml
- $ref: ../node.yaml
96 changes: 48 additions & 48 deletions doc/openapi/components/schemas/config/nodes/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,54 +68,54 @@ allOf:
| `absolute` | `epoch - first` | `epoch` |
| `original` | `0` | immediately |

rate:
type: number
default: 0
description: |
By default `send_rate` has the value `0` which means that the time between consecutive samples is the same as in the `in` file based on the timestamps in the first column.

If this setting has a non-zero value, the default behavior is overwritten with a fixed rate.

eof:
type: string
default: exit
enum:
- rewind
- wait
- exit

description: |
Defines the behavior if the end of file of the input file is reached.

- `rewind` will rewind the file pointer and restart reading samples from the beginning of the file.
- `exit` will terminated the program.
- `wait` will periodically test if there are new samples which have been appended to the file.

buffer_size:
type: integer
min: 0
default: 0
description: |
Similar to the [`out.buffer_size` setting](#out-buffer_size). This means that the data is loaded into the buffer before it is passed on to the node.

If `in.buffer_size = 0`, no buffer will be generated.

out:
type: object
properties:
flush:
type: boolean
description: |
With this setting enabled, the outgoing file is flushed whenever new samples have been written to it.

buffer_size:
type: integer
default: 0
min: 0
description: |
If this is set to a positive value `<X>`, the node will generate a full [stream buffer](https://linux.die.net/man/3/setvbuf) with a size of `<X>` bytes. This means that the data is buffered and not written until the buffer is full or until the node is stopped.

If `out.buffer_size = 0`, no buffer will be generated.
rate:
type: number
default: 0
description: |
By default `send_rate` has the value `0` which means that the time between consecutive samples is the same as in the `in` file based on the timestamps in the first column.

If this setting has a non-zero value, the default behavior is overwritten with a fixed rate.

eof:
type: string
default: exit
enum:
- rewind
- wait
- exit

description: |
Defines the behavior if the end of file of the input file is reached.

- `rewind` will rewind the file pointer and restart reading samples from the beginning of the file.
- `exit` will terminated the program.
- `wait` will periodically test if there are new samples which have been appended to the file.

buffer_size:
type: integer
minimum: 0
default: 0
description: |
Similar to the [`out.buffer_size` setting](#out-buffer_size). This means that the data is loaded into the buffer before it is passed on to the node.

If `in.buffer_size = 0`, no buffer will be generated.

out:
type: object
properties:
flush:
type: boolean
description: |
With this setting enabled, the outgoing file is flushed whenever new samples have been written to it.

buffer_size:
type: integer
default: 0
minimum: 0
description: |
If this is set to a positive value `<X>`, the node will generate a full [stream buffer](https://linux.die.net/man/3/setvbuf) with a size of `<X>` bytes. This means that the data is buffered and not written until the buffer is full or until the node is stopped.

If `out.buffer_size = 0`, no buffer will be generated.

- $ref: ../node_signals.yaml
- $ref: ../node.yaml
72 changes: 36 additions & 36 deletions doc/openapi/components/schemas/config/nodes/infiniband.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,55 +50,55 @@ allOf:

binds the node to the local device which is bound to `10.0.0.1`. It will use port `1337` for communication related to the connection.

max_wrs:
type: integer
default: 128
description: |
Before a packet can be received with Infiniband, the application has to describe how this will be handled (e.g., to what address the data will be written).
This happens in a so called Work Request (WR).
max_wrs:
type: integer
default: 128
description: |
Before a packet can be received with Infiniband, the application has to describe how this will be handled (e.g., to what address the data will be written).
This happens in a so called Work Request (WR).

`in.max_wrs` sets the maximum number of receive Work Requests which can be posted to the receive queue of the Queue Pair.
`in.max_wrs` sets the maximum number of receive Work Requests which can be posted to the receive queue of the Queue Pair.

For higher throughput, it is recommended to increase this value since it will serve as a buffer.
For higher throughput, it is recommended to increase this value since it will serve as a buffer.

cq_size:
type: integer
default: 128
description: |
This value defines the number of Work Completions the Completion Queue can hold.
cq_size:
type: integer
default: 128
description: |
This value defines the number of Work Completions the Completion Queue can hold.

If a packet is received, the Queue Pair will write a Work Completion to the Completion Queue.
The node polls this queue to process received packets. If the Completion Queue gets full, which is often caused by `cq_size` being to small, and thus the receive queue is not able to post Work Completions, the node will abort.
If a packet is received, the Queue Pair will write a Work Completion to the Completion Queue.
The node polls this queue to process received packets. If the Completion Queue gets full, which is often caused by `cq_size` being to small, and thus the receive queue is not able to post Work Completions, the node will abort.

If a connection is disconnected, all outstanding Work Requests—even is they are not used—are flushed to the Completion Queue.
Here applies the same as mentioned above: if the Completion Queue has fewer space left than outstanding Work Requests are available, this will result in an error.
If a connection is disconnected, all outstanding Work Requests—even is they are not used—are flushed to the Completion Queue.
Here applies the same as mentioned above: if the Completion Queue has fewer space left than outstanding Work Requests are available, this will result in an error.

It is therefor recommended to set the value of `cq_size` to at least
It is therefor recommended to set the value of `cq_size` to at least

```
in.cq_size >= in.max_wrs - in.buffer_subtraction
```
```
in.cq_size >= in.max_wrs - in.buffer_subtraction
```

buffer_subtraction:
type: integer
default: 16
description: |
As mentioned in the `in.max_wrs` settings, Work Requests have to be present in the receive queue, for it to be able to process received data.
To take full advantage of the zero-copy capabilities of Infiniband this node-type directly posts addresses from the VILLASnode to the receive queue instead of copying all data over after receiving it.
buffer_subtraction:
type: integer
default: 16
description: |
As mentioned in the `in.max_wrs` settings, Work Requests have to be present in the receive queue, for it to be able to process received data.
To take full advantage of the zero-copy capabilities of Infiniband this node-type directly posts addresses from the VILLASnode to the receive queue instead of copying all data over after receiving it.

This technique relies on the exchange of addresses. This means that if an array of `in.vectorize` addresses is handed over to the node-type, max `release` <= `in.vectorize` addresses that point to received data can be returned.
This technique relies on the exchange of addresses. This means that if an array of `in.vectorize` addresses is handed over to the node-type, max `release` <= `in.vectorize` addresses that point to received data can be returned.

Furthermore, if `release` addresses should be returned, `release` addresses from the original array must be posted to the receive queue.
To ensure that we can always post at least `in.vectorize` new samples to the receive queue, `in.buffer_subtraction` must always be bigger than `in.vectorize`.
Furthermore, if `release` addresses should be returned, `release` addresses from the original array must be posted to the receive queue.
To ensure that we can always post at least `in.vectorize` new samples to the receive queue, `in.buffer_subtraction` must always be bigger than `in.vectorize`.

A second factor is performance: if `in.buffer_subtraction` is too small it might take long before the node starts to process data since it has to fill almost the complete queue first.
If `in.buffer_subtraction` is too big, the receive buffer might be too small.
A second factor is performance: if `in.buffer_subtraction` is too small it might take long before the node starts to process data since it has to fill almost the complete queue first.
If `in.buffer_subtraction` is too big, the receive buffer might be too small.

Thus, the maximum number of Work Requests to be present in the receive queue is defined as follows:
Thus, the maximum number of Work Requests to be present in the receive queue is defined as follows:

```c
max_wrs_posted = in.max_wrs - in.buffer_subtraction
```
```c
max_wrs_posted = in.max_wrs - in.buffer_subtraction
```
out:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions doc/openapi/components/schemas/config/nodes/loopback.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ allOf:

queuelen:
type: integer
min: 0
minimum: 0
description: The queue length of the internal queue which buffers the samples.

samplelen:
type: integer
min: 0
minimum: 0
description: The number of values each buffered sample can store.

mode:
Expand Down
2 changes: 1 addition & 1 deletion doc/openapi/components/schemas/config/nodes/modbus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---
allOf:
- type: object
requires: [transport]
required: [transport]
properties:
response_timeout:
type: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ properties:
description: The stop bits used for serial communication.
minimum: 1
maximum: 2
example: 5
example: 1

unit:
type: integer
Expand Down
Loading
Loading