class SerialService
|
Thread pool service for serial ports.
More... |
|
|
Public Members
Protected Members
Detailed Description
The SerialService is a thead service object that is meant to service
attached serial ports. Multiple pool objects may be created and
multiple serial ports may be attached to the same thread of
of execution. This allows one to balance threads and the serial ports
they service.
void OnUpdate (unsigned char flag)
|
[protected virtual]
A virtual handler for processing user defined update
requests (1-254) which have been posted through Update.
Parameters:
[protected virtual]
A virtual handler for event loop calls. This can be
used to extend event loop processing.
[protected virtual]
A virtual handler for adding support for additional
callback events into SerialPort.
Parameters:
serial | port currently being evaluated.
|
void Update (unsigned char flag = 0xff)
|
Notify service thread that a port has been added or
removed, or a timer changed, so that a new schedule
can be computed for expiring attached ports. This
can also be used to pass requests to the OnUpdate()
event handler.
Parameters:
flag | event for OnUpdate, termination, or reschedule.
|
SerialService (int pri = 0)
|
Create a service thread for attaching serial ports. The
thread begins execution with the first attached port.
Parameters:
pri | of this thread to run under.
|
Terminate the service thread and update attached objects.
inline int getCount (void)
|
Get current reference count. This can be used when selecting
the lead used service handler from a pool.
Returns: count of active ports.
- Author: David Sugar <dyfet@ostel.com>
- Generated: dyfet@home.sys on Tue Apr 18 21:24:04 200.