Model Railroad System  2.2.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
raildriver::RaildriverClient Class Reference

Raildriver Client class – connects to the Raildriver daemon. More...

Public Member Functions

 RaildriverClient (name,...)
 Construct a RaildriverClient object. More...
 
 ~RaildriverClient ()
 close the connection. More...
 
 clear ()
 Send a CLEAR message to the daemon. More...
 
 mask (...)
 Send a MASK message to the daemon. More...
 
 leds (ledstring)
 Send a LED message to the daemon. More...
 
 speaker (onoff)
 Turn the speaker on or off. More...
 

Private Member Functions

 _readevent ()
 Handle messages from the daemon. More...
 
 _poller ()
 Polling function. More...
 

Private Attributes

 socket
 The socket descriptor connected to the daemon. More...
 
 pollid
 Holds the poll after id. More...
 

Detailed Description

Raildriver Client class – connects to the Raildriver daemon.

Polls at interals for Raildriver input events.

Options:

Constructor & Destructor Documentation

◆ RaildriverClient()

raildriver::RaildriverClient::RaildriverClient ( name  ,
  ... 
)

Construct a RaildriverClient object.

◆ ~RaildriverClient()

raildriver::RaildriverClient::~RaildriverClient ( )

close the connection.

Member Function Documentation

◆ _poller()

raildriver::RaildriverClient::_poller ( )
private

Polling function.

◆ _readevent()

raildriver::RaildriverClient::_readevent ( )
private

Handle messages from the daemon.

◆ clear()

raildriver::RaildriverClient::clear ( )

Send a CLEAR message to the daemon.

◆ leds()

raildriver::RaildriverClient::leds ( ledstring  )

Send a LED message to the daemon.

Parameters
ledstringLed string to display.

◆ mask()

raildriver::RaildriverClient::mask (   ...)

Send a MASK message to the daemon.

Parameters
...Mask values

◆ speaker()

raildriver::RaildriverClient::speaker ( onoff  )

Turn the speaker on or off.

Parameters
onoffBoolean indicating on (true) or off (false).

Member Data Documentation

◆ pollid

raildriver::RaildriverClient::pollid
private

Holds the poll after id.

◆ socket

raildriver::RaildriverClient::socket
private

The socket descriptor connected to the daemon.