#ifndef _INTERFACE_H_ #define _INTERFACE_H_ #include "modelbahn.h" #include "server.h" #include "UDPTCPNetwork.h" #include "json.h" #define INTF_F_CONNECTED 0x0001 #define INTF_F_POWER 0x0002 #define INTF_F_STOP 0x0004 #define INTF_F_SHORT_CIRCUIT 0x0008 #define INTF_F_PROGRAMMING 0x0010 #define INTF_F_NEEDUPDATE 0x8000 // if something changes during the Loop class Interface { private: public: bool needs_update; char name[REFERENCENAME_LEN]; char host[NET_HOSTLEN]; int flags; int type; Interface(); virtual ~Interface(); virtual void Connect(); virtual void Disconnect(); virtual void PowerOnOff(int onoff); virtual void SetLocoSpeed(Locomotive *l, int step); virtual void SetLocoFunction(Locomotive *l, int func, int value); virtual void SetTurnout(Turnout *t, int active, int motoractive); virtual bool IsConnected(); virtual bool IsPoweron(); virtual bool IsSortCircuit(); virtual bool IsProgramminnMode(); virtual bool IsEmergencyStop(); virtual int Loop(); }; #endif