Class: Meshtastic::ModuleConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/meshtastic/module_config.rb

Constant Summary collapse

MQTTConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.MQTTConfig").msgclass
MapReportSettings =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.MapReportSettings").msgclass
RemoteHardwareConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.RemoteHardwareConfig").msgclass
NeighborInfoConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.NeighborInfoConfig").msgclass
DetectionSensorConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.DetectionSensorConfig").msgclass
AudioConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.AudioConfig").msgclass
PaxcounterConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.PaxcounterConfig").msgclass
TrafficManagementConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.TrafficManagementConfig").msgclass
SerialConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.SerialConfig").msgclass
ExternalNotificationConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.ExternalNotificationConfig").msgclass
StoreForwardConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.StoreForwardConfig").msgclass
RangeTestConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.RangeTestConfig").msgclass
TelemetryConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.TelemetryConfig").msgclass
CannedMessageConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.CannedMessageConfig").msgclass
AmbientLightingConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.AmbientLightingConfig").msgclass
StatusMessageConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.StatusMessageConfig").msgclass
MeshBeaconConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.MeshBeaconConfig").msgclass
TAKConfig =
::Google::Protobuf::DescriptorPool.generated_pool.lookup("meshtastic.ModuleConfig.TAKConfig").msgclass

Class Method Summary collapse

Class Method Details

.authorsObject



29
30
31
# File 'lib/meshtastic/module_config.rb', line 29

public_class_method def self.authors
  "AUTHOR(S):\n        0day Inc. <[email protected]>\n      "
end

.get(opts = {}) ⇒ Object



7
8
9
# File 'lib/meshtastic/module_config.rb', line 7

public_class_method def self.get(opts = {})
  Admin.send(admin_options(opts).merge(get_module_config_request: opts.fetch(:module_config_type, :MQTT_CONFIG)))
end

.helpObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/meshtastic/module_config.rb', line 33

public_class_method def self.help
  puts "        USAGE:
    # Run the get class method for this module.
    #{self}.get(transport_obj: connection, module_config_type: :MQTT_CONFIG)

    # Run the set class method for this module.
    #{self}.set(transport_obj: connection, module_config: module_config)

    # Legacy serial_obj:, bluetooth_obj:, tcp_obj:, mqtt_obj: remain accepted.
    # Supply one non-nil connection only; mixed connection options are rejected.
    # Remote setters inherit Admin automatic sessions, not persistence readback.

    # Run the authors class method for this module.
    #{self}.authors

  "
end

.set(opts = {}) ⇒ Object



11
12
13
# File 'lib/meshtastic/module_config.rb', line 11

public_class_method def self.set(opts = {})
  Admin.send(admin_options(opts).merge(set_module_config: opts.fetch(:module_config)))
end