Zusi 3 TCP Protocol Library
An implementation of the Zusi 3 TCP protocol in C++.
|
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 | |
Socket * | m_socket |
Manages connection to a Zusi server.
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
client_id | Null-terminated character array with an identification string for the client |
fs_data | Fuehrerstand Data ID's to subscribe to |
prog_data | Zusi program status ID's to subscribe to |
bedienung | Subscribe to input events if true |
bool zusi::ClientConnection::sendInput | ( | Tastatur | taster, |
TastaturKommand | kommand, | ||
TastaturAktion | aktion, | ||
int16_t | position | ||
) |
Send an INPUT command.