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

Library code for interfacing with hardware external to the processor. More...

Namespaces

 DigitalPinRejectedConfiguration
 Holds error types and codes that detail why a configuration for a digital pin was rejected.
 
 linux
 A Linux specific library for communicating with external hardware.
 
 test
 Namespace for testing tools that implement hardware interfaces but function without the hardware.
 

Classes

class  ChipAccess
 An object used to provide chip select control to a single user at a time. More...
 
class  ChipBinarySelectManager
 Selects one of two chips using a single pin. More...
 
class  ChipMultiplexerSelectManager
 Selects one of several chips using several pins for parallel output of a number. More...
 
class  ChipPinSelectManager
 Selects a single chip using a single pin. More...
 
class  ChipPinSetSelectManager
 Selects a single chip at a time using one pin from a set. More...
 
class  ChipSelect
 An object to wrap together a ChipSelectManager and chip ID to simplify code that needs to repeatedly select the same chip. More...
 
struct  ChipSelectAccessInUse
 A ChipAccess object was given to ChipSelectManager::access(ChipAccess &, int) that is already providing access. More...
 
struct  ChipSelectBadManager
 A ChipSelectManager is required for the operation but is not set. More...
 
struct  ChipSelectError
 The base type of all chip select related errors. More...
 
struct  ChipSelectInUse
 An attempt was made to change the set of valid chips or exactly how a particluar chip might be selected while a ChipAccess object made by the chip select manager currently exists. More...
 
struct  ChipSelectInvalidAccess
 An attempt was made to retire a ChipAccess object that was not the active access object for the manager. More...
 
struct  ChipSelectInvalidChip
 Indicates an attempt to select a non-existant chip. More...
 
class  ChipSelectManager
 The base class for all chip selection managers, the classes that handle the output state to select a chip. More...
 
struct  ChipSelectTooManyPins
 A ChipSelectManager was given more pins to use than the implementation supports. More...
 
class  Conversation
 Represents a two-way conversation with a device. More...
 
class  Conversationalist
 Allows a common interface for using Conversation objects for communication. More...
 
struct  ConversationBadAdd
 An attempt was made to add data to a conversation part flagged for input. More...
 
struct  ConversationBadOffset
 An attempt was made to change the starting offset of a ConversationVector to an invalid value. More...
 
struct  ConversationError
 Base class for conversation related errors. More...
 
class  ConversationExternal
 References a conversation part in an externally controlled buffer. More...
 
class  ConversationExtractor
 Extracts data from a Conversation without modifying the Conversation or copying from it. More...
 
struct  ConversationFixedLength
 An operation requiring a varible length conversation part was attempted on a part not flagged as having a variable length. More...
 
struct  ConversationNotSet
 A ConversationExtractor was asked to operate on a Conversation, but one is not set. More...
 
class  ConversationPart
 Represents a section of a half-duplex conversation with a device. More...
 
struct  ConversationReadPastEnd
 An attempt was made to extract data past the end of a conversation or a conversation part. More...
 
class  ConversationVector
 Holds a conversation part inside a vector. More...
 
class  DigitalPin
 Represents a single pin on a DigitalPort. More...
 
class  DigitalPinAccess
 Provides access to a single pin on a DigitalPort. More...
 
class  DigitalPinAccessBase
 The base class for the digital pin access classes. More...
 
class  DigitalPinBase
 A base class for classes that represent one or more pins on a single DigitalPort, but do not provide access. More...
 
struct  DigitalPinCannotInputError
 Indicates that a request to configure a pin to input was made of a pin that cannot intput. More...
 
struct  DigitalPinCannotOutputError
 Indicates that a request to configure a pin to output was made of a pin that cannot output. More...
 
struct  DigitalPinCap
 Defines the capabilites of a digital general purpose I/O pin. More...
 
struct  DigitalPinConfig
 Defines the configuration for a digital general purpose I/O pin. More...
 
struct  DigitalPinConfigError
 Indicates an error with the digital pin's configuration. More...
 
struct  DigitalPinConfigRangeError
 Indicates that the specified configuration data includes too many or too few items, or has parallel data structures of inconsistent sizes. More...
 
struct  DigitalPinConflictingCurrentError
 Indicates that both the maximum and minimum output current were specified, and the maximum is less than the minimum. More...
 
struct  DigitalPinConflictingDirectionError
 Indicates that mutually exclusive option flags were set for pin direction. More...
 
struct  DigitalPinConflictingEventError
 Indicates that mutually exclusive option flags were set for pin events. More...
 
struct  DigitalPinConflictingInterruptError
 Indicates that mutually exclusive option flags were set for pin interrupts. More...
 
struct  DigitalPinConflictingOutputError
 Indicates that mutually exclusive option flags were set for pin output drive. More...
 
struct  DigitalPinConflictingPullError
 Indicates that mutually exclusive option flags were set for pull ups or downs. More...
 
class  DigitalPinMasterSyncSerial
 A synchronous serial implementation using DigitalPin objects. More...
 
struct  DigitalPinMultipleConfigError
 Indicates that an operation specified more than one configuration for a pin. More...
 
struct  DigitalPinNumericRangeError
 An attempt was made to output a number in binary on a set of pins that was too small to represent the number. More...
 
class  DigitalPinSet
 Represents a set of pins on a single DigitalPort. More...
 
class  DigitalPinSetAccess
 Provides access to multiple pins on a DigitalPort. More...
 
struct  DigitalPinUnsupportedOperation
 A requested operation or configuration is not supported. More...
 
class  DigitalPort
 Represents an interface to a group of hardware related digital GPIO lines. More...
 
class  DigitalPortDependentPins
 A partial DigitalPort implementation for ports where the configuration of one pin may affect the configuration of one or more other pins on the same port. More...
 
struct  DigitalPortDoesNotExistError
 A required DigitalPort object was not supplied. More...
 
struct  DigitalPortHasPinError
 The provided DigitalPort object has a pin it is explicitly required to not have. More...
 
class  DigitalPortIndependentPins
 A partial DigitalPort implementation for ports where the configuration of each pin is independent of the configuration of all other pins. More...
 
struct  DigitalPortLacksPinError
 The provided DigitalPort object lacks a required pin. More...
 
class  I2c
 A basic I2C interface. More...
 
struct  I2cError
 Base class for all errors specific to I2C communications and used for very general errors. More...
 
struct  I2cErrorBusy
 A timeout occured while waiting to use the bus. More...
 
struct  I2cErrorConversationLength
 The number of conversation parts is too great for the implementation to handle. More...
 
struct  I2cErrorNoBus
 An attempt was made to use a non-existent I2C bus. More...
 
struct  I2cErrorNoDevice
 The device did not respond to its address (NACK). More...
 
struct  I2cErrorPartLength
 A ConversationPart of an invalid length was specified. More...
 
struct  I2cErrorProtocol
 The device has failed to conform to the protocol. More...
 
struct  I2cErrorTimeout
 The operation took too long. More...
 
struct  I2cErrorUnsupported
 The attempted operation is not supported by the bus master. More...
 
class  MasterSyncSerial
 An abstraction for the master side of a simple synchronous serial communication connection to some device. More...
 
class  MasterSyncSerialAccess
 Provides access for communicating using a MasterSyncSerial object. More...
 
struct  PinAlreadyExists
 A request to add a pin to a DigitalPort cannot be fullfilled because the port already has a pin with the same ID. More...
 
struct  PinBadIdError
 A given pin ID could not be parsed. More...
 
class  PinConfiguration
 Parses configuration data for DigitalPort, DigitalPin, DigitalPinSet, ChipSelectManager, and ChipSelect objects. More...
 
struct  PinConfigurationError
 Base for all errors directly thrown by PinConfiguration. More...
 
struct  PinDoesNotExist
 A pin required for the operation does not exist or is unavailable to the process. More...
 
struct  PinEmptyAccessRequest
 A request was made to access zero pins. More...
 
struct  PinError
 Base exception type for all errors about pins. More...
 
struct  PinInUse
 A DigitalPinAccess or DigitalPinSetAccess object cannot be obtained because one already exists with access to the pin. More...
 
struct  PinIoError
 An I/O error prevented the operation on the pin from succeeding. More...
 
struct  PinRangeError
 The operation has too few or much data to work on the pins, which can alternately be stated as having too few or too many pins for the operation. More...
 
struct  PinSetWrongPort
 An attempt was made to use a DigitalPinSetAccess object with two different DigitalPort objects. More...
 
struct  PinUnsupportedOperation
 The requested operation is not supported by the specific pin. More...
 
struct  PinWrongDirection
 The requested operation requires the use of the wrong, or not the current, I/O direction. More...
 
struct  PortBadPinIdError
 A given pin ID cannot be used with the port, such as an ID that is less than the port's ID offset. More...
 
struct  PortDoesNotExistError
 The requested port is not named in the configuration. More...
 
struct  PortDuplicateError
 The configuration gives the same name to more than one port. More...
 
struct  PortDuplicatePinIdError
 The same pin global ID is used for more than one pin. More...
 
class  Pwm
 
class  PwmPort
 
struct  SelectBadStateError
 A selection logic state in the configuration could not be parsed. More...
 
struct  SelectDoesNotExistError
 The requested chip select does not exist. More...
 
struct  SelectDuplicateError
 The configuration gives the same name to more than one chip select. More...
 
struct  SelectManagerDoesNotExistError
 The requested chip select manager is not named in the configuration. More...
 
struct  SelectManagerDuplicateError
 The configuration gives the same name to more than one chip select manager. More...
 
struct  SelectManagerNotCreated
 A required chip select manager has not yet been created most likely because the port providing its pins has not yet been attached. More...
 
struct  SelectManagerUnknownTypeError
 A select manager was given an unknown type, or no type. More...
 
struct  SelectMultiplePortsError
 A chip selection manager was defined with pins from more than one port. More...
 
struct  SelectNoPinsError
 A chip selection manager was defined without any pins. More...
 
struct  SetDoesNotExistError
 The requested pin set is not defined by the configuration. More...
 
struct  SetDuplicateError
 The configuration gives the same name to more than one pin set. More...
 
struct  SetMultiplePortsError
 A pin set was defined with pins from more than one port. More...
 
struct  SetNotCreatedError
 A required pin set has not yet been created most likely because the port providing its pins has not yet been attached. More...
 
class  Smbus
 An interface for communication with a SMBus device. More...
 
struct  SmbusError
 Base class for all errors specific to SMBus communications and used for very general errors. More...
 
struct  SmbusErrorBusy
 A timeout occured while waiting to use the bus. More...
 
struct  SmbusErrorMessageLength
 A message of an invalid length was specified, or a message too big for a buffer was received. More...
 
struct  SmbusErrorNoBus
 An attempt was made to use a non-existent SMBus bus. More...
 
struct  SmbusErrorNoDevice
 The device did not respond to its address. More...
 
struct  SmbusErrorPec
 The received message included a bad checksum and Packet Error Checking is in use. More...
 
struct  SmbusErrorProtocol
 The device has failed to conform to the protocol. More...
 
struct  SmbusErrorTimeout
 The operation took too long. More...
 
struct  SmbusErrorUnsupported
 The attempted operation is not supported by the bus master. More...
 
struct  SyncSerialAccessInUse
 The given MasterSyncSerialAccess object already provides access to a MasterSyncSerial object. More...
 
struct  SyncSerialError
 Base class for all errors specific to MasterSyncSerial and its derivatives. More...
 
struct  SyncSerialInUse
 The requested operation requires communication to not already be in use. More...
 
struct  SyncSerialInvalidAccess
 An attempt was made to retire a MasterSyncSerialAccess object that does not belong to the serial interface. More...
 
struct  SyncSerialIoError
 General I/O error. More...
 
struct  SyncSerialNotCommunicating
 A transfer operation was requested when not in the communicating state. More...
 
struct  SyncSerialNotFullDuplex
 A full-duplex configuration or data transfer operation was requested on a half-duplex serial interface. More...
 
struct  SyncSerialNotHalfDuplex
 A half-duplex configuration was requested on a full-duplex serial interface. More...
 
struct  SyncSerialNotOpen
 The requested operation requires communication to be in the open state. More...
 
struct  SyncSerialNotReady
 The requested operation requires communication to be in the ready state. More...
 
struct  SyncSerialSelectNotUsed
 A chip select object was specified on a serial interface that does not use a chip select. More...
 
struct  SyncSerialUnsupported
 The requested mode of operation is unsupported; intended for use by implementing classes that must impose limitations like transfering whole bytes rather than an arbitrary number of bits. More...
 

Typedefs

typedef boost::error_info< struct Info_ChipId, int > ChipSelectIdError
 The chip select ID relavent to the error. More...
 
typedef boost::error_info< struct Info_ConversationPartIndex, int > ConversationPartIndex
 An attribute for errors when using Conversation objects that references the ConversationPart by index. More...
 
typedef boost::error_info< struct Info_DigitalPinCap, DigitalPinCapDigitalPinCapInfo
 
typedef boost::error_info< struct Info_DigitalPinConfig, DigitalPinConfigDigitalPinConfigInfo
 
typedef boost::error_info< struct Info_DigitalPinNumericBits, int > DigitalPinNumericBits
 The number of bits available for a numeric output. More...
 
typedef boost::error_info< struct Info_DigitalPinNumericOutput, std::int64_t > DigitalPinNumericOutput
 The requested number to output; seen with DigitalPinNumericRangeError exceptions. More...
 
typedef boost::error_info< struct Info_DigitalPortAffected, const DigitalPort * > DigitalPortAffected
 Added to exceptions thrown by DigitalPort objects. More...
 
typedef boost::error_info< struct Info_i2cdevaddr, int > I2cDeviceAddr
 Provides the device (slave) address along with an error. More...
 
typedef boost::error_info< struct Info_PortId, std::string > PinBadId
 A pin name or number from the configuration that could not be used. More...
 
typedef boost::error_info< struct Info_PinId, unsigned int > PinErrorId
 The pin global ID involved in the error. More...
 
typedef boost::error_info< struct Info_PinName, std::string > PinErrorName
 A name or function associated with the pin(s). More...
 
typedef boost::error_info< struct Info_PinPortId, unsigned int > PinErrorPortId
 The port (hardware) specific pin ID involved in the error. More...
 
typedef boost::error_info< struct Info_PortName, std::string > PortName
 The name of the port as it appears in the configuration. More...
 
typedef boost::error_info< struct Info_PortPinId, unsigned int > PortPinId
 The global ID of a pin from a configuration that is involved in the error. More...
 
typedef boost::error_info< struct Info_SelectBadState, std::string > SelectBadState
 The string with a select logic state that could not be parsed. More...
 
typedef boost::error_info< struct Info_SelectBadType, std::string > SelectBadType
 The string with a chip selection manager type that is not valid. More...
 
typedef boost::error_info< struct Info_SelectManagerName, std::string > SelectManagerName
 The name of a chip select manager from a configuration. More...
 
typedef boost::error_info< struct Info_SelectName, std::string > SelectName
 The name of a chip select from a configuration. More...
 
typedef boost::error_info< struct Info_SetName, std::string > SetName
 The name of a pin set from a configuration. More...
 
typedef boost::error_info< struct Info_smbusdevaddr, int > SmbusDeviceAddr
 Provides the device (slave) address along with an error. More...
 

Functions

constexpr bool operator!= (const DigitalPinCap &cap, const DigitalPinCap::Flags &flg)
 
constexpr bool operator!= (const DigitalPinCap::Flags &flg, const DigitalPinCap &cap)
 
constexpr bool operator!= (const DigitalPinConfig &cap, const DigitalPinConfig::Flags &flg)
 
constexpr bool operator!= (const DigitalPinConfig::Flags &flg, const DigitalPinConfig &cap)
 
constexpr DigitalPinCap::Flags operator& (const DigitalPinCap &cap, const DigitalPinCap::Flags &flg)
 
constexpr DigitalPinCap::Flags operator& (const DigitalPinCap::Flags &flg, const DigitalPinCap &cap)
 
constexpr DigitalPinConfig::Flags operator& (const DigitalPinConfig &cap, const DigitalPinConfig::Flags &flg)
 
constexpr DigitalPinConfig::Flags operator& (const DigitalPinConfig::Flags &flg, const DigitalPinConfig &cap)
 
std::ostream & operator<< (std::ostream &os, const DigitalPinCap &c)
 
std::ostream & operator<< (std::ostream &os, const DigitalPinConfig &c)
 
template<typename Int >
ConversationVectoroperator<< (ConversationVector &cv, const Int &i)
 Insertion operator to add an integer to a ConversationVector object. More...
 
template<typename Int , std::size_t N>
ConversationVectoroperator<< (ConversationVector &cv, const Int(&a)[N])
 Insertion operator to add an array of integers to a ConversationVector object. More...
 
ConversationVectoroperator<< (ConversationVector &cv, const ConversationVector::Reserve &cvr)
 Insertion operator to reserve space in a ConversationVector. More...
 
ConversationVectoroperator<< (ConversationVector &cv, const ConversationVector::BigEndian)
 Insertion operator to make the ConversationVector handle any following adds using big-endian format. More...
 
ConversationVectoroperator<< (ConversationVector &cv, const ConversationVector::LittleEndian)
 Insertion operator to make the ConversationVector handle any following adds using little-endian format. More...
 
ConversationVectoroperator<< (ConversationVector &cv, const std::string &str)
 Insertion operator to add a string as binary data to the end of an output ConversationVector. More...
 
constexpr bool operator== (const DigitalPinCap &cap, const DigitalPinCap::Flags &flg)
 
constexpr bool operator== (const DigitalPinCap::Flags &flg, const DigitalPinCap &cap)
 
constexpr bool operator== (const DigitalPinConfig &cap, const DigitalPinConfig::Flags &flg)
 
constexpr bool operator== (const DigitalPinConfig::Flags &flg, const DigitalPinConfig &cap)
 
template<typename Int >
ConversationExtractoroperator>> (ConversationExtractor &ce, Int &i)
 Extraction operator to read an integer from a Conversation through a ConversationExtractor object. More...
 
template<typename Int , std::size_t N>
ConversationExtractoroperator>> (ConversationExtractor &ce, Int(&a)[N])
 Extraction operator to read an array of integers from a Conversation through a ConversationExtractor object. More...
 
constexpr DigitalPinCap::Flags operator^ (const DigitalPinCap &cap, const DigitalPinCap::Flags &flg)
 
constexpr DigitalPinCap::Flags operator^ (const DigitalPinCap::Flags &flg, const DigitalPinCap &cap)
 
constexpr DigitalPinConfig::Flags operator^ (const DigitalPinConfig &cap, const DigitalPinConfig::Flags &flg)
 
constexpr DigitalPinConfig::Flags operator^ (const DigitalPinConfig::Flags &flg, const DigitalPinConfig &cap)
 
constexpr DigitalPinCap::Flags operator| (const DigitalPinCap &cap, const DigitalPinCap::Flags &flg)
 
constexpr DigitalPinCap::Flags operator| (const DigitalPinCap::Flags &flg, const DigitalPinCap &cap)
 
constexpr DigitalPinConfig::Flags operator| (const DigitalPinConfig &cap, const DigitalPinConfig::Flags &flg)
 
constexpr DigitalPinConfig::Flags operator| (const DigitalPinConfig::Flags &flg, const DigitalPinConfig &cap)
 
static unsigned int ParsePinId (const std::string &str)
 
static bool ParseState (const std::string &val)
 

Variables

constexpr DigitalPinCap NonexistentDigitalPin
 The capabilities of a non-existent pin. More...
 

Detailed Description

Library code for interfacing with hardware external to the processor.

This includes support for items like serial buses and other forms of communication. It does not include support for hardware found at the other end; just support for communicating with whatever is on the other end.

Typedef Documentation

◆ ChipSelectIdError

typedef boost::error_info<struct Info_ChipId, int> duds::hardware::interface::ChipSelectIdError

The chip select ID relavent to the error.

Note
This is not an error code. Error is used in the name to distinguish this type from other types that do not deal with errors.

Definition at line 59 of file ChipSelectErrors.hpp.

◆ ConversationPartIndex

typedef boost::error_info<struct Info_ConversationPartIndex, int> duds::hardware::interface::ConversationPartIndex

An attribute for errors when using Conversation objects that references the ConversationPart by index.

Definition at line 25 of file Conversation.hpp.

◆ DigitalPinCapInfo

typedef boost::error_info< struct Info_DigitalPinCap, DigitalPinCap> duds::hardware::interface::DigitalPinCapInfo

Definition at line 208 of file DigitalPinCap.hpp.

◆ DigitalPinConfigInfo

typedef boost::error_info< struct Info_DigitalPinConfig, DigitalPinConfig> duds::hardware::interface::DigitalPinConfigInfo

Definition at line 351 of file DigitalPinConfig.hpp.

◆ DigitalPinNumericBits

typedef boost::error_info< struct Info_DigitalPinNumericBits, int> duds::hardware::interface::DigitalPinNumericBits

The number of bits available for a numeric output.

Definition at line 114 of file DigitalPinErrors.hpp.

◆ DigitalPinNumericOutput

typedef boost::error_info< struct Info_DigitalPinNumericOutput, std::int64_t> duds::hardware::interface::DigitalPinNumericOutput

The requested number to output; seen with DigitalPinNumericRangeError exceptions.

Definition at line 106 of file DigitalPinErrors.hpp.

◆ DigitalPortAffected

typedef boost::error_info<struct Info_DigitalPortAffected, const DigitalPort*> duds::hardware::interface::DigitalPortAffected

Added to exceptions thrown by DigitalPort objects.

Definition at line 1084 of file DigitalPort.hpp.

◆ I2cDeviceAddr

typedef boost::error_info<struct Info_i2cdevaddr, int> duds::hardware::interface::I2cDeviceAddr

Provides the device (slave) address along with an error.

Definition at line 83 of file I2cErrors.hpp.

◆ PinBadId

typedef boost::error_info<struct Info_PortId, std::string> duds::hardware::interface::PinBadId

A pin name or number from the configuration that could not be used.

Definition at line 121 of file PinConfiguration.hpp.

◆ PinErrorId

typedef boost::error_info<struct Info_PinId, unsigned int> duds::hardware::interface::PinErrorId

The pin global ID involved in the error.

It will always be a global ID, even from functions that take a local ID.

Note
This is not an error code. Error is being used in the name to distinguish this type from other types that do not deal with errors.

Definition at line 97 of file PinErrors.hpp.

◆ PinErrorName

typedef boost::error_info<struct Info_PinName, std::string> duds::hardware::interface::PinErrorName

A name or function associated with the pin(s).

Note
This is not an error description string. Error is used in the name to distinguish this type from other types that do not deal with errors.

Definition at line 89 of file PinErrors.hpp.

◆ PinErrorPortId

typedef boost::error_info<struct Info_PinPortId, unsigned int> duds::hardware::interface::PinErrorPortId

The port (hardware) specific pin ID involved in the error.

It may differ from both the global ID and a port object's local ID. This attribute may be omitted since it isn't always available, especially in the generic port code.

Note
This is not an error code. Error is being used in the name to distinguish this type from other types that do not deal with errors.

Definition at line 107 of file PinErrors.hpp.

◆ PortName

typedef boost::error_info<struct Info_PortName, std::string> duds::hardware::interface::PortName

The name of the port as it appears in the configuration.

Definition at line 116 of file PinConfiguration.hpp.

◆ PortPinId

typedef boost::error_info<struct Info_PortPinId, unsigned int> duds::hardware::interface::PortPinId

The global ID of a pin from a configuration that is involved in the error.

Definition at line 126 of file PinConfiguration.hpp.

◆ SelectBadState

typedef boost::error_info<struct Info_SelectBadState, std::string> duds::hardware::interface::SelectBadState

The string with a select logic state that could not be parsed.

Definition at line 141 of file PinConfiguration.hpp.

◆ SelectBadType

typedef boost::error_info<struct Info_SelectBadType, std::string> duds::hardware::interface::SelectBadType

The string with a chip selection manager type that is not valid.

Definition at line 146 of file PinConfiguration.hpp.

◆ SelectManagerName

typedef boost::error_info<struct Info_SelectManagerName, std::string> duds::hardware::interface::SelectManagerName

The name of a chip select manager from a configuration.

Definition at line 131 of file PinConfiguration.hpp.

◆ SelectName

typedef boost::error_info<struct Info_SelectName, std::string> duds::hardware::interface::SelectName

The name of a chip select from a configuration.

Definition at line 136 of file PinConfiguration.hpp.

◆ SetName

typedef boost::error_info<struct Info_SetName, std::string> duds::hardware::interface::SetName

The name of a pin set from a configuration.

Definition at line 151 of file PinConfiguration.hpp.

◆ SmbusDeviceAddr

typedef boost::error_info<struct Info_smbusdevaddr, int> duds::hardware::interface::SmbusDeviceAddr

Provides the device (slave) address along with an error.

Definition at line 80 of file SmbusErrors.hpp.

Function Documentation

◆ operator!=() [1/4]

constexpr bool duds::hardware::interface::operator!= ( const DigitalPinCap cap,
const DigitalPinCap::Flags flg 
)

Definition at line 271 of file DigitalPinCap.hpp.

◆ operator!=() [2/4]

constexpr bool duds::hardware::interface::operator!= ( const DigitalPinCap::Flags flg,
const DigitalPinCap cap 
)

Definition at line 278 of file DigitalPinCap.hpp.

◆ operator!=() [3/4]

constexpr bool duds::hardware::interface::operator!= ( const DigitalPinConfig cap,
const DigitalPinConfig::Flags flg 
)

Definition at line 414 of file DigitalPinConfig.hpp.

◆ operator!=() [4/4]

constexpr bool duds::hardware::interface::operator!= ( const DigitalPinConfig::Flags flg,
const DigitalPinConfig cap 
)

Definition at line 421 of file DigitalPinConfig.hpp.

◆ operator&() [1/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator & ( const DigitalPinCap cap,
const DigitalPinCap::Flags flg 
)

Definition at line 215 of file DigitalPinCap.hpp.

◆ operator&() [2/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator & ( const DigitalPinCap::Flags flg,
const DigitalPinCap cap 
)

Definition at line 222 of file DigitalPinCap.hpp.

◆ operator&() [3/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator & ( const DigitalPinConfig cap,
const DigitalPinConfig::Flags flg 
)

Definition at line 358 of file DigitalPinConfig.hpp.

◆ operator&() [4/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator & ( const DigitalPinConfig::Flags flg,
const DigitalPinConfig cap 
)

Definition at line 365 of file DigitalPinConfig.hpp.

◆ operator<<() [1/8]

std::ostream& duds::hardware::interface::operator<< ( std::ostream &  os,
const DigitalPinCap c 
)
inline

Definition at line 210 of file DigitalPinCap.hpp.

◆ operator<<() [2/8]

std::ostream& duds::hardware::interface::operator<< ( std::ostream &  os,
const DigitalPinConfig c 
)
inline

Definition at line 353 of file DigitalPinConfig.hpp.

◆ operator<<() [3/8]

template<typename Int >
ConversationVector & operator<< ( ConversationVector cv,
const Int &  i 
)

Insertion operator to add an integer to a ConversationVector object.

The endianess is specified by the part's MpfBigendian flag.

Precondition
The conversation part is flagged for output.
Template Parameters
IntThe integer type.
Parameters
cvThe destination conversation part.
iThe integer to add to the end of cv.
Returns
A reference to cv.
Examples:
evdevin.cpp, and pinconfig.cpp.

Definition at line 440 of file ConversationVector.hpp.

◆ operator<<() [4/8]

template<typename Int , std::size_t N>
ConversationVector & operator<< ( ConversationVector cv,
const Int(&)  a[N] 
)

Insertion operator to add an array of integers to a ConversationVector object.

The endianess is specified by the part's MpfBigendian flag.

Precondition
The conversation part is flagged for output.
Template Parameters
IntThe integer type.
NThe length of the array.
Parameters
cvThe destination conversation part.
aThe array of integers to add to the end of cv.
Returns
A reference to cv.

Definition at line 457 of file ConversationVector.hpp.

◆ operator<<() [5/8]

ConversationVector & operator<< ( ConversationVector cv,
const ConversationVector::Reserve cvr 
)
inline

Insertion operator to reserve space in a ConversationVector.

Parameters
cvThe conversation part to modify.
cvrThe object that specifies how much space to reserve.
Returns
A reference to cv.

Definition at line 469 of file ConversationVector.hpp.

◆ operator<<() [6/8]

ConversationVector & operator<< ( ConversationVector cv,
const ConversationVector::BigEndian   
)
inline

Insertion operator to make the ConversationVector handle any following adds using big-endian format.

Parameters
cvThe conversation part to modify.
Returns
A reference to cv.

Definition at line 484 of file ConversationVector.hpp.

◆ operator<<() [7/8]

ConversationVector & operator<< ( ConversationVector cv,
const ConversationVector::LittleEndian   
)
inline

Insertion operator to make the ConversationVector handle any following adds using little-endian format.

Parameters
cvThe conversation part to modify.
Returns
A reference to cv.

Definition at line 499 of file ConversationVector.hpp.

◆ operator<<() [8/8]

ConversationVector & operator<< ( ConversationVector cv,
const std::string &  str 
)
inline

Insertion operator to add a string as binary data to the end of an output ConversationVector.

Parameters
cvThe conversation part to modify.
strThe string to add.
Returns
A reference to cv.

Definition at line 515 of file ConversationVector.hpp.

◆ operator==() [1/4]

constexpr bool duds::hardware::interface::operator== ( const DigitalPinCap cap,
const DigitalPinCap::Flags flg 
)

Definition at line 257 of file DigitalPinCap.hpp.

◆ operator==() [2/4]

constexpr bool duds::hardware::interface::operator== ( const DigitalPinCap::Flags flg,
const DigitalPinCap cap 
)

Definition at line 264 of file DigitalPinCap.hpp.

◆ operator==() [3/4]

constexpr bool duds::hardware::interface::operator== ( const DigitalPinConfig cap,
const DigitalPinConfig::Flags flg 
)

Definition at line 400 of file DigitalPinConfig.hpp.

◆ operator==() [4/4]

constexpr bool duds::hardware::interface::operator== ( const DigitalPinConfig::Flags flg,
const DigitalPinConfig cap 
)

Definition at line 407 of file DigitalPinConfig.hpp.

◆ operator>>() [1/2]

template<typename Int >
ConversationExtractor & operator>> ( ConversationExtractor ce,
Int &  i 
)

Extraction operator to read an integer from a Conversation through a ConversationExtractor object.

The endianess is specified by the part's MpfBigendian flag.

Precondition
The remaining bytes to read is at least the size of Int.
Template Parameters
IntThe integer type.
Parameters
ceThe source ConversationExtractor object.
iThe integer to that will receive the extracted value.
Exceptions
ConversationReadPastEndThe integer type is too large to fit in the remaining bytes of the current part. The read position is left unchanged.
Returns
A reference to ce.

Definition at line 450 of file ConversationExtractor.hpp.

◆ operator>>() [2/2]

template<typename Int , std::size_t N>
ConversationExtractor & operator>> ( ConversationExtractor ce,
Int(&)  a[N] 
)

Extraction operator to read an array of integers from a Conversation through a ConversationExtractor object.

The endianess is specified by the part's MpfBigendian flag.

Precondition
The remaining bytes to read is at least the size of the array.
Template Parameters
IntThe integer type.
NThe number of elements in the array.
Parameters
ceThe source ConversationExtractor object.
aThe start of the destination integer array.
Exceptions
ConversationReadPastEndThe integer type is too large to fit in the remaining bytes of the current part. The read position is left unchanged.
Returns
A reference to ce.

Definition at line 472 of file ConversationExtractor.hpp.

◆ operator^() [1/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator^ ( const DigitalPinCap cap,
const DigitalPinCap::Flags flg 
)

Definition at line 243 of file DigitalPinCap.hpp.

◆ operator^() [2/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator^ ( const DigitalPinCap::Flags flg,
const DigitalPinCap cap 
)

Definition at line 250 of file DigitalPinCap.hpp.

◆ operator^() [3/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator^ ( const DigitalPinConfig cap,
const DigitalPinConfig::Flags flg 
)

Definition at line 386 of file DigitalPinConfig.hpp.

◆ operator^() [4/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator^ ( const DigitalPinConfig::Flags flg,
const DigitalPinConfig cap 
)

Definition at line 393 of file DigitalPinConfig.hpp.

◆ operator|() [1/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator| ( const DigitalPinCap cap,
const DigitalPinCap::Flags flg 
)

Definition at line 229 of file DigitalPinCap.hpp.

◆ operator|() [2/4]

constexpr DigitalPinCap::Flags duds::hardware::interface::operator| ( const DigitalPinCap::Flags flg,
const DigitalPinCap cap 
)

Definition at line 236 of file DigitalPinCap.hpp.

◆ operator|() [3/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator| ( const DigitalPinConfig cap,
const DigitalPinConfig::Flags flg 
)

Definition at line 372 of file DigitalPinConfig.hpp.

◆ operator|() [4/4]

constexpr DigitalPinConfig::Flags duds::hardware::interface::operator| ( const DigitalPinConfig::Flags flg,
const DigitalPinConfig cap 
)

Definition at line 379 of file DigitalPinConfig.hpp.

◆ ParsePinId()

static unsigned int duds::hardware::interface::ParsePinId ( const std::string &  str)
static

◆ ParseState()

static bool duds::hardware::interface::ParseState ( const std::string &  val)
static

Definition at line 148 of file PinConfiguration.cpp.

Variable Documentation

◆ NonexistentDigitalPin

constexpr DigitalPinCap duds::hardware::interface::NonexistentDigitalPin
Initial value:
=
DigitalPinCap(DigitalPinCap::Flags::Zero(), 0)

The capabilities of a non-existent pin.

The object's exists() function will return false.

Definition at line 202 of file DigitalPinCap.hpp.

Referenced by duds::hardware::interface::DigitalPort::capabilities(), duds::hardware::interface::DigitalPort::PinEntry::markNonexistent(), and duds::hardware::interface::linux::SysFsPort::FsPin::open().