DUDS
Distributed Update of Data from Something
duds::hardware::interface::DigitalPinRejectedConfiguration Namespace Reference

Holds error types and codes that detail why a configuration for a digital pin was rejected. More...

Typedefs

typedef duds::general::BitFlags< struct DigitalPinConfigErrorFlags, std::uint8_t > Reason
 A set of bit flags for storing pin configuration errors. More...
 
typedef boost::error_info< struct Info_DigitalPinRejectedConfiguration, ReasonReasonInfo
 Allows attaching the configuration rejection flags to an exception. More...
 
typedef boost::error_info< struct Info_DigitalPinRejectedConfigurationVector, std::vector< Reason >> ReasonVectorInfo
 

Functions

std::ostream & operator<< (std::ostream &os, const Reason &r)
 Needed for using Reason with boost::error_info; ReasonInfo will not build without stream operators. More...
 

Variables

constexpr Reason AffectsOthers = Reason::Bit(6)
 The requested pin configuration for the referenced pin affects multiple pins in a manner that was not allowed by the configuration. More...
 
constexpr Reason BadEffect = AffectsOthers | WronglyAffected
 The referenced pin's requested configuration either implied a disallowed change of another pin's configuration, or the reverse. More...
 
constexpr Reason NotRejected = Reason::Zero()
 There is no error with the requested pin configuration for the referenced pin. More...
 
constexpr Reason UnspecifiedError = Reason::Bit(0)
 There is an unspecified error with the requested pin configuration for the referenced pin that is not covered by another error flag. More...
 
constexpr Reason Unsupported
 Completely unsupported. More...
 
constexpr Reason UnsupportedDirection = Reason::Bit(1)
 The I/O direction configuration is not supported by the hardware or driver. More...
 
constexpr Reason UnsupportedEvent = Reason::Bit(3)
 The event pin configuration is not supported by the hardware or driver. More...
 
constexpr Reason UnsupportedInputPull = Reason::Bit(2)
 The requested pull up or pull down configuration is not supported by the hardware or driver. More...
 
constexpr Reason UnsupportedInterrupt = Reason::Bit(4)
 The requested interrupt configuration is not supported by the hardware or driver. More...
 
constexpr Reason UnsupportedOutput = Reason::Bit(5)
 The requested output configuration is not supported by the hardware or driver. More...
 
constexpr Reason WronglyAffected = Reason::Bit(7)
 The requested configuration of another pin implied a change to the referenced pin's configuration, but the referenced pin's configuration explicitly disallowed the change. More...
 

Detailed Description

Holds error types and codes that detail why a configuration for a digital pin was rejected.

These are placed outside a class becuase they can be claimed equally by DigitalPin and DigitalPort, but both classes need to use the same error classes and values.

Typedef Documentation

◆ Reason

typedef duds::general::BitFlags<struct DigitalPinConfigErrorFlags, std::uint8_t> duds::hardware::interface::DigitalPinRejectedConfiguration::Reason

A set of bit flags for storing pin configuration errors.

This allows multiple errors to be reported. If the stored value is zero, it indicates no errors.

Definition at line 147 of file DigitalPinErrors.hpp.

◆ ReasonInfo

typedef boost::error_info< struct Info_DigitalPinRejectedConfiguration, Reason> duds::hardware::interface::DigitalPinRejectedConfiguration::ReasonInfo

Allows attaching the configuration rejection flags to an exception.

Warning
There isn't a good way to output this yet for user inspection.

Definition at line 222 of file DigitalPinErrors.hpp.

◆ ReasonVectorInfo

typedef boost::error_info< struct Info_DigitalPinRejectedConfigurationVector, std::vector<Reason>> duds::hardware::interface::DigitalPinRejectedConfiguration::ReasonVectorInfo

Definition at line 227 of file DigitalPinErrors.hpp.

Function Documentation

◆ operator<<()

std::ostream& duds::hardware::interface::DigitalPinRejectedConfiguration::operator<< ( std::ostream &  os,
const Reason r 
)
inline

Needed for using Reason with boost::error_info; ReasonInfo will not build without stream operators.

Definition at line 233 of file DigitalPinErrors.hpp.

Variable Documentation

◆ AffectsOthers

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::AffectsOthers = Reason::Bit(6)

The requested pin configuration for the referenced pin affects multiple pins in a manner that was not allowed by the configuration.

Definition at line 193 of file DigitalPinErrors.hpp.

◆ BadEffect

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::BadEffect = AffectsOthers | WronglyAffected

The referenced pin's requested configuration either implied a disallowed change of another pin's configuration, or the reverse.

Definition at line 206 of file DigitalPinErrors.hpp.

◆ NotRejected

◆ UnspecifiedError

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnspecifiedError = Reason::Bit(0)

There is an unspecified error with the requested pin configuration for the referenced pin that is not covered by another error flag.

Definition at line 159 of file DigitalPinErrors.hpp.

◆ Unsupported

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::Unsupported
Initial value:
=
constexpr Reason UnsupportedOutput
The requested output configuration is not supported by the hardware or driver.
constexpr Reason UnsupportedInputPull
The requested pull up or pull down configuration is not supported by the hardware or driver...
constexpr Reason UnsupportedDirection
The I/O direction configuration is not supported by the hardware or driver.
constexpr Reason UnsupportedEvent
The event pin configuration is not supported by the hardware or driver.
constexpr Reason UnsupportedInterrupt
The requested interrupt configuration is not supported by the hardware or driver. ...

Completely unsupported.

Definition at line 211 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPort::modifyConfig(), duds::hardware::interface::DigitalPortIndependentPins::proposeConfigImpl(), duds::hardware::interface::DigitalPortDependentPins::proposeConfigImpl(), duds::hardware::interface::DigitalPortIndependentPins::proposeFullConfigImpl(), and duds::hardware::interface::DigitalPortDependentPins::proposeFullConfigImpl().

◆ UnsupportedDirection

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnsupportedDirection = Reason::Bit(1)

The I/O direction configuration is not supported by the hardware or driver.

Definition at line 164 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPinCap::compatible().

◆ UnsupportedEvent

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnsupportedEvent = Reason::Bit(3)

The event pin configuration is not supported by the hardware or driver.

Definition at line 175 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPinCap::compatible().

◆ UnsupportedInputPull

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnsupportedInputPull = Reason::Bit(2)

The requested pull up or pull down configuration is not supported by the hardware or driver.

Definition at line 170 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPinCap::compatible().

◆ UnsupportedInterrupt

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnsupportedInterrupt = Reason::Bit(4)

The requested interrupt configuration is not supported by the hardware or driver.

Definition at line 181 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPinCap::compatible().

◆ UnsupportedOutput

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::UnsupportedOutput = Reason::Bit(5)

The requested output configuration is not supported by the hardware or driver.

Definition at line 187 of file DigitalPinErrors.hpp.

Referenced by duds::hardware::interface::DigitalPinCap::compatible().

◆ WronglyAffected

constexpr Reason duds::hardware::interface::DigitalPinRejectedConfiguration::WronglyAffected = Reason::Bit(7)

The requested configuration of another pin implied a change to the referenced pin's configuration, but the referenced pin's configuration explicitly disallowed the change.

Definition at line 200 of file DigitalPinErrors.hpp.