https://github.com/carpenteri1/sensor_data
https://github.com/carpenteri1/sensor_data
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/carpenteri1/sensor_data
- Owner: Carpenteri1
- Created: 2023-05-15T17:39:29.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-22T16:25:12.000Z (about 2 years ago)
- Last Synced: 2025-02-12T14:58:05.622Z (4 months ago)
- Language: C#
- Size: 9.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sensor_Data
An assignment to see in what level Iam in my coding and understanding on solving this task.## The assignment
The assignment is to read input from a number of sensors and output log files.
If you feel adventurous, you are encouraged to include network communication between the software reading
the sensor values and the software creating the log files,
as we often have an embedded client communicating with a server software.## Sensor data
A process simulates sensors sending data to you. Instead of reading from SPI, I2C,
some register or something similar, typical embedded, our simulator just outputs data on stdout.
The data is in a binary format, described below in the Sensor data format.
The simulator can be spawned with a --name argument.If no name is given, a random name will be generated.
This means that your program can communicate with several sensor simulator processes.
The simulator will most of the time send both temperature and humidity but can also choose to send one or none of them.## Log file
The log file shall contain logs of the sensor data in JSON-format.
Each log line shall contain one JSON document, with the following format:```
----------------------------------------------------------------------------------
Key. Required Format/Unit Type
----------------------------------------------------------------------------------
timespan Yes. ISO 8601 with time zone. UTF-8 String
name Yes UTF-8 String
temperature. If present °C. Float
humidity If present % Float
----------------------------------------------------------------------------------
```### E.g:
```
{
"timestamp": "2008-09-15T15:53:00+05:00",
"name": "sensor1",
"temperature": 273.15
"humidity": 99.1
}
```## Sensor data format
The sensor data is a binary format.
Each reading will be packaged with the length of the packet,a timestamp, a name of the sensor, and the available sensor readings.
Strings are in UTF-8. Numerical values are in network byte order.## Note
For a deeper explaination see the assignment pdf