This alert is raised when the system fails to go to sleep. There is no way to recover from this, as we depend on the low level handlers for this functionality.
More...
|
| bool | show () const override |
| | display this alert on the indicator
|
| |
| Type | get_type () const override |
| | return the Defined type of this alert
|
| |
| bool | should_be_cleared () const override |
| | Cleared after a delay.
|
| |
| bool | should_prevent_lamp_output () const override |
| | Prevent output usage.
|
| |
| bool | should_prevent_battery_charge () const override |
| | Prevent battery charge.
|
| |
| bool | should_prevent_usb_port_use () const override |
| | Prevent USB use.
|
| |
| virtual uint32_t | alert_shutdown_timeout () const |
| | Return the timeout after which an alert will make the system auto-shutdown.
|
| |
|
virtual void | execute_loop () const |
| | function executed if this alert is raised, every loop turns
|
| |
| virtual void | on_raised () const |
| | function executed when this alert is raised
|
| |
|
virtual void | on_lowered () const |
| | function executed when this alert is cleared
|
| |
| virtual bool | should_be_raised () const |
| | return true if this alert type should be raised
|
| |
| virtual brightness_t | max_brightness () const |
| | Maximum output brightness allowed while this alert is raised. The system limit is the lowest of the raised alerts limits, see handle_all()
|
| |
|
virtual bool | should_shutdown_system () final |
| | Return true if the system should shutdown from this alert.
|
| |
|
uint32_t | time_since_raised () const |
| | Time elapsed since the latest raise (or refresh) of this alert, 0 if the raise time is not set. Synchronized with the raise time refreshes. Can be called from any thread.
|
| |
| virtual bool | handle_raised_state (const uint32_t time) |
| | Handler for the raised state of the alert. If the alert is not raised, raise the alert.
|
| |
|
void | update_raise_time_locked () |
| | Update the raised time of this alert. An alert continuously firing as to be updated. Call it with _raiseTimeMutex held (see AlertManager_t::raise).
|
| |
| virtual bool | handle_lowered_state (const uint32_t time) |
| | Handler for the lowered state of the alert. If the alert is raised, lower the alert.
|
| |
|
|
bool | _isRaisedHandled = false |
| | Alert raise signal has been handled.
|
| |
|
bool | _isLoweredHandled = false |
| | Alert lower signal has been handled.
|
| |
|
uint32_t | raisedTime = 0 |
| | Store the latest time at which this alert raise() was called, 0 if not set. Refreshed by raise() from other threads, while the main loop reads it for the timeout decisions: only access it under _raiseTimeMutex (see time_since_raised())
|
| |
|
bool | isRaisedTimeSet = false |
| | True if raisedTime holds a raise time (that can be 0). Only access it under _raiseTimeMutex.
|
| |
|
std::atomic< uint32_t > | refreshCount {0} |
| | Incremented on every raise() refresh of the raised alert, under _raiseTimeMutex. See AlertManager_t::clear_unless_refreshed.
|
| |
|
uint32_t | loweredTime = 0 |
| | Store the latest time at which this alert lower() was called.
|
| |
This alert is raised when the system fails to go to sleep. There is no way to recover from this, as we depend on the low level handlers for this functionality.