aboutsummaryrefslogtreecommitdiffstats
path: root/docs/part-1/4-SignalComposerAPI.md
blob: 00dbae4d8f333bb5d1651123293b0f8be12b0acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Signal Composer API

## get

You can get a signal value be requesting the API with the verb *get*:

```json
signal-composer get {"signal": "vehicle_speed", "options": {"average": 10}}
signal-composer get {"signal": "vehicle_speed", "options": {"minimum": 10}}
signal-composer get {"signal": "vehicle_speed", "options": {"maximum": 10}}
signal-composer get {"signal": "vehicle_speed"}
```

You apply apply some simple mathematical function by default present in the
binding, by default **last** is used:

- **average**: make an average on X latest seconds.
- **minimum**: return the minimum value found in the X latest seconds.
- **maximum**: return the maximum value found in the X latest seconds.
- **last**: return the latest value.

## list

Verb **list** will output the list of defined signals.

## loadConf

Verb **loadConf** let you add new files to be able to add new **sources** or
**signals**.

```json
signal-composer loadConf {"filepath": "/path/to/your/json/file.json"}
```