Roboid Control for C++
Loading...
Searching...
No Matches
TemperatureSensor.h
1#pragma once
2
3#include "Thing.h"
4
5namespace RoboidControl {
6
8class TemperatureSensor : public Thing {
9 public:
11 float temperature = 0;
12
14 //TemperatureSensor();
18 TemperatureSensor(Participant* participant, unsigned char networkId, unsigned char thingId);
19
22 virtual void SetTemperature(float temperature);
23
27 void GenerateBinary(char* bytes, unsigned char* ix) override;
30 virtual void ProcessBinary(char* bytes) override;
31};
32
33} // namespace RoboidControl
A participant is a device which manages things. It can communicate with other participant to synchron...
Definition Participant.h:14
A temperature sensor.
Definition TemperatureSensor.h:8
virtual void SetTemperature(float temperature)
Manually override the measured temperature.
Definition TemperatureSensor.cpp:16
float temperature
The measured temperature.
Definition TemperatureSensor.h:11
virtual void ProcessBinary(char *bytes) override
Function to extract the temperature received in the binary message.
Definition TemperatureSensor.cpp:25
void GenerateBinary(char *bytes, unsigned char *ix) override
Function to create a binary message with the temperature.
Definition TemperatureSensor.cpp:20
A thing is the primitive building block.
Definition Thing.h:20
unsigned char networkId
The network ID of this thing.
Definition Thing.h:64