Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
gva::Hmi Struct Reference

State Machine Base Class Declaration. More...

#include <base_hmi.h>

Inheritance diagram for gva::Hmi:
Inheritance graph
Collaboration diagram for gva::Hmi:
Collaboration graph

Public Member Functions

virtual ~Hmi ()=default
 The default constructor.
 
virtual void react (EventKeyPowerOn const &)
 Nothing to do in base class.
 
virtual void react (EventKeySA const &)
 Nothing to do in base class.
 
virtual void react (EventKeyWPN const &)
 Nothing to do in base class.
 
virtual void react (EventKeyDEF const &)
 Nothing to do in base class.
 
virtual void react (EventKeySYS const &)
 Nothing to do in base class.
 
virtual void react (EventKeyDRV const &)
 Nothing to do in base class.
 
virtual void react (EventKeySTR const &)
 Nothing to do in base class.
 
virtual void react (EventKeyCOM const &)
 Nothing to do in base class.
 
virtual void react (EventKeyBMS const &)
 Nothing to do in base class.
 
virtual void react (EventKeyAlarms const &)
 Nothing to do in base class.
 
virtual void react (EventKeyFunction const &)
 Nothing to do in base class.
 
virtual void entry (void)
 entry actions in some States
 
virtual void exit (void)
 no exit actions
 

Static Public Member Functions

static void KeySide (GvaKeyEnum key)
 Process side label key presses.
 
static GvaKeyEnum Key (GvaKeyEnum key)
 Process key presses.
 
static GvaKeyEnum KeySA (GvaKeyEnum key, GvaKeyEnum *current)
 Process SA key press.
 
static GvaKeyEnum KeyWPN (GvaKeyEnum key)
 Process WPN key press.
 
static GvaKeyEnum KeyDEF (GvaKeyEnum key)
 Process DEF key press.
 
static GvaKeyEnum KeySYS (GvaKeyEnum key)
 Process SYS key press.
 
static GvaKeyEnum KeyDRV (GvaKeyEnum key)
 Process DRV key press.
 
static GvaKeyEnum KeySTR (GvaKeyEnum key)
 Process STR key press.
 
static GvaKeyEnum KeyCOM (GvaKeyEnum key)
 Process COM key press.
 
static GvaKeyEnum KeyBMS (GvaKeyEnum key)
 Process BMS key press.
 
static GvaKeyEnum KeyAlarms (GvaKeyEnum key)
 Process Alarms key press.
 
static void Reset ()
 Reset the HMI widgets.
 
static void SetCanvasPng (const std::string &file)
 Set a screen PNG file as background.
 
static ScreenGvaGetRendrer ()
 Get the screen render object.
 
static ScreenGetScreen ()
 Get the screen object.
 
static void Labels (LabelModeEnum labels)
 Toggle onscreen label states.
 
static void ClearAlarms (std::shared_ptr< ScreenGva > screen_render)
 Clear the alarms.
 
- Static Public Member Functions inherited from gva::tinyfsm::Fsm< Hmi >
static constexpr S & state (void)
 public, leaving ability to access state instance (e.g. on Reset)
 
static constexpr bool is_in_state (void)
 Check if in state.
 
static void set_initial_state ()
 state machine functions
 
static void Reset ()
 Reset state machine.
 
static void enter ()
 Enter state.
 
static void start ()
 start state
 
static void dispatch (E const &event)
 Dispatch a new state.
 

Static Protected Attributes

static std::shared_ptr< ViewGvaManagermanager_
 The HMI manager.
 
static ResolutionType view_
 The resolution type.
 
static FunctionSelect top_
 The function select widget.
 
static CommonTaskKeys bottom_
 The common task keys at the bottom of the screen.
 
static Canvas canvas_
 The screen canvas.
 
static Screen screen_
 The screen.
 
static std::shared_ptr< Updaterupdater_
 The updater to use.
 
static std::shared_ptr< ScreenGvascreen_render_
 The screen render object.
 
static std::shared_ptr< rendererMapmap_
 A map object.
 
static GvaFunctionEnum lastState_
 The last state.
 
static bool alarmson_ = false
 True is alarms being displayed.
 

Additional Inherited Members

- Public Types inherited from gva::tinyfsm::Fsm< Hmi >
using fsmtype = Fsm< Hmi >
 Templated FSM.
 
using state_ptr_t = Hmi *
 Current state pointer.
 
- Static Public Attributes inherited from gva::tinyfsm::Fsm< Hmi >
static state_ptr_t current_state_ptr
 Current state pointer.
 
- Protected Member Functions inherited from gva::tinyfsm::Fsm< Hmi >
void transit (void)
 state transition functions
 
void transit (ActionFunction action_function)
 Transition to new state.
 
void transit (ActionFunction action_function, ConditionFunction condition_function)
 Transit to new state.
 

Detailed Description

State Machine Base Class Declaration.

Member Function Documentation

◆ entry()

virtual void gva::Hmi::entry ( void  )
inlinevirtual

◆ exit()

virtual void gva::Hmi::exit ( void  )
inlinevirtual

no exit actions

Reimplemented in gva::StateAlarms, gva::StateBMS, gva::StateDRV, and gva::StateSA.

◆ react() [1/11]

virtual void gva::Hmi::react ( EventKeyAlarms const )
inlinevirtual

◆ react() [2/11]

virtual void gva::Hmi::react ( EventKeyBMS const )
inlinevirtual

◆ react() [3/11]

virtual void gva::Hmi::react ( EventKeyCOM const )
inlinevirtual

◆ react() [4/11]

virtual void gva::Hmi::react ( EventKeyDEF const )
inlinevirtual

◆ react() [5/11]

virtual void gva::Hmi::react ( EventKeyDRV const )
inlinevirtual

◆ react() [6/11]

virtual void gva::Hmi::react ( EventKeyFunction const )
inlinevirtual

◆ react() [7/11]

virtual void gva::Hmi::react ( EventKeyPowerOn const )
inlinevirtual

◆ react() [8/11]

virtual void gva::Hmi::react ( EventKeySA const )
inlinevirtual

◆ react() [9/11]

virtual void gva::Hmi::react ( EventKeySTR const )
inlinevirtual

◆ react() [10/11]

virtual void gva::Hmi::react ( EventKeySYS const )
inlinevirtual

◆ react() [11/11]

virtual void gva::Hmi::react ( EventKeyWPN const )
inlinevirtual

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