VirtualClient Class Reference

Implement a pure virtual class for the network clients. More...

#include <virtual_client.h>

Inherited by SrcpVirtualClient.

List of all members.

Public Slots

void setLocalPort (quint16 port)
void setServerPort (quint16 port)
void setServerAddress (QString address)
virtual void setConnection (const bool &c)=0
virtual void setPower (const bool &power)=0
virtual void requestNewRailState ()=0
virtual void setNewEngineState ()=0

Signals

void errorOccured (QString)
 Emitted if an error occurs.
void connectionErrorOccured (QString)
 FIXME not used ?
void writeErrorOccured (QString)
void readErrorOccured (QString)
void infoReceived (QString)
void infoReceivedRailState (int, bool)
void infoReceivedEngineState (int, bool, int, bool, bool, bool, bool)
void infoReceivedPower (bool)

Public Member Functions

 VirtualClient (QObject *parent)
 Simple contructor.

Protected Attributes

quint16 _localPort
 Store the client port.
quint16 _serverPort
 Store the server port.
QString _serverAddress
 Store the server address.


Detailed Description

Implement a pure virtual class for the network clients.

Definition at line 22 of file virtual_client.h.


Constructor & Destructor Documentation

VirtualClient::VirtualClient ( QObject *  parent  ) 

Simple contructor.

Definition at line 5 of file virtual_client.cpp.

References _localPort, _serverAddress, and _serverPort.


Member Function Documentation

void VirtualClient::setLocalPort ( quint16  port  )  [slot]

Set the client port

Parameters:
port 

Definition at line 23 of file virtual_client.cpp.

References _localPort.

void VirtualClient::setServerPort ( quint16  port  )  [slot]

Set the server port

Parameters:
port 

Definition at line 13 of file virtual_client.cpp.

References _serverPort.

void VirtualClient::setServerAddress ( QString  address  )  [slot]

Set the server address

Parameters:
address 

Definition at line 18 of file virtual_client.cpp.

References _serverAddress.

virtual void VirtualClient::setConnection ( const bool &  c  )  [pure virtual, slot]

Connect or disconnect form host, need to be implement in a concrete class

Parameters:
c The connection state to set

Implemented in SrcpVirtualClient.

virtual void VirtualClient::setPower ( const bool &  power  )  [pure virtual, slot]

Set the power in the state power on the railroad model, need to be implement in a concrete class

Parameters:
power The power state to set

Implemented in Srcp083Client.

virtual void VirtualClient::requestNewRailState (  )  [pure virtual, slot]

Send a request to the server for setting the new rail state on the railroad model, need to be implement in a concrete class. The rail is the sender of the signal.

Implemented in Srcp083Client.

virtual void VirtualClient::setNewEngineState (  )  [pure virtual, slot]

Apply the new engine state on the railroad model, need to be implement in a concrete class

Implemented in Srcp083Client.

void VirtualClient::errorOccured ( QString   )  [signal]

void VirtualClient::connectionErrorOccured ( QString   )  [signal]

FIXME not used ?

void VirtualClient::writeErrorOccured ( QString   )  [signal]

void VirtualClient::readErrorOccured ( QString   )  [signal]

void VirtualClient::infoReceived ( QString   )  [signal]

Transmitt the received info to the GUI FIXME not used ?

Referenced by SrcpVirtualClient::SrcpVirtualClient().

void VirtualClient::infoReceivedRailState ( int  ,
bool   
) [signal]

Transmitt the received info about a rail state The parameters are address, state)

Referenced by Srcp083Client::parseInfo().

void VirtualClient::infoReceivedEngineState ( int  ,
bool  ,
int  ,
bool  ,
bool  ,
bool  ,
bool   
) [signal]

Transmitt the received info about an engine state The parameters are : address direction speed(in %) f1 f2 f3 f4

Referenced by Srcp083Client::parseInfo().

void VirtualClient::infoReceivedPower ( bool   )  [signal]

Transmitt the received info about the power state The parameter is the power state.

Referenced by Srcp083Client::parseInfo().


Member Data Documentation

quint16 VirtualClient::_localPort [protected]

Store the client port.

Definition at line 93 of file virtual_client.h.

Referenced by setLocalPort(), and VirtualClient().

quint16 VirtualClient::_serverPort [protected]

Store the server port.

Definition at line 96 of file virtual_client.h.

Referenced by SrcpVirtualClient::setConnection(), setServerPort(), and VirtualClient().

QString VirtualClient::_serverAddress [protected]

Store the server address.

Definition at line 99 of file virtual_client.h.

Referenced by SrcpVirtualClient::setConnection(), setServerAddress(), and VirtualClient().


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

Generated on Sun Jun 22 23:46:29 2008 for OrK by  doxygen 1.5.6