-
Notifications
You must be signed in to change notification settings - Fork 8
Protocols Dataschemes
Nico Boettcher edited this page Dec 21, 2016
·
3 revisions
This section describes the used protocols between the three core teams.
For the communication we use a JSON formatted string with the following format.
Current Version: 2
{
"version":Integer,
"timestamp": unix timestamp (milliseconds),
"sensortype":"String",
"values":[
{
"id":Integer,
"value":Integer}
]
}
Valid values:
- version: Integers beginning with 1 and incremented by 1 with every change.
- timestamp: unix timestamp (milliseconds)
- sensor: Several valid types [unit]:
- pressure [gram]
- temperature [°C]
- acceleration [unknown] possible:[deg/s]
- gyroscope [unknown] possible:[deg]
- microphone [unknown] possible:[dB]
- distance [cm]
- values: Array of entries:
- id: as an integer beginning with 0
- value: as an integer
Example:
{
"version":1,
"timestamp": unix timestamp (milliseconds),
"sensortype":"pressure",
"values":[
{
"id":0,
"value":1000
},
{
"id":1,
"value":1000
}
]
}
Queues:
sg.q.sensor_values
- Durability: Durable
- Auto-Delete: False
- Arguments:
Exchanges:
sg.ex.sensor_values
- Type: Direct
- Durability: Durable
- Auto-Delete: False
- Internal: False
- Arguments:
Routing Keys:
sg.rk.sensor_values
- sg.ex.sensor_values ➙ sg.q.sensor_values
Queues:
sg.q.ss
- Durability: Durable
- Auto-Delete: False
- Arguments:
Exchanges:
sg.ex.ss
- Type: Direct
- Durability: Durable
- Auto-Delete: False
- Internal: False
- Arguments:
Routing Keys:
sg.rk.ss
- sg.ex.ss ➙ sg.q.ss