ESP_IOT v2.5
IOT ESP Coding
Sonic_I2CSensorClass.h
Go to the documentation of this file.
1
2#ifndef Sonic_I2CSensorClass_h
3#define Sonic_I2CSensorClass_h
4#include "../../Defines.h"
5#ifdef ESP_M5
6
7#include "SensorClassType.h"
8#include <Unit_Sonic.h>
9
10//!@see https://forum.arduino.cc/t/undefined-reference-to-vtable-for-abstract-classname-even-after-derived-class-definition/1084221/6
11
13{
14public:
15 //! constructor
16 Sonic_I2CSensorClass(char *config);
17
18 //! destructor
20
21 //! Pure Virtual Function
22 void loop();
23
24 //! Pure Virtual Function
25 void setup();
26#ifdef NOT_DEFINED
27
28 //! adding the messages as well
29 //! 5.14.25 (Laura/Paul flying). 5.14.74 great Dead
30 //! 8.28.23 Adding a way for others to get informed on messages that arrive
31 //! for the set,val
32 //! 12.27.23 support setName == "socket"
33 //! 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all.
34 //! It's up to the receiver to decide if it has to be specified
35 void messageSetVal_SensorClassType(char *setName, char* valValue, boolean deviceNameSpecified);
36
37 //! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
38 //! for the send -
39 void messageSend_SensorClassType(char *sendValue);
40
41 //! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
42 //! for the cmd
43 void messageCmd_SensorClassType(char *cmdValue);
44#endif
45private:
46
47 //!setup the Sonic_I2C
48 void setupSonic_I2C();
49
50 //! loop the key unit (after other called M5.updfate)
51 void loopSonic_I2C();
52
53 //! static wrapper class
54 static void startTaskImpl(void*);
55
56 //! these are not initialized...
57 int _sensorValue = 0;
58
59 //! state specific info
60 SONIC_I2C _sensor;
61};
62
63#endif
64
65#endif
virtual void messageCmd_SensorClassType(char *cmdValue)
virtual void messageSend_SensorClassType(char *sendValue)
virtual void messageSetVal_SensorClassType(char *setName, char *valValue, boolean deviceNameSpecified)
Sonic_I2CSensorClass(char *config)
constructor
void loop()
Pure Virtual Function.
void setup()
Pure Virtual Function.