Runtime configuration of one hardware package on a board: pin assignments (GPIO numbers) and string settings, loaded from the platform JSON.
More...
#include <deki/PackageConfig.h>
|
| int | GetPin (const std::string &name, int defaultVal=-1) const |
| | GPIO number of the pin name (such as "MOSI" or "CS"), or defaultVal.
|
| std::string | GetString (const std::string &name, const std::string &defaultVal="") const |
| | The setting name (such as "mode" or "mount_point"), or defaultVal.
|
| int | GetInt (const std::string &name, int defaultVal=0) const |
| | The setting name parsed as a decimal integer, or defaultVal when it is missing or not a number.
|
| bool | GetBool (const std::string &name, bool defaultVal=false) const |
| | The setting name as a bool ("true", "1" or "yes" are true), or defaultVal when it is missing.
|
Runtime configuration of one hardware package on a board: pin assignments (GPIO numbers) and string settings, loaded from the platform JSON.
The editor's JSON-backed form is PackageConfigEntry (PlatformConfig.h).
Unrelated to installable packages (the deki-* DLLs in deki-packages.json).
◆ GetPin()
| int Deki::PackageConfig::GetPin |
( |
const std::string & | name, |
|
|
int | defaultVal = -1 ) const |
|
inline |
GPIO number of the pin name (such as "MOSI" or "CS"), or defaultVal.
◆ GetString()
| std::string Deki::PackageConfig::GetString |
( |
const std::string & | name, |
|
|
const std::string & | defaultVal = "" ) const |
|
inline |
The setting name (such as "mode" or "mount_point"), or defaultVal.
◆ GetInt()
| int Deki::PackageConfig::GetInt |
( |
const std::string & | name, |
|
|
int | defaultVal = 0 ) const |
|
inline |
The setting name parsed as a decimal integer, or defaultVal when it is missing or not a number.
◆ GetBool()
| bool Deki::PackageConfig::GetBool |
( |
const std::string & | name, |
|
|
bool | defaultVal = false ) const |
|
inline |
The setting name as a bool ("true", "1" or "yes" are true), or defaultVal when it is missing.
◆ packageId
| std::string Deki::PackageConfig::packageId |
◆ enabled
| bool Deki::PackageConfig::enabled = false |
◆ pins
| std::map<std::string, int> Deki::PackageConfig::pins |
◆ settings
| std::map<std::string, std::string> Deki::PackageConfig::settings |
The documentation for this struct was generated from the following file: