#include <CFdMonitor.h>
Inheritance diagram for CFdMonitor:
Public Types | |
enum | FdConditions { FD_READABLE = 0, FD_WRITABLE = 1, FD_EXCEPTION = 2 } |
Public Member Functions | |
CFdMonitor (int am_nFd, bool am_fTimedWait=true) | |
CFdMonitor (const STD(string)&rName, int am_nFd, bool am_fTimedWait=true) | |
CFdMonitor (const char *pName, int am_nFd, bool am_fTimedWait=true) | |
int | operator== (const CFdMonitor &aCFdMonitor) const |
virtual | ~CFdMonitor () |
int | getFd () const |
unsigned int | getConditionMask () const |
int | getLastEventMask () const |
void | MonitorReadable (bool fReadable=true) |
void | MonitorWritable (bool fWritable=true) |
void | MonitorExceptions (bool fException=true) |
virtual CEventMonitor::result | operator() () |
virtual | STD (string) DescribeSelf() |
Protected Member Functions | |
void | setFd (const int am_nFd) |
void | setConditionMask (const unsigned int am_nConditionMask) |
void | setLastEventMask (const int am_fLastEventMask) |
Private Member Functions | |
CFdMonitor (const CRegisteredObject &aCRegisteredObject) | |
CFdMonitor | operator= (const CRegisteredObject &aCRegisteredObject) |
Assignment is forbidden for now. | |
Private Attributes | |
int | m_nFd |
unsigned int | m_nConditionMask |
int | m_fLastEventMask |
Monitoring is done via the select(2) system service. Note that this can yield some unexpected results. For example, in some operating systems, tape drives are never considered readable without blocking.
Author: Jason Venema NSCL Michigan State University East Lansing, MI 48824-1321 mailto:venemaja@msu.edu
Definition at line 319 of file CFdMonitor.h.
|
Mask of the last set of bits to be detected Definition at line 329 of file CFdMonitor.h. |
|
Definition at line 338 of file CFdMonitor.h. References CNamedObject::AppendClassInfo(), m_fLastEventMask, m_nConditionMask, and m_nFd. |
|
Definition at line 345 of file CFdMonitor.h. References CNamedObject::AppendClassInfo(), m_fLastEventMask, m_nConditionMask, and m_nFd. |
|
Definition at line 352 of file CFdMonitor.h. References CNamedObject::AppendClassInfo(), m_fLastEventMask, m_nConditionMask, and m_nFd. |
|
Definition at line 369 of file CFdMonitor.h. |
|
|
|
Definition at line 386 of file CFdMonitor.h. |
|
Definition at line 381 of file CFdMonitor.h. Referenced by CFdReactor::OnEvent(). |
|
Definition at line 391 of file CFdMonitor.h. Referenced by CFdReactor::OnEvent(). |
|
Operation Type: Mutator Purpose: Sets or clears the FD_EXCEPTION bit in m_nConditionMask. Definition at line 349 of file CFdMonitor.cpp. References m_nConditionMask. |
|
Operation Type: Mutator Purpose: Sets or clears the FD_READABLE bit in m_nConditionMask. Definition at line 319 of file CFdMonitor.cpp. References m_nConditionMask. |
|
Operation Type: Mutator Purpose: Sets or clears the FD_WRITABLE bit in the m_nConditionMask attribute. Definition at line 334 of file CFdMonitor.cpp. References m_nConditionMask. |
|
Operation Type: Interface Implementation Purpose: Implements a wait for a single file descriptor event as described in the mask. Returns one of: Occured - one of the masked conditions occured. TimedOut - Timeout was enabled and none of the conditions occured within the timeout. Error - An error condition ocurred. Implements CEventMonitor. Reimplemented in CServerMonitor. Definition at line 372 of file CFdMonitor.cpp. References CEventMonitor::getTimedWait(), CEventMonitor::getTimeout(), m_fLastEventMask, m_nConditionMask, m_nFd, and NULL. |
|
Assignment is forbidden for now.
Reimplemented from CEventMonitor. |
|
Definition at line 360 of file CFdMonitor.h. References m_fLastEventMask, m_nConditionMask, m_nFd, and CEventMonitor::operator==(). |
|
Definition at line 404 of file CFdMonitor.h. References m_nConditionMask. |
|
Definition at line 399 of file CFdMonitor.h. References m_nFd. |
|
Definition at line 409 of file CFdMonitor.h. References m_fLastEventMask. |
|
The name of the object Reimplemented from CNamedObject. Reimplemented in CServerMonitor. |
|
Conditions which will be monitored by the monitor for the file descriptor. Definition at line 324 of file CFdMonitor.h. Referenced by CFdMonitor(), operator()(), operator==(), and setLastEventMask(). |
|
File descriptor which will be monitored by the monitor Definition at line 322 of file CFdMonitor.h. Referenced by CFdMonitor(), MonitorExceptions(), MonitorReadable(), MonitorWritable(), operator()(), operator==(), and setConditionMask(). |
|
Definition at line 321 of file CFdMonitor.h. Referenced by CFdMonitor(), operator()(), operator==(), and setFd(). |