Skip to content

Commit

Permalink
Merge pull request #614 from meshtastic/module_validation
Browse files Browse the repository at this point in the history
add bit field to `DeviceMetadata` for excluded modules
  • Loading branch information
thebentern authored Nov 4, 2024
2 parents 0c903c0 + b399bf0 commit 06cf134
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions meshtastic/mesh.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,89 @@ message DeviceMetadata {
* Has PKC capabilities
*/
bool hasPKC = 11;

/*
* Bit field of boolean for excluded modules
* (bitwise OR of ExcludedModules)
*/
uint32 excluded_modules = 12;
}

/*
* Enum for modules excluded from a device's configuration.
* Each value represents a ModuleConfigType that can be toggled as excluded
* by setting its corresponding bit in the `excluded_modules` bitmask field.
*/
enum ExcludedModules {
/*
* Default value of 0 indicates no modules are excluded.
*/
EXCLUDED_NONE = 0x0000;

/*
* MQTT module
*/
MQTT_CONFIG = 0x0001;

/*
* Serial module
*/
SERIAL_CONFIG = 0x0002;

/*
* External Notification module
*/
EXTNOTIF_CONFIG = 0x0004;

/*
* Store and Forward module
*/
STOREFORWARD_CONFIG = 0x0008;

/*
* Range Test module
*/
RANGETEST_CONFIG = 0x0010;

/*
* Telemetry module
*/
TELEMETRY_CONFIG = 0x0020;

/*
* Canned Message module
*/
CANNEDMSG_CONFIG = 0x0040;

/*
* Audio module
*/
AUDIO_CONFIG = 0x0080;

/*
* Remote Hardware module
*/
REMOTEHARDWARE_CONFIG = 0x0100;

/*
* Neighbor Info module
*/
NEIGHBORINFO_CONFIG = 0x0200;

/*
* Ambient Lighting module
*/
AMBIENTLIGHTING_CONFIG = 0x0400;

/*
* Detection Sensor module
*/
DETECTIONSENSOR_CONFIG = 0x0800;

/*
* Paxcounter module
*/
PAXCOUNTER_CONFIG = 0x1000;
}

/*
Expand Down

0 comments on commit 06cf134

Please sign in to comment.