Add node and graph classes for data visualization

This commit is contained in:
Sietse Jonker
2024-03-22 12:45:31 +01:00
parent ca5d92bd86
commit e5511d1925

View File

@@ -1,3 +1,55 @@
# Nodes
## Introduction
The nodes are the devices that are placed in the rooms. The nodes are used to collect the data from the sensors. Every node is connected to the websocket, and sends their data with their mac address in json format. The websocket broadcasts the node data back to all clients, and since our website functions as a client it also receives the data. Every node will, depending on what node, be made into a class.
## Requirements
### Sensornode
- Every node has to have a unique nodeID
- Every node has to have their corresponding sensorsvalues in form of arrays
### Feedbacknodes
- Every node has to have a unique nodeID
- Every node has to have their corresponding feedback in form of a 2D array
## Class diagrams
### Node
```mermaid
classDiagram
class Node {
+nodeID
+processNodeData()
+updateNodeData()
}
```
#### Sensornode
```mermaid
classDiagram
class SensorNode extends Node {
+tempArray
+humiArray
+eco2Array
+tvocArray
}
```
#### Feedbacknode
```mermaid
classDiagram
class FeedbackNode extends Node {
+feedbackArray
}
```
# Graphs # Graphs
## Introduction ## Introduction
@@ -14,12 +66,21 @@ The graphs are used to display the data from the sensors. The data is collected
## Class diagrams ## Class diagrams
### Graphs
```mermaid
classDiagram
class graph {
+nodeId
makeGraph()
}
```
### Live graphs ### Live graphs
```mermaid ```mermaid
classDiagram classDiagram
class liveGraph { class liveGraph extends graph {
+nodeId
+cnt +cnt
+timeArray +timeArray
+tempArray +tempArray