aboutsummaryrefslogtreecommitdiffstats
path: root/docs/part-1/4-SignalComposerAPI.md
blob: 6e53800a48b8169fb58f1624563f39cbd563ce17 (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"}
```