Roboid Control for C++ 0.4
Loading...
Searching...
No Matches
DigitalSensor.h
1#pragma once
2
3#include "Thing.h"
4
5namespace RoboidControl {
6
8class DigitalSensor : public Thing {
9 public:
11 //DigitalSensor();
16 DigitalSensor(Participant* owner = nullptr); //, unsigned char thingId = 0);
21 // DigitalSensor(Thing* parent); //, unsigned char thingId = 0);
23
25 bool state = 0;
26
30 int GenerateBinary(char* bytes, unsigned char* ix) override;
34 virtual void ProcessBinary(char* bytes) override;
35};
36
37} // namespace RoboidControl
A digital (on/off, 1/0, true/false) sensor.
Definition DigitalSensor.h:8
DigitalSensor(Participant *owner=nullptr)
Create a digital sensor without communication abilities.
virtual void ProcessBinary(char *bytes) override
Function used to process binary data received for this digital sensor.
Definition DigitalSensor.cpp:14
int GenerateBinary(char *bytes, unsigned char *ix) override
Function used to generate binary data for this digital sensor.
Definition DigitalSensor.cpp:9
bool state
The sigital state.
Definition DigitalSensor.h:25
A participant is a device which manages things. It can communicate with other participant to synchron...
Definition Participant.h:62
A thing is the primitive building block.
Definition Thing.h:20
Participant * owner
The participant owning this thing.
Definition Thing.h:92
static Thing * LocalRoot()
The root thing for the local participant.
Definition Thing.cpp:23