|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Configuration for a hardware package instance. More...
#include <PackageConfig.h>
Public Member Functions | |
| int | GetPin (const std::string &name, int defaultVal=-1) const |
| Get a pin GPIO number by name. | |
| std::string | GetString (const std::string &name, const std::string &defaultVal="") const |
| Get a string setting by name. | |
| int | GetInt (const std::string &name, int defaultVal=0) const |
| Get an integer setting by name (parsed from string). | |
| bool | GetBool (const std::string &name, bool defaultVal=false) const |
| Get a boolean setting by name. | |
Public Attributes | |
| std::string | packageId |
| bool | enabled = false |
| std::map< std::string, int > | pins |
| std::map< std::string, std::string > | settings |
Configuration for a hardware package instance.
Contains the runtime configuration for a hardware package, including:
This is the runtime representation loaded from the platform JSON. The editor uses PackageConfigEntry (in PlatformConfig.h) which is serialized to/from JSON.
Note: this struct is unrelated to the installable-package system (the deki-* DLLs listed in deki-packages.json). It exists at the engine src/ root rather than under src/packages/ to make that distinction clear.
|
inline |
Get a pin GPIO number by name.
| name | Pin name (e.g., "MOSI", "CS") |
| defaultVal | Value to return if pin not found |
|
inline |
Get a string setting by name.
| name | Setting name (e.g., "mode", "mount_point") |
| defaultVal | Value to return if setting not found |
|
inline |
Get an integer setting by name (parsed from string).
| name | Setting name (e.g., "baud_rate", "address") |
| defaultVal | Value to return if setting not found or invalid |
|
inline |
Get a boolean setting by name.
| name | Setting name (e.g., "auto_mount", "enabled") |
| defaultVal | Value to return if setting not found |
| std::string PackageConfig::packageId |
| bool PackageConfig::enabled = false |
| std::map<std::string, int> PackageConfig::pins |
| std::map<std::string, std::string> PackageConfig::settings |