Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
lampda::logic::alerts::Alert_LongLoopUpdate Struct Reference

This alert is raised when the main loop becomes slower than the defined behavior. This is not a critical alert, but it sually indicates that the user mode in use is too slow. More...

Inheritance diagram for lampda::logic::alerts::Alert_LongLoopUpdate:
lampda::logic::alerts::AlertBase

Public Member Functions

bool show () const override
 display this alert on the indicator
 
Type get_type () const override
 return the Defined type of this alert
 
virtual uint32_t alert_shutdown_timeout () const
 Return the timeout after which an alert will make the system auto-shutdown.
 
virtual void execute () const
 function executed when this alert is raised
 
virtual bool should_be_raised () const
 return true if this alert type should be raised
 
virtual bool should_be_cleared () const
 return true if this alert type should be cleared
 
virtual bool should_shutdown_system (const uint32_t time) final
 Return true if the system should shutdown from this alert.
 
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 (const uint32_t time)
 Update the raised time of this alert. An alert continuously firing as to be updated.
 
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.
 
virtual bool should_prevent_lamp_output () const
 override to prevent lamp output power if this alert if raised. Default to False
 
virtual bool should_prevent_battery_charge () const
 override to prevent battery charge if this alert if raised. Default to False
 
virtual bool should_prevent_usb_port_use () const
 override to prevent USB port usage if this alert if raised. Default to False
 

Public Attributes

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.
 
uint32_t loweredTime = 0
 Store the latest time at which this alert lower() was called.
 

Detailed Description

This alert is raised when the main loop becomes slower than the defined behavior. This is not a critical alert, but it sually indicates that the user mode in use is too slow.

Member Function Documentation

◆ alert_shutdown_timeout()

virtual uint32_t lampda::logic::alerts::AlertBase::alert_shutdown_timeout ( ) const
inlinevirtualinherited

Return the timeout after which an alert will make the system auto-shutdown.

Reimplemented in lampda::logic::alerts::Alert_BatteryCritical, and lampda::logic::alerts::Alert_TempCritical.

◆ execute()

virtual void lampda::logic::alerts::AlertBase::execute ( ) const
inlinevirtualinherited

function executed when this alert is raised

Reimplemented in lampda::logic::alerts::Alert_BatteryLow, and lampda::logic::alerts::Alert_TempTooHigh.

◆ get_type()

Type lampda::logic::alerts::Alert_LongLoopUpdate::get_type ( ) const
inlineoverridevirtual

return the Defined type of this alert

Implements lampda::logic::alerts::AlertBase.

◆ handle_lowered_state()

virtual bool lampda::logic::alerts::AlertBase::handle_lowered_state ( const uint32_t  time)
inlinevirtualinherited

Handler for the lowered state of the alert. If the alert is raised, lower the alert.

Returns
True if the alert was lowered by this function call

◆ handle_raised_state()

virtual bool lampda::logic::alerts::AlertBase::handle_raised_state ( const uint32_t  time)
inlinevirtualinherited

Handler for the raised state of the alert. If the alert is not raised, raise the alert.

Returns
True if the alert was raised by this function call

◆ should_be_cleared()

virtual bool lampda::logic::alerts::AlertBase::should_be_cleared ( ) const
inlinevirtualinherited

◆ should_be_raised()

virtual bool lampda::logic::alerts::AlertBase::should_be_raised ( ) const
inlinevirtualinherited

◆ should_prevent_battery_charge()

virtual bool lampda::logic::alerts::AlertBase::should_prevent_battery_charge ( ) const
inlinevirtualinherited

◆ should_prevent_lamp_output()

virtual bool lampda::logic::alerts::AlertBase::should_prevent_lamp_output ( ) const
inlinevirtualinherited

◆ should_prevent_usb_port_use()

virtual bool lampda::logic::alerts::AlertBase::should_prevent_usb_port_use ( ) const
inlinevirtualinherited

◆ show()

bool lampda::logic::alerts::Alert_LongLoopUpdate::show ( ) const
inlineoverridevirtual

display this alert on the indicator

Reimplemented from lampda::logic::alerts::AlertBase.


The documentation for this struct was generated from the following file: