1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 18:03:45 +02:00
Files
CommandStation-EX/SensorGroup.h
Asbelos c699eb3492 JMRI_SENSOR_NOPULLUP
and associated dump for <S>
2025-07-25 09:29:57 +01:00

29 lines
861 B
C++

#ifndef SensorGroup_h
#define SensorGroup_h
#include <Arduino.h>
#include "defines.h"
#include "IODevice.h"
#include "StringFormatter.h"
// reference to the optional exrail built function which contains the
// calls to SensorGroup::doSensorGroup
enum GroupProcess:byte {prepare,print,check,dump};
class SensorGroup {
public:
static void checkAll();
static void printAll(Print * serial);
static void prepareAll();
static void dumpAll(Print* serial);
// doSensorGroup is called from the automatically
// built doExrailSensorGroup, once for each user defined group.
static void doSensorGroup(VPIN vpin, int nPins, byte* statebits,
GroupProcess action, Print * serial, bool pullup=false);
private:
static void doExrailSensorGroup(GroupProcess action, Print * stream);
};
#endif // SensorGroup_h