|
| class | Tty |
| | The Tty class is a small class to hold pts/tty information. It is essentially a struct with a parameterized constructor. More...
|
| |
|
|
| TtyMonitor () |
| | Constructor.
|
| |
| std::vector< fs::path > | GetTtyDevices () const |
| | Returns a copy of the vector of pts/tty paths. A copy is returned to avoid holding the lock on mtx_tty_monitor for an extended period. More...
|
| |
|
void | UpdateTtyDevices () |
| | Initializes/Updates the pts/tty device paths to monitor.
|
| |
|
void | TtyMonitorThread () |
| | 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 | GetLastTtyActiveTime () const |
| | Returns the overall last active time of all of the monitored pts/ttys. More...
|
| |
|
|
std::mutex | mtx_tty_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_tty_monitor_thread |
| | This provides lock control for the tty monitor worker thread itself.
|
| |
|
std::vector< fs::path > | m_tty_device_paths |
| | Holds the device paths of the monitored pts/ttys. Note that this is duplicative of information in the individual tty objects, but it allows efficient comparison of the inventory of ttys.
|
| |
|
std::vector< Tty > | m_ttys |
| | std::vector holding the tty objects.
|
| |
|
std::atomic< int64_t > | m_last_ttys_active_time |
| | Atomic that holds the overall last active time across all of the monitored pts/ttys.
|
| |
|
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.
|
| |
◆ EnumerateTtyDevices()
| std::vector< fs::path > TtyMonitor::EnumerateTtyDevices |
( |
| ) |
|
|
staticprivate |
Provides the enumerated pts/tty devices.
- Returns
- std::vector<fs::path> of enumerated pts/tty devices.
◆ GetLastTtyActiveTime()
| int64_t TtyMonitor::GetLastTtyActiveTime |
( |
| ) |
const |
Returns the overall last active time of all of the monitored pts/ttys.
- Returns
- Unix Epoch time in seconds
◆ GetTtyDevices()
| std::vector< fs::path > TtyMonitor::GetTtyDevices |
( |
| ) |
const |
Returns a copy of the vector of pts/tty paths. A copy is returned to avoid holding the lock on mtx_tty_monitor for an extended period.
- Returns
- std::vector<fs::path> of the pts/tty paths
◆ IsInitialized()
| bool TtyMonitor::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
The documentation for this class was generated from the following files: