Leosac  0.8.0
Open Source Access Control
LibgpiodConfig.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2022 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include "LibgpiodPin.hpp"
23 #include <boost/property_tree/ptree_fwd.hpp>
24 #include <map>
25 #include <string>
26 
27 namespace Leosac
28 {
29 namespace Module
30 {
31 
32 namespace Libgpiod
33 {
38 {
39  public:
44  LibgpiodConfig(const boost::property_tree::ptree &cfg);
45 
49  const std::string &consumer() const;
50 
51  private:
52 
56  std::string consumer_;
57 };
58 }
59 }
60 }
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Module::Libgpiod::LibgpiodConfig::LibgpiodConfig
LibgpiodConfig(const boost::property_tree::ptree &cfg)
Construct the general config object from the configuration tree.
Definition: LibgpiodConfig.cpp:28
LibgpiodPin.hpp
Leosac::Module::Libgpiod::LibgpiodConfig::consumer
const std::string & consumer() const
Returns the consumer name that will be temporary assigned to the GPIO.
Definition: LibgpiodConfig.cpp:41
Leosac::Module::Libgpiod::LibgpiodConfig::consumer_
std::string consumer_
The consumer name that will be temporary assigned to the GPIO.
Definition: LibgpiodConfig.hpp:56
Leosac::Module::Libgpiod::LibgpiodConfig
Internal configuration helper for libgpiod module.
Definition: LibgpiodConfig.hpp:37