|
Model Railroad System 2.2.2
|
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... | |
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.
| 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.
| script | The event script. |
| port | The serial port device file. |
| xpressnet::XpressNetEvent::~XpressNetEvent | ( | ) |
Destructor.
The destructor closes the serial port and deletes the event source.
|
private |
The event handler.
References linuxgpio::in, and linuxgpio::out.
|
private |
Holds the event script.
|
private |
Holds the XPressNet component.