-
Notifications
You must be signed in to change notification settings - Fork 0
2.2 Data & Interfaces
papo edited this page Feb 29, 2024
·
2 revisions
(Author: Patrick Pogscheba, date: 12/2023)
All communication between systems is done via JSON datagrams. Each module deifines the proper models for (de)serializing. Communication is done between inner Cube-Components (inside cubes communication) and between Cubes and Server which can be cube to cube, cube to server and vice versa and between server and clientside webapps for system and game control (outside communication).
- Sensor events
- different IMU data
- Motion
- Neighbourhood
- Messages (bidirectinal (currently not used)
- Cube Controls
- Notifications
- CubeState
- App Data
- App State
- POses
- Tmp pose
- Neighbourhood (unvalidated side to side connections between cubes)
- App Specific events
- Validated Connections (validated side to side connections between cubes)
- Neighbourhood Configuration
- Tracking area (offset, center) -> make oit app specicifc ?
- Appspecific configurations (e.g. media)
*
Sender: backend server
Empfänger: cubes & apps ??
Topic: ???
- puzzleCubes/neighbourhood/connection
{ // connection object
"pair": [
{
"id": "<CUBE_ID>",
"edge": "<FORWARD|BACKWARD|LEFT|RIGHT>"
},
{
"id": "<CUBE_ID>",
"edge": "<FORWARD|BACKWARD|LEFT|RIGHT>"
}],
"connected": <true|false>
}
{
"version": "0.1",
"timestamp": "2023-07-11T12:22:08.810164",
"connected": true,
"pair": [
{
"id": "cube01",
"edge": "LEFT"
},
{
"id": "cube02",
"edge": "FORWARD"
}
]
}
Publisher: Gamemaster App
Subscriber: Cube Apps
Topic: puzzleCubes/{cubeId}/app/connection
{
"edge": "<FORWARD|BACKWARD|LEFT|RIGHT>"
"valid": <true|false>
"connectedTo":
{
"id": ?
"edge" ...
}
}
Publisher: Backend App
Subscriber: Cube Apps
Topic: puzzleCubes/poses
[{
"version": "0.1",
"timestamp": "2023-08-30T10:46:41.448264",
"position": {
"x": 0,
"y": 0
},
"orientation": 111.98558044432,
"relativeMotion": {
"x": 0,
"y": 0
},
"relativeDirection": "NONE",
"id": "<CUBE_ID>",
"distances": {}
},
...
]