|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
32 INFO(
"Changing target name (from " <<
name_ <<
" to " << param);
38 contact_duration_(15000)
59 gpio_ = std::move(new_gpio);
83 const std::chrono::system_clock::time_point &tp)
const
87 if (sched->is_in_schedule(tp))
94 const std::chrono::system_clock::time_point &tp)
const
98 if (sched->is_in_schedule(tp))
110 <<
" is both always open and always close at the same time.");
void add_always_open_sched(const Tools::IScheduleCPtr &sched)
Holds classes relevant to the Authentication and Authorization subsystem.
Hardware::FGPIO * exitreq_gpio()
std::vector< Tools::IScheduleCPtr > always_close_
std::chrono::milliseconds contact_duration()
const std::string & name() const
Hardware::FGPIO * gpio()
Returns the pointer to the optional FGPIO associated with the door.
A Facade to a GPIO object.
std::unique_ptr< Hardware::FGPIO > gpio_
Optional GPIO associated with the door.
Hardware::FGPIO * contact_gpio()
void add_always_close_sched(const Tools::IScheduleCPtr &sched)
std::unique_ptr< Hardware::FGPIO > exitreq_gpio_
Optional Exit Req GPIO associated with the door.
std::chrono::milliseconds exitreq_duration()
std::vector< Tools::IScheduleCPtr > always_open_
void resetToExpectedState(const std::chrono::system_clock::time_point &tp)
bool is_always_closed(const std::chrono::system_clock::time_point &tp) const
Check whether the door is in "always closed" mode at the given time point.
bool turnOff()
Turn the GPIO OFF by sending a message to the backend GPIO impl.
std::chrono::milliseconds exitreq_duration_
Duration for the Exit Req to keep the door open.
std::chrono::milliseconds contact_duration_
Duration for the Contact Door Sensor to be ignored before triggering an alarm.
AuthTarget(const std::string target_name)
std::unique_ptr< Hardware::FGPIO > contact_gpio_
Optional Contact Door Sensor GPIO associated with the door.
bool is_always_open(const std::chrono::system_clock::time_point &tp) const
Check whether the door is in "always open" mode at the given time point.
bool turnOn(std::chrono::milliseconds duration)
Turn the GPIO ON and turn it OFF duration milliseconds later.