Browse Source

pi2server

master
test2 5 years ago
parent
commit
aac68e4095
  1. 22
      IoT/SensorNode2Server.adoc
  2. BIN
      IoT/Swarming2.gif
  3. BIN
      IoT/swarmlabn-1.png

22
IoT/SensorNode2Server.adoc

@ -419,10 +419,22 @@ composer require guzzlehttp/guzzle
== IoT Server
.Imaging a swarm
image:./Swarming2.gif[alt="Swarm"]
.Architecture of swarm communication
image:./Swarming2.gif[alt="Swarm Gateway"]
- Red Note: Sensor Node and Gateway Role
- Black and Red Note: Sensor Node - Client
=== NodeJS
==== Gateway
Gateway forwards ore Client Data to the correct application - Server
.NodeJS code in Raspberry Pi - Server Gateway
[source,c]
----
@ -489,7 +501,12 @@ app.listen(9089, function () {
----
==== Broadcast
==== Server - Broadcast
Broadcast data to swarm clients
The server receives data from its client and echoes its back.
.NodeJS code in Raspberry Pi - Server broadcast
[source,c]
@ -542,6 +559,9 @@ io.on('connection', (socket) => {
==== Client Connection Raspberry
Swarm client recieves data
.NodeJS code in Raspberry Pi - Client
[source,c]
----

BIN
IoT/Swarming2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
IoT/swarmlabn-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Loading…
Cancel
Save