EX-Display
EX-Display
Loading...
Searching...
No Matches
/home/runner/work/EX-Display/EX-Display/AtFinder.h
Go to the documentation of this file.
1/*
2 * © 2024 Chris Harlow
3 * © 2024 Peter Cole
4 *
5 * This is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * It is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this code. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef AtFinder_h
20#define AtFinder_h
21#include "CallbackInterface.h"
22#include "Logger.h"
23#include <Arduino.h>
24
27class AtFinder {
28public:
32 static void setup(uint8_t maxTextLength, CallbackInterface *callback);
33
36 static void processInputChar(char hot);
37
39 static void cleanUp();
40
43 static void setLogger(Logger *logger);
44
45private:
46 static uint8_t _maxTextLength;
47 static char *_text;
49 static Logger *_logger;
50};
51#endif
void setup()
Main setup method, initialise Configurator here.
Definition EX-Display.ino:268
Class to monitor input stream for EXRAIL SCREEN commands Format: <@ screen row "Text">
Definition AtFinder.h:27
static CallbackInterface * _callback
Definition AtFinder.h:48
static uint8_t _maxTextLength
Definition AtFinder.h:46
static char * _text
Definition AtFinder.h:47
static void processInputChar(char hot)
Call this as often as possible with a streaming input (eg. Serial.read())
Definition AtFinder.cpp:56
static Logger * _logger
Definition AtFinder.h:49
static void setLogger(Logger *logger)
Set the logger instance to use for diagnostic logging.
Definition AtFinder.cpp:146
static void cleanUp()
Clean up memory allocations used by AtFinder.
Definition AtFinder.cpp:139
Interface class to use for callbacks.
Definition CallbackInterface.h:26
Class to enable simple logging to a Stream object with different log levels This enables embedding pe...
Definition Logger.h:35