]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/turnout.h
Forgot to add the new files
[r2c2.git] / source / libmarklin / turnout.h
index 0928eadc445e48311b9c075a4b483e8374b77c20..c7a603c78e53db9224b75951aa3474d107c62338 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of the MSP Märklin suite
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -17,26 +17,33 @@ Distributed under the GPL
 namespace Marklin {
 
 class Control;
+class Reply;
 
 class Turnout
 {
+public:
+       sigc::signal<void, unsigned> signal_path_changing;
+       sigc::signal<void, unsigned> signal_path_changed;
+
 private:
-       Control  &control;
+       Control &control;
        unsigned addr;
-       unsigned route;
+       unsigned char path;
+       unsigned char pending_path;
+       unsigned char pending_cmds;
+       bool dual;
+       bool on;
 
 public:
-       sigc::signal<void, unsigned> signal_route_changed;
-
-       Turnout(Control &, unsigned);
+       Turnout(Control &, unsigned, bool =false);
 
-       void     set_route(unsigned);
+       void set_path(unsigned char);
        unsigned get_address() const { return addr; }
-       unsigned get_route() const   { return route; }
+       unsigned char get_path() const { return path; }
 private:
-       void command(bool);
-       void status_reply(Error, const std::string &);
-       bool switch_timeout();
+       void command(unsigned char);
+       void command_reply(const Reply &, unsigned char);
+       void status_reply(const Reply &, unsigned char);
        void turnout_event(unsigned, bool);
 };