Пример #1
0
        public CMainWindow()
        {
            InitializeComponent();

            /* When the application window is created, we create our new connection class as well.
             * ReceiveEvent<T> is a generic delegate type for you to use. See the Object Browser for details. */

            MyTCPConnection = new ZusiTcpConn(
                "Zielbremsen v0.8beta",                         // The name of this application (Shows up on the server's list)
                // ClientPriority.Low                                 // The priority with which the server should treat you
                ClientPriority.High,
                new ReceiveEvent <float>(HandleIncomingData), // A delegate method for the connection class to call when it receives float data (may be null)
                null,                                         // A delegate method for the connection class to call when it receives string data (may be null)
                null                                          //DEBUG: Using v 1.0.0 of Zusi-Datenausgabe.dll
                                                              // (Using v 1.1.6 of Zusi-Datenausgabe.dll)
                );



            MyTCPConnection.RequestData(2654); // "Bremshundertstel"
            MyTCPConnection.RequestData(2561); // "Geschwindigkeit"
            MyTCPConnection.RequestData(2563); // "Druck Bremszylinder"
            MyTCPConnection.RequestData(2645); // "Strecken-Km in Metern"
            MyTCPConnection.RequestData(2599); // "LM Schleudern"
        }
Пример #2
0
        public CMainWindow()
        {
            InitializeComponent();

            /* When the application window is created, we create our new connection class as well.
             * ReceiveEvent<T> is a generic delegate type for you to use. See the Object Browser for details. */

            MyTCPConnection = new ZusiTcpConn(
             "Zielbremsen v0.8beta",                            // The name of this application (Shows up on the server's list)
             // ClientPriority.Low                                 // The priority with which the server should treat you
             ClientPriority.High,
             new ReceiveEvent<float>(HandleIncomingData),   // A delegate method for the connection class to call when it receives float data (may be null)
             null,                                          // A delegate method for the connection class to call when it receives string data (may be null)
             null                                           //DEBUG: Using v 1.0.0 of Zusi-Datenausgabe.dll
                                                            // (Using v 1.1.6 of Zusi-Datenausgabe.dll)
            );

            MyTCPConnection.RequestData(2654); // "Bremshundertstel"
            MyTCPConnection.RequestData(2561); // "Geschwindigkeit"
            MyTCPConnection.RequestData(2563); // "Druck Bremszylinder"
            MyTCPConnection.RequestData(2645); // "Strecken-Km in Metern"
            MyTCPConnection.RequestData(2599); // "LM Schleudern"
        }
Пример #3
0
        public CMainWindow()
        {
            InitializeComponent();

            //we need to define a new connection to the TCP server:
            MyTCPConnection = new ZusiTcpConn(
             "ZusiMeter - v" + Assembly.GetExecutingAssembly().GetName().Version.ToString(), // Name and version, showing up in server's list
             ClientPriority.Low);

            MyTCPConnection.ErrorReceived += TCPConnection_ErrorReceived;
            MyTCPConnection.FloatReceived += TCPConnection_FloatReceived;
            MyTCPConnection.BoolReceived += TCPConnection_BoolReceived;
            //MyTCPConnection.IntReceived += TCPConnection_IntReceived;
            //MyTCPConnection.StringReceived += TCPConnection_StringReceived;
            MyTCPConnection.DateTimeReceived += TCPConnection_DateTimeReceived;
            //MyTCPConnection.BrakeConfigReceived += TCPConnection_BrakeConfigReceived;
            MyTCPConnection.DoorsReceived += TCPConnection_DoorsReceived;
            //MyTCPConnection.PZBReceived += TCPConnection_PZBReceived;

            #region RequestData
            MyTCPConnection.RequestData(2561); // "Geschwindigkeit"
            MyTCPConnection.RequestData(2578); // "AFB Soll-Geschwindigkeit"
            MyTCPConnection.RequestData(2636); // "LZB Soll-Geschwindigkeit"
            MyTCPConnection.RequestData(2573); // "LZB Ziel-Geschwindigkeit"
            MyTCPConnection.RequestData(2635); // "LM LZB-Zielweg (ab 0)"

            MyTCPConnection.RequestData(2654); // "Bremshundertstel"
            MyTCPConnection.RequestData(2562); // "Druck Hauptluftleitung"
            MyTCPConnection.RequestData(2563); // "Druck Bremszylinder"
            MyTCPConnection.RequestData(2564); // "Druck Hauptluftbehälter"
            MyTCPConnection.RequestData(2579); // "Druck Hilfsluftbehälter"

            MyTCPConnection.RequestData(2645); // "Strecken-Km in Metern"

            MyTCPConnection.RequestData(2611); // "Schalter Fahrstufen"
            MyTCPConnection.RequestData(2576); // "Fahrstufe"
            MyTCPConnection.RequestData(2615); // "Schalter AFB-Geschwindigkeit"
            MyTCPConnection.RequestData(2612); // "Schalter Führerbremsventil"
            //###//
            MyTCPConnection.RequestData(2599); // "LM Schleudern"
            MyTCPConnection.RequestData(2596); // "LM Sifa"

            MyTCPConnection.RequestData(2616); // "Schalter AFB ein/aus"
            MyTCPConnection.RequestData(2621); // "Schalter Sifa"

            MyTCPConnection.RequestData(2648); // "Reisezug"
            MyTCPConnection.RequestData(2647); // "Autopilot"

            //###PZB-90###//
            MyTCPConnection.RequestData(2583); // "LM PZB Zugart U"
            MyTCPConnection.RequestData(2584); // "LM PZB Zugart M"
            MyTCPConnection.RequestData(2585); // "LM PZB Zugart O"
            MyTCPConnection.RequestData(2580); // "LM PZB 1000Hz"
            MyTCPConnection.RequestData(2581); // "LM PZB 500Hz"
            MyTCPConnection.RequestData(2582); // "LM PZB Befehl"
            //###//

            //###LZB###//
            MyTCPConnection.RequestData(2587); // "LM LZB G"
            MyTCPConnection.RequestData(2590); // "LM LZB Ende"
            MyTCPConnection.RequestData(2592); // "LM LZB B"
            MyTCPConnection.RequestData(2593); // "LM LZB S "
            MyTCPConnection.RequestData(2594); // "LM LZB Ü"
            MyTCPConnection.RequestData(2595); // "LM LZB Prüfen"
            //###//

            //###//
            MyTCPConnection.RequestData(2610); // "LM Uhrzeit (digital)"

            MyTCPConnection.RequestData(2646); // "Türen"

            ////TODO MyTCPConnection.RequestData(2656); // "Zugdatei"
            //TODO: is this needed? MyTCPConnection.RequestData(2574); // "LZB/AFB Soll-Geschwindigkeit"
            //TODO: is this needed? MyTCPConnection.RequestData(2615); // "Schalter AFB-Geschwindigkeit"
            #endregion
        }