ESP_IOT v2.5
IOT ESP Coding
M5Atom_SocketModuleClass.cpp
Go to the documentation of this file.
1//
2// M5Atom_SocketModuleClass.cpp
3//
4//
5// Created by Scott Moody on 5/6/25.
6//
7
9
10#include "../ATOM_SocketModule/ATOM_SocketModule.h"
11
13{
14 SerialDebug.printf("M5Atom_SocketModuleClass init %s\n", config);
15
16}
17
18
19//! Data members of class
20//! Generic config info .. specific the the sensor type
21
22//!starts the PTStepper
24{
25}
26
27//!setup the PTStepper
29{
31}
32
33//! stops motor
35{
36
37}
38
39//!setup the PTStepper
41{
43}
44
45//! ATOM specific
46
47//! these are from the ATOM
48
49//! 8.28.23 Adding a way for others to get informed on messages that arrive
50//! for the set,val
51//! 12.27.23 support setName == "socket"
52//! 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all.
53//! It's up to the receiver to decide if it has to be specified
54void M5Atom_SocketModuleClass::messageSetVal_M5AtomClassType(char *setName, char* valValue, boolean deviceNameSpecified)
55{
56 messageSetVal_ATOM_SocketModule(setName, valValue, deviceNameSpecified);
57
58}
59
60//! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
61//! for the send -
62void M5Atom_SocketModuleClass::messageSend_M5AtomClassType(char *sendValue, boolean deviceNameSpecified)
63{
64 SerialDebug.printf("M5Atom_SocketModuleClass::messageSend_M5AtomClassType: %s\n", sendValue);
65
67
68}
69
70//! BUTTON PROCESSING abstraction
71//!short press on buttonA (top button)
73{
75
76}
77//!long press on buttonA (top button)
79{
81
82}
83
84//!returns a string in in URL so: status&battery=84'&buzzon='off' } .. etc
85//!starts with "&"*
87{
89}
90
91//!returns a string in in JSON so: status&battery=84'&buzzon='off' } .. etc
92//!starts with "&"*
94{
96}
97
98/*
99 //!THIS IS the setup() and loop() but using the "component" name, eg AudioModule()
100 //!This will perform preference initializtion as well
101 //! called from the setup()
102 //! Pass in the method to call on a loud (over a threshhold. The parameter for value will be sent
103 //void setup_AudioModule(void (*loudCallback)(int));
104 void setup_ATOM_SocketModule();
105
106 //! called for the loop() of this plugin
107 void loop_ATOM_SocketModule();
108
109
110 //! 8.28.23 Adding a way for others to get informed on messages that arrive
111 //! for the set,val
112 //! 12.27.23 support setName == "socket"
113 //! 1.10.24 if deviceNameSpecified then this matches this device, otherwise for all.
114 //! It's up to the receiver to decide if it has to be specified
115 void messageSetVal_ATOM_SocketModule(char *setName, char* valValue, boolean deviceNameSpecified);
116
117 //! 12.28.23, 8.28.23 Adding a way for others to get informed on messages that arrive
118 //! for the set,val
119 void messageSend_ATOM_SocketModule(char *sendValue);
120
121 //! BUTTON PROCESSING abstraction
122 //!short press on buttonA (top button)
123 void buttonA_ShortPress_ATOM_SocketModule();
124 //!long press on buttonA (top button)
125 void buttonA_LongPress_ATOM_SocketModule();
126
127 //!returns a string in in URL so: status&battery=84'&buzzon='off' } .. etc
128 //!starts with "&"*
129 char * currentStatusURL_ATOM_SocketModule();
130
131 //!returns a string in in JSON so: status&battery=84'&buzzon='off' } .. etc
132 //!starts with "&"*
133 char * currentStatusJSON_ATOM_SocketModule();
134 */
char * currentStatusURL_ATOM_SocketModule()
returns a string in in URL so: status&battery=84'&buzzon='off' } .. etc
void buttonA_LongPress_ATOM_SocketModule()
long press on buttonA (top button)
void setup_ATOM_SocketModule()
void loop_ATOM_SocketModule()
called for the loop() of this plugin
void messageSend_ATOM_SocketModule(char *sendValue)
void messageSetVal_ATOM_SocketModule(char *setName, char *valValue, boolean deviceNameSpecified)
char * currentStatusJSON_ATOM_SocketModule()
void buttonA_ShortPress_ATOM_SocketModule()
void start_M5AtomClassType()
starts the PTStepper
M5Atom_SocketModuleClass(char *config)
constructor
void loop_M5AtomClassType()
setup the PTStepper
void buttonA_LongPress_M5AtomClassType()
long press on buttonA (top button)
void setup_M5AtomClassType()
setup the PTStepper
void messageSetVal_M5AtomClassType(char *setName, char *valValue, boolean deviceNameSpecified)
ATOM specific.
void messageSend_M5AtomClassType(char *sendValue, boolean deviceNameSpecified)
An mostly virtual class.