|
DUDS
|
Distributed Update of Data from Something
|
The base class for the digital pin access classes. More...
#include <DigitalPinAccessBase.hpp>
Classes | |
| union | PortData |
| A type for holding arbitrary port-specific data within a DigitalPinAccess or DigitalPinSetAccess object. More... | |
Public Member Functions | |
| DigitalPort * | port () const |
| Returns a pointer to the port that controls the pin(s) that are operated through this object. More... | |
Protected Member Functions | |
| DigitalPinAccessBase () | |
| Cannot be constructed using this base class, but allows the construction of a useless access object without a DigitalPort. More... | |
| DigitalPinAccessBase (DigitalPort *port) | |
| Initializes the port pointer. More... | |
| ~DigitalPinAccessBase ()=default | |
| Cannot be destructed using this base class to avoid the need for a virtual destructor. More... | |
| DigitalPinAccessBase & | operator= (DigitalPinAccessBase &&old) noexcept |
| Allows moving access objects. More... | |
| void | reset () |
| Loses the pointer to the DigitalPort rendering the access object useless. More... | |
Protected Attributes | |
| PortData | portdata |
| Port specific information. More... | |
Private Attributes | |
| friend | DigitalPort |
| DigitalPort * | dp |
| A pointer to the port object handling the pin(s). More... | |
The base class for the digital pin access classes.
This base class stores a pointer to the DigitalPort handling the pins. A shared pointer is not used to speed up the creation and destruction of the access objects.
Definition at line 27 of file DigitalPinAccessBase.hpp.
|
inlineprotected |
Cannot be constructed using this base class, but allows the construction of a useless access object without a DigitalPort.
Definition at line 73 of file DigitalPinAccessBase.hpp.
|
inlineprotected |
Initializes the port pointer.
Definition at line 77 of file DigitalPinAccessBase.hpp.
|
protecteddefault |
Cannot be destructed using this base class to avoid the need for a virtual destructor.
There is no point to keeping objects of this base class.
Referenced by DigitalPinAccessBase().
|
protectednoexcept |
Allows moving access objects.
The port specific data and the DigitalPort pointer is copied.
Definition at line 14 of file DigitalPinAccessBase.cpp.
Referenced by DigitalPinAccessBase(), duds::hardware::interface::DigitalPinAccess::operator=(), and duds::hardware::interface::DigitalPinSetAccess::operator=().
|
inline |
Returns a pointer to the port that controls the pin(s) that are operated through this object.
The result will be nullptr if the access object was constructed without a DigitalPort. During the life of this object, the result must never change, and must remain valid. These requirements allow the use of the pointer without checking for validity. Further, the pin itslef must remain available. This allows some operations to occur without thread synchronization. The result is relatively fast access to the port and the pin.
Definition at line 106 of file DigitalPinAccessBase.hpp.
Referenced by duds::hardware::interface::DigitalPort::access(), duds::hardware::interface::DigitalPinAccess::capabilities(), duds::hardware::interface::DigitalPinSetAccess::capabilities(), duds::hardware::interface::DigitalPinAccess::configuration(), duds::hardware::interface::DigitalPinSetAccess::configuration(), duds::hardware::interface::DigitalPinSetAccess::globalId(), duds::hardware::interface::DigitalPinSetAccess::globalIds(), duds::hardware::interface::DigitalPinAccess::havePin(), duds::hardware::interface::DigitalPinSetAccess::havePins(), duds::hardware::interface::DigitalPinSetAccess::independentConfig(), duds::hardware::interface::DigitalPinAccess::input(), duds::hardware::interface::DigitalPinSetAccess::input(), duds::hardware::interface::DigitalPinAccess::localId(), duds::hardware::interface::DigitalPinAccess::modifyConfig(), duds::hardware::interface::DigitalPinSetAccess::modifyConfig(), duds::hardware::interface::DigitalPinAccess::output(), duds::hardware::interface::DigitalPinSetAccess::output(), duds::hardware::interface::DigitalPinAccess::proposeConfig(), duds::hardware::interface::DigitalPinSetAccess::proposeConfig(), duds::hardware::interface::DigitalPinAccess::retire(), duds::hardware::interface::DigitalPinSetAccess::retire(), duds::hardware::interface::DigitalPinSetAccess::simultaneousOperations(), duds::hardware::interface::DigitalPort::updateAccess(), and duds::hardware::interface::DigitalPinSetAccess::write().
|
inlineprotected |
Loses the pointer to the DigitalPort rendering the access object useless.
Definition at line 92 of file DigitalPinAccessBase.hpp.
Referenced by duds::hardware::interface::DigitalPinAccess::retire(), and duds::hardware::interface::DigitalPinSetAccess::retire().
|
private |
Definition at line 62 of file DigitalPinAccessBase.hpp.
|
private |
A pointer to the port object handling the pin(s).
Definition at line 61 of file DigitalPinAccessBase.hpp.
Referenced by operator=(), and port().
|
mutableprotected |
Port specific information.
This data is copied when a move constructor or assignment is used.
Definition at line 68 of file DigitalPinAccessBase.hpp.
Referenced by duds::hardware::interface::DigitalPinAccess::input(), duds::hardware::interface::DigitalPinSetAccess::input(), duds::hardware::interface::DigitalPinAccess::modifyConfig(), duds::hardware::interface::DigitalPinSetAccess::modifyConfig(), duds::hardware::interface::DigitalPinAccess::output(), duds::hardware::interface::DigitalPinSetAccess::output(), duds::hardware::interface::DigitalPort::portData(), duds::hardware::interface::DigitalPort::portDataPtr(), and duds::hardware::interface::DigitalPinSetAccess::write().