1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00
CommandStation-EX/Turnouts.h

31 lines
609 B
C
Raw Normal View History

#ifndef Turnouts_h
#define Turnouts_h
#include <Arduino.h>
#include "DCC.h"
struct TurnoutData {
uint8_t tStatus;
uint8_t subAddress;
int id;
int address;
};
struct Turnout{
static Turnout *firstTurnout;
int num;
struct TurnoutData data;
Turnout *nextTurnout;
2020-06-22 12:58:33 +02:00
static bool activate(int n, bool state);
static Turnout* get(int);
static bool remove(int);
static void load();
static void store();
static Turnout *create(int, int, int);
static void show(Print & stream, int n);
static bool showAll(Print & stream);
2020-06-22 12:58:33 +02:00
virtual void activate(bool state);
}; // Turnout
#endif