Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Modified packet structures
  • Loading branch information
Evan Langlais committed Feb 11, 2019
1 parent 47cc88c commit 887d3e4
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 69 deletions.
55 changes: 30 additions & 25 deletions packet_references/data_packet.json
@@ -1,28 +1,33 @@
{
"type": "data",
"id": "000000000",
"timestamp": "1549829742",
"payload": {
"oil.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
],
"air.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
],
"fuel.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
]
"url": "data",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": {
"metrics": ["oil.temp", "air.temp", "fuel.temp"],
"data": {
"oil.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
],
"air.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
],
"fuel.temp": [
{ "1549829742": "21" },
{ "1549829802": "24" },
{ "1549829862": "18" },
{ "1549829922": "30" },
{ "1549829982": "25" }
]
}
}
}
12 changes: 6 additions & 6 deletions packet_references/data_response.json
@@ -1,8 +1,8 @@
{
"type": "data",
"id": "000000000",
"timestamp": "1549829742",
"response": {
"status": "accepted"
}
"url": "data",
"params": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": "ingested"
}
12 changes: 6 additions & 6 deletions packet_references/heartbeat_packet.json
@@ -1,8 +1,8 @@
{
"type": "heartbeat",
"id": "000000000",
"timestamp": "1549829742",
"payload": {
"message": "marco"
}
"url": "heartbeat",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": "marco"
}
12 changes: 6 additions & 6 deletions packet_references/heartbeat_response.json
@@ -1,8 +1,8 @@
{
"type": "heartbeat",
"id": "000000000",
"timestamp": "1549829742",
"response": {
"message": "polo"
}
"url": "heartbeat",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": "polo"
}
12 changes: 5 additions & 7 deletions packet_references/notification_packet.json
@@ -1,12 +1,10 @@
{
"type": "notification",
"id": "000000000",
"timestamp": "1549829742",
"identity": {
"owner_id": "1",
"region": "east"
"url": "notification",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"payload": {
"body": {
"code": 0,
"severity": 3,
"message": "Notification Text"
Expand Down
12 changes: 6 additions & 6 deletions packet_references/notification_response.json
@@ -1,8 +1,8 @@
{
"type": "notification",
"id": "000000000",
"timestamp": "1549829742",
"response": {
"status": "accepted"
}
"url": "notification",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": "acknowledged"
}
11 changes: 6 additions & 5 deletions packet_references/registration_packet.json
@@ -1,7 +1,8 @@
{
"type": "registration",
"timestamp": "1549829742",
"payload": {
"serial": "123abc456def"
}
"url": "registration",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": {}
}
14 changes: 6 additions & 8 deletions packet_references/registration_response.json
@@ -1,10 +1,8 @@
{
"type": "registration",
"id": "000000000",
"timestamp": "1549829742",
"response": {
"region": "east",
"generator_id": "000000000",
"owner_id": "1"
}
"url": "registration",
"headers": {
"serial": "123abc456def",
"timestamp": "1549829742"
},
"body": "mapped"
}

0 comments on commit 887d3e4

Please sign in to comment.