From a84605beddf52f2769d51a6459a1ce0c0fdccbce Mon Sep 17 00:00:00 2001 From: Evan Langlais Date: Sun, 10 Feb 2019 19:16:24 -0500 Subject: [PATCH] Addings template JSON files to define the structure of packets --- data_packet.json | 28 ++++++++++++++++++++++++++++ data_response.json | 8 ++++++++ heartbeat_packet.json | 5 +++++ heartbeat_response.json | 5 +++++ notification_packet.json | 14 ++++++++++++++ notification_response.json | 8 ++++++++ registration_packet.json | 7 +++++++ registration_response.json | 10 ++++++++++ 8 files changed, 85 insertions(+) create mode 100644 data_packet.json create mode 100644 data_response.json create mode 100644 heartbeat_packet.json create mode 100644 heartbeat_response.json create mode 100644 notification_packet.json create mode 100644 notification_response.json create mode 100644 registration_packet.json create mode 100644 registration_response.json diff --git a/data_packet.json b/data_packet.json new file mode 100644 index 0000000..76ef994 --- /dev/null +++ b/data_packet.json @@ -0,0 +1,28 @@ +{ + "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" } + ] + } +} \ No newline at end of file diff --git a/data_response.json b/data_response.json new file mode 100644 index 0000000..b3ee4bf --- /dev/null +++ b/data_response.json @@ -0,0 +1,8 @@ +{ + "type": "data", + "id": "000000000", + "timestamp": "1549829742", + "response": { + "status": "accepted" + } +} \ No newline at end of file diff --git a/heartbeat_packet.json b/heartbeat_packet.json new file mode 100644 index 0000000..c3bd1df --- /dev/null +++ b/heartbeat_packet.json @@ -0,0 +1,5 @@ +{ + "type": "heartbeat", + "id": "000000000", + "timestamp": "1549829742" +} \ No newline at end of file diff --git a/heartbeat_response.json b/heartbeat_response.json new file mode 100644 index 0000000..c3bd1df --- /dev/null +++ b/heartbeat_response.json @@ -0,0 +1,5 @@ +{ + "type": "heartbeat", + "id": "000000000", + "timestamp": "1549829742" +} \ No newline at end of file diff --git a/notification_packet.json b/notification_packet.json new file mode 100644 index 0000000..8f2f334 --- /dev/null +++ b/notification_packet.json @@ -0,0 +1,14 @@ +{ + "type": "notification", + "id": "000000000", + "timestamp": "1549829742", + "identity": { + "owner_id": "1", + "region": "east" + }, + "payload": { + "code": 0, + "severity": 3, + "message": "Notification Text" + } +} \ No newline at end of file diff --git a/notification_response.json b/notification_response.json new file mode 100644 index 0000000..9c3ec8e --- /dev/null +++ b/notification_response.json @@ -0,0 +1,8 @@ +{ + "type": "notification", + "id": "000000000", + "timestamp": "1549829742", + "response": { + "status": "accepted" + } +} \ No newline at end of file diff --git a/registration_packet.json b/registration_packet.json new file mode 100644 index 0000000..a7a4fa5 --- /dev/null +++ b/registration_packet.json @@ -0,0 +1,7 @@ +{ + "type": "registration", + "timestamp": "1549829742", + "payload": { + "serial": "123abc456def" + } +} \ No newline at end of file diff --git a/registration_response.json b/registration_response.json new file mode 100644 index 0000000..d645fed --- /dev/null +++ b/registration_response.json @@ -0,0 +1,10 @@ +{ + "type": "registration", + "id": "000000000", + "timestamp": "1549829742", + "response": { + "region": "east", + "generator_id": "000000000", + "owner_id": "1" + } +} \ No newline at end of file