#include <FileCommMonitor.hh>
This class monitors a set of file descriptors in a sub-thread, reads messages from them, and uses the CommManager to process them. The file descriptors are derived from FileCommPortal instances.
Public Member Functions | |
FileCommMonitor (CommManager *mgr) | |
~FileCommMonitor () | |
void | registerPortal (FileCommPortal *portal) |
bool | unregisterPortal (FileCommPortal *portal) |
Static Public Member Functions | |
FileCommMonitor * | instance (CommManager *mgr) |
|
Constructor which connects the monitor to a manager. Note that this constructor has the side effect of kicking off a thread which is monitoring the registered FileCommPortals for input. If there are no FileCommPortals, it simply wakes up every 100ms to check to see if there have been any registered. |
|
Destructor. Shuts down the monitoring thread. |
|
Returns the file monitor instance. Looks up the file monitor instance in the communications manager's symbol table. If it is there, it returns it, otherwise it creates one and returns it.
|
|
Register a file communications portal [in] portal The file descriptor based portal to monitor |
|
Unregister a file communications portal [in] portal The file descriptor based portal to stop monitoring
|