ESP_IOT v2.5
IOT ESP Coding
ChainButtonClass Class Reference

#include <ChainButtonClassType.h>

Inheritance diagram for ChainButtonClass:
Inheritance graph
Collaboration diagram for ChainButtonClass:
Collaboration graph

Public Member Functions

 ChainButtonClass (char *config)
 constructor More...
 
void loop ()
 Pure Virtual Function. More...
 
void setup ()
 Pure Virtual Function. More...
 
void messageSetVal_SensorClassType (char *setName, char *valValue, boolean deviceNameSpecified)
 these are not initialized... More...
 
void messageLocal_SensorClassType (char *message)
 5.15.25 try a special command local to this class More...
 
- Public Member Functions inherited from SensorClassType
 SensorClassType (char *config)
 
char * classIdentity ()
 
 ~SensorClassType ()
 destructor More...
 
virtual Type type () const
 
virtual void loop ()=0
 Pure Virtual Function. More...
 
virtual void setup ()=0
 Pure Virtual Function. More...
 
void setPinValues (int pin1, int pin2)
 
void registerCallback (sensorCallbackSignature *callback)
 
void registerCallbackValue (sensorCallbackValueSignature *callback)
 
void registerCallbackJSON (sensorCallbackJSONSignature *callback)
 
void callCallback (char *info, boolean flag)
 call the callback More...
 
void callCallbackValue (char *info, int value)
 call the callback More...
 
void callCallbackJSON (char *JSONString)
 call the callback for JSON More...
 
virtual void messageSetVal_SensorClassType (char *setName, char *valValue, boolean deviceNameSpecified)
 
virtual void messageSend_SensorClassType (char *sendValue)
 
virtual void messageCmd_SensorClassType (char *cmdValue)
 
virtual void messageLocal_SensorClassType (char *message)
 5.15.25 try a special command local to this class More...
 

Additional Inherited Members

- Public Attributes inherited from SensorClassType
int _pin1 = 0
 
int _pin2 = 0
 pin2 More...
 

Detailed Description

12.19.25 Add the 12.17.25 No Power. 1 tree down, HIGH winds last night, no flooding here, but valleys and roads bad extend the parser for different SensorKindEnum with different number of parameters and types (int vs str) There will be a setSensors (existing), and then a setM5Chain the new one.. it's own EPROM too the SensorKindEnum is what state we are holding. There will be state models behind each of these.

Definition at line 21 of file ChainButtonClassType.h.

Constructor & Destructor Documentation

◆ ChainButtonClass()

ChainButtonClass::ChainButtonClass ( char *  config)

constructor

library code M5Chain.h

Definition at line 16 of file ChainButtonClassType.cpp.

Member Function Documentation

◆ loop()

void ChainButtonClass::loop ( )
virtual

Pure Virtual Function.

See also
https://www.w3schools.com/cpp/cpp_class_methods.asp 1.22.26 the buttons are numbered 0..n Long press and Short Press need defining for each button then what the button should do, eg. send MQTT message: eg. MatrixCell, 5 Basically we have a full programming language needed. This is exactly why the SMART Buttons are created, but calling them from here isn't easy. Instead we need MQTT messages (or internal messages, like feed the dog)

1.29.26 Rain finally this happens when it's unplugged without rebooting ...

grab the correct chain use struct..

process this button . checks for NULL in function

TODO .. figure out how to pass these to the Joystick class..

get joystick values

1.24.26 process the button version .. not the x,y version

get the quadrant of the x,y eg, left, top, right, bottom

process this button . checks for NULL in function

1.29.26 Rain finally this happens when it's unplugged without rebooting ...

1.24.26 process the button version .. not the x,y version

grab the correct chain use struct..

process this button . checks for NULL in function

Implements SensorClassType.

Definition at line 170 of file ChainButtonClassType.cpp.

Here is the call graph for this function:

◆ messageLocal_SensorClassType()

void ChainButtonClass::messageLocal_SensorClassType ( char *  message)
virtual

5.15.25 try a special command local to this class

Reimplemented from SensorClassType.

Definition at line 545 of file ChainButtonClassType.cpp.

◆ messageSetVal_SensorClassType()

void ChainButtonClass::messageSetVal_SensorClassType ( char *  setName,
char *  valValue,
boolean  deviceNameSpecified 
)
virtual

these are not initialized...

12.19.25 add ability to know which kind of SensorClass we are

See also
https://stackoverflow.com/questions/307765/how-do-i-check-if-an-objects-type-is-a-particular-subclass-in-c adding the messages as well 5.14.25 (Laura/Paul flying). 5.14.74 great Dead 8.28.23 Adding a way for others to get informed on messages that arrive for the set,val 12.27.23 support setName == "socket" 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all. It's up to the receiver to decide if it has to be specified

adding the messages as well 5.14.25 (Laura/Paul flying). 5.14.74 great Dead 8.28.23 Adding a way for others to get informed on messages that arrive for the set,val 12.27.23 support setName == "socket" 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all. It's up to the receiver to decide if it has to be specified

todo .. look for SM_MatrixcCell and hit the button (single press) the matching 1..n 1.24.26 see if SM_MatrixCell, num .. then run the SINGLE_PRESS of that cell 1..n

1.25.26 Football day .. Seahawks vs Rams for superbowl .. Not supporting SM_MatrixCall (since we aren't a matrix YET ...)

the MatrixCell is actuall row.col .. but we will piggy back on that.. NFL Games, Seahawks-Rams, Patriots-Broncos need tu spport <name> l[row [.col]]

1.25.26 Cold Clear Mt, Puppies in garage eating my toes, support new SM_ChainButton, button, pressKind syntax set: SM_ChainButton, val: button.presskind (or just button [.presskind])

which loop, button, then pressKind

process this button (for testing will be button 2 .. turn on/off the lights)

Reimplemented from SensorClassType.

Definition at line 562 of file ChainButtonClassType.cpp.

Here is the call graph for this function:

◆ setup()

void ChainButtonClass::setup ( )
virtual

Pure Virtual Function.

setup the buttons

register the pin used

Implements SensorClassType.

Definition at line 373 of file ChainButtonClassType.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: