41 explicit AuthTarget(
const std::string target_name);
43 const std::string &
name()
const;
44 void name(
const std::string &new_name);
52 bool is_always_open(
const std::chrono::system_clock::time_point &tp)
const;
57 bool is_always_closed(
const std::chrono::system_clock::time_point &tp)
const;
71 void gpio(std::unique_ptr<Hardware::FGPIO> new_gpio);
82 std::unique_ptr<Hardware::FGPIO>
gpio_;
std::shared_ptr< AuthTarget > AuthTargetPtr
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.
std::vector< Tools::IScheduleCPtr > always_open_
Represent an object that we are authorizing against (a door).
A Facade to a GPIO object.
std::vector< Tools::IScheduleCPtr > always_close_
Hardware::FGPIO * gpio()
Returns the pointer to the optional FGPIO associated with the door.
This is the header file for a generated source file, GitSHA1.cpp.
void add_always_open_sched(const Tools::IScheduleCPtr &sched)
std::unique_ptr< Hardware::FGPIO > gpio_
Optional GPIO associated with the door.
const std::string & name() const
void add_always_close_sched(const Tools::IScheduleCPtr &sched)
virtual ~AuthTarget()=default
AuthTarget(const std::string target_name)
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.