Describes a pin's type, numbering, and associated names.
More...
#include <gpiopin.h>
|
| Descriptor (long long pinId=-1, int pinRow=-1, int pinColumn=-1) |
| Constructs a Descriptor with optional parameters.
|
|
bool | insert () |
| Inserts the descriptor into the system.
|
|
bool | hasModeName (Mode m, long long nameId) const |
| Checks if a mode name exists for a given mode and name ID.
|
|
long long | findId () const |
| Finds the unique identifier for the pin.
|
|
long long | findName (const std::string &name) const |
| Finds the identifier for a given name.
|
|
|
void | insertModeName (Mode m, const std::string &n) |
| Inserts a mode-name pair into the descriptor.
|
|
Describes a pin's type, numbering, and associated names.
Definition at line 170 of file gpiopin.h.
◆ Descriptor()
Piduino::Pin::Descriptor::Descriptor |
( |
long long |
pinId = -1 , |
|
|
int |
pinRow = -1 , |
|
|
int |
pinColumn = -1 |
|
) |
| |
◆ findId()
long long Piduino::Pin::Descriptor::findId |
( |
| ) |
const |
Finds the unique identifier for the pin.
- Returns
- The pin's unique identifier.
◆ findName()
long long Piduino::Pin::Descriptor::findName |
( |
const std::string & |
name | ) |
const |
Finds the identifier for a given name.
- Parameters
-
name | The name to search for. |
- Returns
- The identifier associated with the name.
◆ hasModeName()
bool Piduino::Pin::Descriptor::hasModeName |
( |
Mode |
m, |
|
|
long long |
nameId |
|
) |
| const |
Checks if a mode name exists for a given mode and name ID.
- Parameters
-
m | The mode to check. |
nameId | The name identifier. |
- Returns
- True if the mode name exists, false otherwise.
◆ insert()
bool Piduino::Pin::Descriptor::insert |
( |
| ) |
|
Inserts the descriptor into the system.
- Returns
- True on success, false otherwise.
◆ insertModeName()
void Piduino::Pin::Descriptor::insertModeName |
( |
Mode |
m, |
|
|
const std::string & |
n |
|
) |
| |
|
private |
Inserts a mode-name pair into the descriptor.
- Parameters
-
◆ id
long long Piduino::Pin::Descriptor::id |
Unique identifier for the pin.
Definition at line 174 of file gpiopin.h.
◆ name
std::map<Mode, std::string> Piduino::Pin::Descriptor::name |
Map of mode to pin name.
Definition at line 175 of file gpiopin.h.
◆ num
Number Piduino::Pin::Descriptor::num |
◆ type
Type Piduino::Pin::Descriptor::type |