$darkmode
cloe::utility::Switch< D > Class Template Reference

#include <hmi_contact.hpp>

Inheritance diagram for cloe::utility::Switch< D >:
Collaboration diagram for cloe::utility::Switch< D >:

Public Member Functions

 Switch (std::function< void()> set_fn, std::function< void()> unset_fn, bool active)
 
- Public Member Functions inherited from cloe::utility::Contact< Duration >
 Contact (bool active)
 
void update (Duration time, bool down)
 
bool has_contact () const
 

Protected Member Functions

void contact_down (D) override
 
void contact_up (D) override
 
- Protected Member Functions inherited from cloe::utility::Contact< Duration >
virtual void contact_down (Duration time)=0
 
virtual void contact_up (Duration time)=0
 

Additional Inherited Members

- Protected Attributes inherited from cloe::utility::Contact< Duration >
bool active_
 

Detailed Description

template<typename D = Duration>
class cloe::utility::Switch< D >

Switch simulates a switch contact.

Pressing the switch immediately triggers the set function, and unpressing the switch immediately triggers the unset function.

---------------— set/push unset/release

In contrast to a PushButton, a switch can start its life in either the ON or the OFF position.


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