Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
decoder-out.hpp
1 /*
2  Title --- iface/decoder-out.hpp
3 
4  Copyright (C) 2013 Giacomo Trudu - wicker25[at]gmail[dot]com
5 
6  This file is part of Rpi-hw.
7 
8  Rpi-hw is free software: you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as published by
10  the Free Software Foundation version 3 of the License.
11 
12  Rpi-hw is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with Rpi-hw. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _RPI_HW_IFACE_DECODER_IN_HPP_
23 #define _RPI_HW_IFACE_DECODER_IN_HPP_
24 
25 #include <initializer_list>
26 #include <vector>
27 
28 #include <rpi-hw/types.hpp>
29 #include <rpi-hw/exception.hpp>
30 #include <rpi-hw/math.hpp>
31 #include <rpi-hw/utils.hpp>
32 
33 #include <rpi-hw/iface/base.hpp>
34 #include <rpi-hw/iface/output.hpp>
35 
36 namespace rpihw { // Begin main namespace
37 
38 namespace iface { // Begin interfaces namespace
39 
40 /*!
41  @class decoderOut
42  @brief Decoder output interface.
43 */
44 class decoderOut : public iface::output {
45 
46 public:
47 
48  /*!
49  @brief Constructor method.
50  @param[in] pins Sequence of `uint8_t` containing the GPIO pins.
51  */
52  decoderOut( std::initializer_list< uint8_t > pins );
53 
54  /*!
55  @brief Constructor method.
56  @param[in] pins Vector containing the GPIO pins.
57  */
58  decoderOut( const std::vector< uint8_t > &pins );
59 
60  //! Destructor method.
61  virtual ~decoderOut();
62 
63  /*!
64  @brief Writes a value on the interface.
65  @param[in] value The value to be written.
66  */
67  virtual void write( size_t value );
68 };
69 
70 } // End of interfaces namespace
71 
72 } // End of main namespace
73 
74 
75 // Include inline methods
76 #include <rpi-hw/iface/decoder-out-inl.hpp>
77 
78 #endif /* _RPI_HW_IFACE_DECODER_IN_HPP_ */
Output interface.
Definition: output.hpp:43
Decoder output interface.
Definition: decoder-out.hpp:44
decoderOut(std::initializer_list< uint8_t > pins)
Constructor method.
virtual ~decoderOut()
Destructor method.
virtual void write(size_t value)
Writes a value on the interface.