1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 13:21:23 +01:00
CommandStation-EX/Turnouts.h
Asbelos b89c9068ff Compileable JMRIParser
Has Turnout, Output Sensor support.
Needs further cleaning and cross checking against spec.
May implement Daves Comms manager etc.
2020-06-03 14:26:49 +01:00

30 lines
573 B
C

#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;
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(Stream & stream, int n);
static void showAll(Stream & stream);
}; // Turnout
#endif