|
| enum | State { UNKNOWN,
NORMAL,
FORCED_ACTIVE,
FORCED_IDLE
} |
| |
|
|
| IdleDetectMonitor () |
| | Constructor.
|
| |
|
void | IdleDetectMonitorThread () |
| | Method to instantiate the tty monitor thread.
|
| |
| bool | IsInitialized () const |
| | Provides a flag to indicate whether the monitor has been initialized. This is used in main in the application control paths. More...
|
| |
| int64_t | GetLastIdleDetectActiveTime () const |
| | Returns the overall last active time of all of the message receipts from idle_detect instances. More...
|
| |
| State | GetState () const |
| | Returns the state of the idle monitor. This is NORMAL, FORCED_ACTIVE or FORCED_IDLE. More...
|
| |
| std::string | StateToString () const |
| | Returns the string representation of the idle monitor object state. More...
|
| |
|
| static std::string | StateToString (const State &state) |
| | Returns the string representation of the input state enum value. More...
|
| |
|
|
std::mutex | mtx_idle_detect_monitor |
| | This is the mutex member that provides lock control for the tty monitor object. This is used to ensure the tty monitor is thread-safe.
|
| |
|
std::mutex | mtx_idle_detect_monitor_thread |
| | This provides lock control for the tty monitor worker thread itself.
|
| |
|
std::atomic< int64_t > | m_last_idle_detect_active_time |
| | Atomic that holds the overall last active time across all of the monitored pts/ttys.
|
| |
|
std::atomic< State > | m_state |
| | Holds the current state of the idle monitor. NORMAL means idle detect follows the normal threshold (trigger) rules for idle detection. FORCED_ACTIVE means the user has forced the system to be active and FORCED_IDLE means the user has forced the system to be idle. The state is set by the event_detect process and is used to determine the ultimate last active time.
|
| |
|
std::atomic< bool > | m_initialized |
| | This holds the flag as to whether the tty monitor has been initialized and is provided by the IsInitialized() public method.
|
| |
◆ GetLastIdleDetectActiveTime()
| int64_t IdleDetectMonitor::GetLastIdleDetectActiveTime |
( |
| ) |
const |
Returns the overall last active time of all of the message receipts from idle_detect instances.
- Returns
- Unix Epoch time in seconds
◆ GetState()
| IdleDetectMonitor::State IdleDetectMonitor::GetState |
( |
| ) |
const |
Returns the state of the idle monitor. This is NORMAL, FORCED_ACTIVE or FORCED_IDLE.
- Returns
- State enum value
◆ IsInitialized()
| bool IdleDetectMonitor::IsInitialized |
( |
| ) |
const |
Provides a flag to indicate whether the monitor has been initialized. This is used in main in the application control paths.
- Returns
- boolean flag
◆ StateToString() [1/2]
| std::string IdleDetectMonitor::StateToString |
( |
const State & |
state | ) |
|
|
static |
Returns the string representation of the input state enum value.
- Parameters
-
- Returns
- string representation of the state
◆ StateToString() [2/2]
| std::string IdleDetectMonitor::StateToString |
( |
| ) |
const |
Returns the string representation of the idle monitor object state.
- Returns
- string represenation of the state
The documentation for this class was generated from the following files: