2020-05-27 10:40:12 +02:00
|
|
|
#ifndef JMRITurnout_h
|
|
|
|
#define TMRITurnout_h
|
|
|
|
|
2020-05-27 10:24:56 +02:00
|
|
|
#include <Arduino.h>
|
2020-05-27 10:40:12 +02:00
|
|
|
#include "Config.h"
|
2020-05-27 10:24:56 +02:00
|
|
|
|
|
|
|
class JMRITurnout {
|
|
|
|
|
|
|
|
public:
|
|
|
|
static void parse(Stream & stream, int params, int p[]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static void showAll(Stream & stream);
|
|
|
|
static bool show(Stream & stream ,int id, bool all);
|
|
|
|
static bool create(int id, int address, byte subAddress);
|
|
|
|
static bool remove(int id);
|
|
|
|
static bool activate(int id, bool thrown);
|
|
|
|
static bool invalid(int id);
|
|
|
|
|
|
|
|
struct TurnoutEntry {
|
|
|
|
int address;
|
|
|
|
byte subAddress;
|
|
|
|
bool thrown;
|
|
|
|
};
|
|
|
|
static TurnoutEntry table[MAX_TURNOUTS];
|
|
|
|
};
|
2020-05-27 10:40:12 +02:00
|
|
|
#endif
|