Model Railroad System 2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
xpressnet::XpressNetEvent Class Reference

XPressNet Event class. More...

Public Member Functions

 XpressNetEvent (name, script, port="/dev/ttyS0")
 Constructor. More...
 
 ~XpressNetEvent ()
 Destructor. More...
 

Private Member Functions

 _eventhandler ()
 The event handler. More...
 

Private Attributes

 xpressnet
 Holds the XPressNet component. More...
 
 _script
 Holds the event script. More...
 

Detailed Description

XPressNet Event class.

This class implements the Tcl Event interface to the XPressNet serial port interface. A Tcl script is bound to XPressNet serial port events. This script is called from the event procedures when XPressNet events occur.

Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ XpressNetEvent()

xpressnet::XpressNetEvent::XpressNetEvent ( name  ,
script  ,
port  = "/dev/ttyS0" 
)

Constructor.

The constructor opens serial port and initializes the port, stashes the interpreter and creates an event source.

Parameters
scriptThe event script.
portThe serial port device file.

◆ ~XpressNetEvent()

xpressnet::XpressNetEvent::~XpressNetEvent ( )

Destructor.

The destructor closes the serial port and deletes the event source.

Member Function Documentation

◆ _eventhandler()

xpressnet::XpressNetEvent::_eventhandler ( )
private

The event handler.

References linuxgpio::in, and linuxgpio::out.

Member Data Documentation

◆ _script

xpressnet::XpressNetEvent::_script
private

Holds the event script.

◆ xpressnet

xpressnet::XpressNetEvent::xpressnet
private

Holds the XPressNet component.