Zusi 3 TCP Protocol Library
An implementation of the Zusi 3 TCP protocol in C++.
Public Member Functions | List of all members
zusi::ClientConnection Class Reference

Manages connection to a Zusi server. More...

#include <Zusi3TCP.h>

Inherits zusi::Connection.

Public Member Functions

 ClientConnection (Socket *socket)
 
bool connect (const char *client_id, const std::vector< FuehrerstandData > &fs_data, const std::vector< ProgData > &prog_data, bool bedienung)
 Set up connection to server. More...
 
bool sendInput (Tastatur taster, TastaturKommand kommand, TastaturAktion aktion, int16_t position)
 Send an INPUT command. More...
 
std::string getZusiVersion ()
 Get the version string supplied by the server.
 
std::string getConnectionnfo ()
 Get the connection info string supplied by the server.
 
- Public Member Functions inherited from zusi::Connection
 Connection (Socket *socket)
 Create connection which will communicate over socket. More...
 
bool receiveMessage (Node &dest) const
 Receive a message.
 
bool sendMessage (Node &src)
 Send a message.
 

Additional Inherited Members

- Protected Attributes inherited from zusi::Connection
Socketm_socket
 

Detailed Description

Manages connection to a Zusi server.

Member Function Documentation

bool zusi::ClientConnection::connect ( const char *  client_id,
const std::vector< FuehrerstandData > &  fs_data,
const std::vector< ProgData > &  prog_data,
bool  bedienung 
)

Set up connection to server.

Sends the HELLO and NEEDED_DATA commands and processes the results

Parameters
client_idNull-terminated character array with an identification string for the client
fs_dataFuehrerstand Data ID's to subscribe to
prog_dataZusi program status ID's to subscribe to
bedienungSubscribe to input events if true
Returns
True on success
bool zusi::ClientConnection::sendInput ( Tastatur  taster,
TastaturKommand  kommand,
TastaturAktion  aktion,
int16_t  position 
)

Send an INPUT command.

Returns
True on success

The documentation for this class was generated from the following files: