DUDS
Distributed Update of Data from Something
DigitalPinErrors.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of the DUDS project. It is subject to the BSD-style
3  * license terms in the LICENSE file found in the top-level directory of this
4  * distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5  * No part of DUDS, including this file, may be copied, modified, propagated,
6  * or distributed except according to the terms contained in the LICENSE file.
7  *
8  * Copyright (C) 2017 Jeff Jackowski
9  */
18 #include <vector>
19 
20 namespace duds { namespace hardware { namespace interface {
21 
29 
34  virtual PinUnsupportedOperation { };
35 
40 
46 
51 
56 
61 
67 
74 
80 
86 
92 
98 
103 typedef boost::error_info<
104  struct Info_DigitalPinNumericOutput,
105  std::int64_t
107 
111 typedef boost::error_info<
112  struct Info_DigitalPinNumericBits,
113  int
115 
121 
126 
132 
139 namespace DigitalPinRejectedConfiguration {
140 
148 
153 constexpr Reason NotRejected = Reason::Zero();
154 
159 constexpr Reason UnspecifiedError = Reason::Bit(0);
160 
164 constexpr Reason UnsupportedDirection = Reason::Bit(1);
165 
170 constexpr Reason UnsupportedInputPull = Reason::Bit(2);
171 
175 constexpr Reason UnsupportedEvent = Reason::Bit(3);
176 
181 constexpr Reason UnsupportedInterrupt = Reason::Bit(4);
182 
187 constexpr Reason UnsupportedOutput = Reason::Bit(5);
188 
193 constexpr Reason AffectsOthers = Reason::Bit(6);
194 
200 constexpr Reason WronglyAffected = Reason::Bit(7);
201 
206 constexpr Reason BadEffect = AffectsOthers | WronglyAffected;
207 
211 constexpr Reason Unsupported =
212  UnsupportedDirection | UnsupportedInputPull | UnsupportedEvent |
213  UnsupportedInterrupt | UnsupportedOutput;
214 
219 typedef boost::error_info<
220  struct Info_DigitalPinRejectedConfiguration,
221  Reason
223 
224 typedef boost::error_info<
225  struct Info_DigitalPinRejectedConfigurationVector,
226  std::vector<Reason>
228 
233 inline std::ostream &operator<<(std::ostream &os, const Reason &r) {
234  return os << (int)(r.flags());
235 }
236 
237 }
238 
239 } } }
An attempt was made to output a number in binary on a set of pins that was too small to represent the...
A required DigitalPort object was not supplied.
Indicates that mutually exclusive option flags were set for pin interrupts.
boost::error_info< struct Info_DigitalPinNumericBits, int > DigitalPinNumericBits
The number of bits available for a numeric output.
constexpr Reason UnsupportedOutput
The requested output configuration is not supported by the hardware or driver.
Indicates that a request to configure a pin to input was made of a pin that cannot intput...
boost::error_info< struct Info_DigitalPinNumericOutput, std::int64_t > DigitalPinNumericOutput
The requested number to output; seen with DigitalPinNumericRangeError exceptions. ...
constexpr Reason BadEffect
The referenced pin&#39;s requested configuration either implied a disallowed change of another pin&#39;s conf...
The requested operation is not supported by the specific pin.
Definition: PinErrors.hpp:38
constexpr Reason Unsupported
Completely unsupported.
constexpr Reason UnsupportedInputPull
The requested pull up or pull down configuration is not supported by the hardware or driver...
Indicates that mutually exclusive option flags were set for pin events.
Indicates that mutually exclusive option flags were set for pull ups or downs.
constexpr Reason UnspecifiedError
There is an unspecified error with the requested pin configuration for the referenced pin that is not...
The provided DigitalPort object lacks a required pin.
boost::error_info< struct Info_DigitalPinRejectedConfiguration, Reason > ReasonInfo
Allows attaching the configuration rejection flags to an exception.
Indicates an error with the digital pin&#39;s configuration.
Indicates that mutually exclusive option flags were set for pin output drive.
constexpr Reason NotRejected
There is no error with the requested pin configuration for the referenced pin.
constexpr Reason AffectsOthers
The requested pin configuration for the referenced pin affects multiple pins in a manner that was not...
Indicates that mutually exclusive option flags were set for pin direction.
constexpr Reason UnsupportedDirection
The I/O direction configuration is not supported by the hardware or driver.
The provided DigitalPort object has a pin it is explicitly required to not have.
A type-safe bit flag storage class.
Definition: BitFlags.hpp:101
constexpr Reason UnsupportedEvent
The event pin configuration is not supported by the hardware or driver.
Indicates that the specified configuration data includes too many or too few items, or has parallel data structures of inconsistent sizes.
Indicates that a request to configure a pin to output was made of a pin that cannot output...
Indicates that both the maximum and minimum output current were specified, and the maximum is less th...
Indicates that an operation specified more than one configuration for a pin.
duds::general::BitFlags< struct DigitalPinConfigErrorFlags, std::uint8_t > Reason
A set of bit flags for storing pin configuration errors.
constexpr Reason UnsupportedInterrupt
The requested interrupt configuration is not supported by the hardware or driver. ...
constexpr Reason WronglyAffected
The requested configuration of another pin implied a change to the referenced pin&#39;s configuration...
A requested operation or configuration is not supported.
Base exception type for all errors about pins.
Definition: PinErrors.hpp:26
Various errors involving the use of GPIO hardware.
boost::error_info< struct Info_DigitalPinRejectedConfigurationVector, std::vector< Reason >> ReasonVectorInfo