AdminMessage class
This message is handled by the Admin module and is responsible for all settings/channel read/write operations. This message is used to do settings operations to both remote AND local nodes. (Prior to 1.2 these operations were done via special ToRadio operations)
- Available extensions
Constructors
-
AdminMessage.new({int? getChannelRequest, Channel? getChannelResponse, bool? getOwnerRequest, User? getOwnerResponse, AdminMessage_ConfigType? getConfigRequest, Config? getConfigResponse, AdminMessage_ModuleConfigType? getModuleConfigRequest, ModuleConfig? getModuleConfigResponse, bool? getCannedMessageModuleMessagesRequest, String? getCannedMessageModuleMessagesResponse, bool? getDeviceMetadataRequest, DeviceMetadata? getDeviceMetadataResponse, bool? getRingtoneRequest, String? getRingtoneResponse, bool? getDeviceConnectionStatusRequest, DeviceConnectionStatus? getDeviceConnectionStatusResponse, HamParameters? setHamMode, bool? getNodeRemoteHardwarePinsRequest, NodeRemoteHardwarePinsResponse? getNodeRemoteHardwarePinsResponse, bool? enterDfuModeRequest, String? deleteFileRequest, int? setScale, AdminMessage_BackupLocation? backupPreferences, AdminMessage_BackupLocation? restorePreferences, AdminMessage_BackupLocation? removeBackupPreferences, AdminMessage_InputEvent? sendInputEvent, User? setOwner, Channel? setChannel, Config? setConfig, ModuleConfig? setModuleConfig, String? setCannedMessageModuleMessages, String? setRingtoneMessage, int? removeByNodenum, int? setFavoriteNode, int? removeFavoriteNode, Position? setFixedPosition, bool? removeFixedPosition, int? setTimeOnly, bool? getUiConfigRequest, DeviceUIConfig? getUiConfigResponse, DeviceUIConfig? storeUiConfig, int? setIgnoredNode, int? removeIgnoredNode, bool? beginEditSettings, bool? commitEditSettings, SharedContact? addContact, KeyVerificationAdmin? keyVerification, int? factoryResetDevice, int? rebootOtaSeconds, bool? exitSimulator, int? rebootSeconds, int? shutdownSeconds, int? factoryResetConfig, int? nodedbReset, List<
int> ? sessionPasskey}) -
factory
-
AdminMessage.fromBuffer(List<
int> data, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) -
factory
- AdminMessage.fromJson(String json, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- addContact ↔ SharedContact
-
Add a contact (User) to the nodedb
getter/setter pair
- backupPreferences ↔ AdminMessage_BackupLocation
-
Backup the node's preferences
getter/setter pair
- beginEditSettings ↔ bool
-
Begins an edit transaction for config, module config, owner, and channel settings changes
This will delay the standard implicit save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
getter/setter pair
- commitEditSettings ↔ bool
-
Commits an open transaction for any edits made to config, module config, owner, and channel settings
getter/setter pair
- deleteFileRequest ↔ String
-
Delete the file by the specified path from the device
getter/setter pair
- enterDfuModeRequest ↔ bool
-
Enter (UF2) DFU mode
Only implemented on NRF52 currently
getter/setter pair
- exitSimulator ↔ bool
-
This message is only supported for the simulator Portduino build.
If received the simulator will exit successfully.
getter/setter pair
- factoryResetConfig ↔ int
-
Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved.
getter/setter pair
- factoryResetDevice ↔ int
-
Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared.
getter/setter pair
- getCannedMessageModuleMessagesRequest ↔ bool
-
Get the Canned Message Module messages in the response to this message.
getter/setter pair
- getCannedMessageModuleMessagesResponse ↔ String
-
Get the Canned Message Module messages in the response to this message.
getter/setter pair
- getChannelRequest ↔ int
-
Send the specified channel in the response to this message
NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
getter/setter pair
- getChannelResponse ↔ Channel
-
TODO: REPLACE
getter/setter pair
- getConfigRequest ↔ AdminMessage_ConfigType
-
Ask for the following config data to be sent
getter/setter pair
- getConfigResponse ↔ Config
-
Send the current Config in the response to this message.
getter/setter pair
- getDeviceConnectionStatusRequest ↔ bool
-
Request the node to send it's connection status
getter/setter pair
- getDeviceConnectionStatusResponse ↔ DeviceConnectionStatus
-
Device connection status response
getter/setter pair
- getDeviceMetadataRequest ↔ bool
-
Request the node to send device metadata (firmware, protobuf version, etc)
getter/setter pair
- getDeviceMetadataResponse ↔ DeviceMetadata
-
Device metadata response
getter/setter pair
- getModuleConfigRequest ↔ AdminMessage_ModuleConfigType
-
Ask for the following config data to be sent
getter/setter pair
- getModuleConfigResponse ↔ ModuleConfig
-
Send the current Config in the response to this message.
getter/setter pair
- getNodeRemoteHardwarePinsRequest ↔ bool
-
Get the mesh's nodes with their available gpio pins for RemoteHardware module use
getter/setter pair
- getNodeRemoteHardwarePinsResponse ↔ NodeRemoteHardwarePinsResponse
-
Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use
getter/setter pair
- getOwnerRequest ↔ bool
-
Send the current owner data in the response to this message.
getter/setter pair
- getOwnerResponse ↔ User
-
TODO: REPLACE
getter/setter pair
- getRingtoneRequest ↔ bool
-
Get the Ringtone in the response to this message.
getter/setter pair
- getRingtoneResponse ↔ String
-
Get the Ringtone in the response to this message.
getter/setter pair
- getUiConfigRequest ↔ bool
-
Tell the node to send the stored ui data.
getter/setter pair
- getUiConfigResponse ↔ DeviceUIConfig
-
Reply stored device ui data.
getter/setter pair
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setter
- isFrozen → bool
-
Returns
true
if this message is marked read-only. Otherwisefalse
.no setterinherited - keyVerification ↔ KeyVerificationAdmin
-
Initiate or respond to a key verification request
getter/setter pair
- nodedbReset ↔ int
-
Tell the node to reset the nodedb.
getter/setter pair
- rebootOtaSeconds ↔ int
-
Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.
getter/setter pair
- rebootSeconds ↔ int
-
Tell the node to reboot in this many seconds (or <0 to cancel reboot)
getter/setter pair
- removeBackupPreferences ↔ AdminMessage_BackupLocation
-
Remove backups of the node's preferences
getter/setter pair
- removeByNodenum ↔ int
-
Remove the node by the specified node-num from the NodeDB on the device
getter/setter pair
- removeFavoriteNode ↔ int
-
Set specified node-num to be un-favorited on the NodeDB on the device
getter/setter pair
- removeFixedPosition ↔ bool
-
Clear fixed position coordinates and then set position.fixed_position = false
getter/setter pair
- removeIgnoredNode ↔ int
-
Set specified node-num to be un-ignored on the NodeDB on the device
getter/setter pair
- restorePreferences ↔ AdminMessage_BackupLocation
-
Restore the node's preferences
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendInputEvent ↔ AdminMessage_InputEvent
-
Send an input event to the node.
This is used to trigger physical input events like button presses, touch events, etc.
getter/setter pair
-
sessionPasskey
↔ List<
int> -
The node generates this key and sends it with any get_x_response packets.
The client MUST include the same key with any set_x commands. Key expires after 300 seconds.
Prevents replay attacks for admin messages.
getter/setter pair
- setCannedMessageModuleMessages ↔ String
-
Set the Canned Message Module messages text.
getter/setter pair
- setChannel ↔ Channel
-
Set channels (using the new API).
A special channel is the "primary channel".
The other records are secondary channels.
Note: only one channel can be marked as primary.
If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
getter/setter pair
- setConfig ↔ Config
-
Set the current Config
getter/setter pair
- setFavoriteNode ↔ int
-
Set specified node-num to be favorited on the NodeDB on the device
getter/setter pair
- setFixedPosition ↔ Position
-
Set fixed position data on the node and then set the position.fixed_position = true
getter/setter pair
- setHamMode ↔ HamParameters
-
Setup a node for licensed amateur (ham) radio operation
getter/setter pair
- setIgnoredNode ↔ int
-
Set specified node-num to be ignored on the NodeDB on the device
getter/setter pair
- setModuleConfig ↔ ModuleConfig
-
Set the current Config
getter/setter pair
- setOwner ↔ User
-
Set the owner for this node
getter/setter pair
- setRingtoneMessage ↔ String
-
Set the ringtone for ExternalNotification.
getter/setter pair
- setScale ↔ int
-
Set zero and offset for scale chips
getter/setter pair
- setTimeOnly ↔ int
-
Set time only on the node
Convenience method to set the time on the node (as Net quality) without any other position data
getter/setter pair
- shutdownSeconds ↔ int
-
Tell the node to shutdown in this many seconds (or <0 to cancel shutdown)
getter/setter pair
- storeUiConfig ↔ DeviceUIConfig
-
Tell the node to store UI data persistently.
getter/setter pair
- unknownFields → UnknownFieldSet
-
no setterinherited
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
Throws a StateError if the message has required fields without a value.
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearAddContact(
) → void -
clearBackupPreferences(
) → void -
clearBeginEditSettings(
) → void -
clearCommitEditSettings(
) → void -
clearDeleteFileRequest(
) → void -
clearEnterDfuModeRequest(
) → void -
clearExitSimulator(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearFactoryResetConfig(
) → void -
clearFactoryResetDevice(
) → void -
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearGetCannedMessageModuleMessagesRequest(
) → void -
clearGetCannedMessageModuleMessagesResponse(
) → void -
clearGetChannelRequest(
) → void -
clearGetChannelResponse(
) → void -
clearGetConfigRequest(
) → void -
clearGetConfigResponse(
) → void -
clearGetDeviceConnectionStatusRequest(
) → void -
clearGetDeviceConnectionStatusResponse(
) → void -
clearGetDeviceMetadataRequest(
) → void -
clearGetDeviceMetadataResponse(
) → void -
clearGetModuleConfigRequest(
) → void -
clearGetModuleConfigResponse(
) → void -
clearGetNodeRemoteHardwarePinsRequest(
) → void -
clearGetNodeRemoteHardwarePinsResponse(
) → void -
clearGetOwnerRequest(
) → void -
clearGetOwnerResponse(
) → void -
clearGetRingtoneRequest(
) → void -
clearGetRingtoneResponse(
) → void -
clearGetUiConfigRequest(
) → void -
clearGetUiConfigResponse(
) → void -
clearKeyVerification(
) → void -
clearNodedbReset(
) → void -
clearPayloadVariant(
) → void -
clearRebootOtaSeconds(
) → void -
clearRebootSeconds(
) → void -
clearRemoveBackupPreferences(
) → void -
clearRemoveByNodenum(
) → void -
clearRemoveFavoriteNode(
) → void -
clearRemoveFixedPosition(
) → void -
clearRemoveIgnoredNode(
) → void -
clearRestorePreferences(
) → void -
clearSendInputEvent(
) → void -
clearSessionPasskey(
) → void -
clearSetCannedMessageModuleMessages(
) → void -
clearSetChannel(
) → void -
clearSetConfig(
) → void -
clearSetFavoriteNode(
) → void -
clearSetFixedPosition(
) → void -
clearSetHamMode(
) → void -
clearSetIgnoredNode(
) → void -
clearSetModuleConfig(
) → void -
clearSetOwner(
) → void -
clearSetRingtoneMessage(
) → void -
clearSetScale(
) → void -
clearSetTimeOnly(
) → void -
clearShutdownSeconds(
) → void -
clearStoreUiConfig(
) → void -
clone(
) → AdminMessage - Creates a deep copy of the fields in this message. (The generated code uses mergeFromMessage.)
-
copyWith(
void updates(AdminMessage)) → AdminMessage -
Apply
updates
to a copy of this message. -
createEmptyInstance(
) → AdminMessage - Creates an empty instance of the same message type as this.
-
deepCopy(
) → T -
Available on T, provided by the GeneratedMessageGenericExtensions extension
Returns a writable deep copy of this message. -
ensureAddContact(
) → SharedContact -
ensureGetChannelResponse(
) → Channel -
ensureGetConfigResponse(
) → Config -
ensureGetDeviceConnectionStatusResponse(
) → DeviceConnectionStatus -
ensureGetDeviceMetadataResponse(
) → DeviceMetadata -
ensureGetModuleConfigResponse(
) → ModuleConfig -
ensureGetNodeRemoteHardwarePinsResponse(
) → NodeRemoteHardwarePinsResponse -
ensureGetOwnerResponse(
) → User -
ensureGetUiConfigResponse(
) → DeviceUIConfig -
ensureKeyVerification(
) → KeyVerificationAdmin -
ensureSendInputEvent(
) → AdminMessage_InputEvent -
ensureSetChannel(
) → Channel -
ensureSetConfig(
) → Config -
ensureSetFixedPosition(
) → Position -
ensureSetHamMode(
) → HamParameters -
ensureSetModuleConfig(
) → ModuleConfig -
ensureSetOwner(
) → User -
ensureStoreUiConfig(
) → DeviceUIConfig -
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension
.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber
, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasAddContact(
) → bool -
hasBackupPreferences(
) → bool -
hasBeginEditSettings(
) → bool -
hasCommitEditSettings(
) → bool -
hasDeleteFileRequest(
) → bool -
hasEnterDfuModeRequest(
) → bool -
hasExitSimulator(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
true
if a value ofextension
is present.inherited -
hasFactoryResetConfig(
) → bool -
hasFactoryResetDevice(
) → bool -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber
.inherited -
hasGetCannedMessageModuleMessagesRequest(
) → bool -
hasGetCannedMessageModuleMessagesResponse(
) → bool -
hasGetChannelRequest(
) → bool -
hasGetChannelResponse(
) → bool -
hasGetConfigRequest(
) → bool -
hasGetConfigResponse(
) → bool -
hasGetDeviceConnectionStatusRequest(
) → bool -
hasGetDeviceConnectionStatusResponse(
) → bool -
hasGetDeviceMetadataRequest(
) → bool -
hasGetDeviceMetadataResponse(
) → bool -
hasGetModuleConfigRequest(
) → bool -
hasGetModuleConfigResponse(
) → bool -
hasGetNodeRemoteHardwarePinsRequest(
) → bool -
hasGetNodeRemoteHardwarePinsResponse(
) → bool -
hasGetOwnerRequest(
) → bool -
hasGetOwnerResponse(
) → bool -
hasGetRingtoneRequest(
) → bool -
hasGetRingtoneResponse(
) → bool -
hasGetUiConfigRequest(
) → bool -
hasGetUiConfigResponse(
) → bool -
hasKeyVerification(
) → bool -
hasNodedbReset(
) → bool -
hasRebootOtaSeconds(
) → bool -
hasRebootSeconds(
) → bool -
hasRemoveBackupPreferences(
) → bool -
hasRemoveByNodenum(
) → bool -
hasRemoveFavoriteNode(
) → bool -
hasRemoveFixedPosition(
) → bool -
hasRemoveIgnoredNode(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasRestorePreferences(
) → bool -
hasSendInputEvent(
) → bool -
hasSessionPasskey(
) → bool -
hasSetCannedMessageModuleMessages(
) → bool -
hasSetChannel(
) → bool -
hasSetConfig(
) → bool -
hasSetFavoriteNode(
) → bool -
hasSetFixedPosition(
) → bool -
hasSetHamMode(
) → bool -
hasSetIgnoredNode(
) → bool -
hasSetModuleConfig(
) → bool -
hasSetOwner(
) → bool -
hasSetRingtoneMessage(
) → bool -
hasSetScale(
) → bool -
hasSetTimeOnly(
) → bool -
hasShutdownSeconds(
) → bool -
hasStoreUiConfig(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Same as
mergeFromBuffer
, but takes aCodedBufferReader
input.inherited -
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data
, a JSON object, encoded as described byGeneratedMessage.writeToJson
.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
other
into this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json
, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
void updates(T)) → T -
Available on T, provided by the GeneratedMessageGenericExtensions extension
Applyupdates
to a copy of this message. -
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value
.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber
.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this
.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
whichPayloadVariant(
) → AdminMessage_PayloadVariant -
writeToBuffer(
) → Uint8List -
Serialize the message as the protobuf binary format.
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
Same as
writeToBuffer
, but serializes to the givenCodedBufferWriter
.inherited -
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → AdminMessage -
createRepeated(
) → PbList< AdminMessage> -
getDefault(
) → AdminMessage