Config_LoRaConfig class

Lora Config

Available extensions

Constructors

Config_LoRaConfig.new({bool? usePreset, Config_LoRaConfig_ModemPreset? modemPreset, int? bandwidth, int? spreadFactor, int? codingRate, double? frequencyOffset, Config_LoRaConfig_RegionCode? region, int? hopLimit, bool? txEnabled, int? txPower, int? channelNum, bool? overrideDutyCycle, bool? sx126xRxBoostedGain, double? overrideFrequency, bool? paFanDisabled, Iterable<int>? ignoreIncoming, bool? ignoreMqtt, bool? configOkToMqtt})
factory
Config_LoRaConfig.fromBuffer(List<int> data, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
factory
Config_LoRaConfig.fromJson(String json, [ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY])
factory

Properties

bandwidth int
Bandwidth in MHz Certain bandwidth numbers are 'special' and will be converted to the appropriate floating point value: 31 -> 31.25MHz
getter/setter pair
channelNum int
This controls the actual hardware frequency the radio transmits on. Most users should never need to be exposed to this field/concept. A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). If ZERO then the rule is "use the old channel name hash based algorithm to derive the channel number") If using the hash algorithm the channel number will be: hash(channel_name) % NUM_CHANNELS (Where num channels depends on the regulatory region).
getter/setter pair
codingRate int
The denominator of the coding rate. ie for 4/5, the value is 5. 4/8 the value is 8.
getter/setter pair
configOkToMqtt bool
Sets the ok_to_mqtt bit on outgoing packets
getter/setter pair
frequencyOffset double
This parameter is for advanced users with advanced test equipment, we do not recommend most users use it. A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
getter/setter pair
hashCode int
Calculates a hash code based on the contents of the protobuf.
no setterinherited
hopLimit int
Maximum number of hops. This can't be greater than 7. Default of 3 Attempting to set a value > 7 results in the default
getter/setter pair
ignoreIncoming → PbList<int>
For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in ignore_incoming will have packets they send dropped on receive (by router.cpp)
no setter
ignoreMqtt bool
If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it.
getter/setter pair
info_ → BuilderInfo
no setter
isFrozen bool
Returns true if this message is marked read-only. Otherwise false.
no setterinherited
modemPreset Config_LoRaConfig_ModemPreset
Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. As a heuristic: If bandwidth is specified, do not use modem_config. Because protobufs take ZERO space when the value is zero this works out nicely. This value is replaced by bandwidth/spread_factor/coding_rate. If you'd like to experiment with other options add them to MeshRadio.cpp in the device code.
getter/setter pair
overrideDutyCycle bool
If true, duty cycle limits will be exceeded and thus you're possibly not following the local regulations if you're not a HAM. Has no effect if the duty cycle of the used region is 100%.
getter/setter pair
overrideFrequency double
This parameter is for advanced users and licensed HAM radio operators. Ignore Channel Calculation and use this frequency instead. The frequency_offset will still be applied. This will allow you to use out-of-band frequencies. Please respect your local laws and regulations. If you are a HAM, make sure you enable HAM mode and turn off encryption.
getter/setter pair
paFanDisabled bool
If true, disable the build-in PA FAN using pin define in RF95_FAN_EN.
getter/setter pair
region Config_LoRaConfig_RegionCode
The region code for the radio (US, CN, EU433, etc...)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spreadFactor int
A number from 7 to 12. Indicates number of chirps per symbol as 1<<spread_factor.
getter/setter pair
sx126xRxBoostedGain bool
If true, sets RX boosted gain mode on SX126X based radios
getter/setter pair
txEnabled bool
Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. Defaults to false
getter/setter pair
txPower int
If zero, then use default max legal continuous power (ie. something that won't burn out the radio hardware) In most cases you should use zero here. Units are in dBm.
getter/setter pair
unknownFields → UnknownFieldSet
no setterinherited
usePreset bool
When enabled, the modem_preset fields will be adhered to, else the bandwidth/spread_factor/coding_rate will be taked from their respective manually defined fields
getter/setter pair

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
clearBandwidth() → void
clearChannelNum() → void
clearCodingRate() → void
clearConfigOkToMqtt() → void
clearExtension(Extension extension) → void
Clears an extension field and also removes the extension.
inherited
clearField(int tagNumber) → void
Clears the contents of a given field.
inherited
clearFrequencyOffset() → void
clearHopLimit() → void
clearIgnoreMqtt() → void
clearModemPreset() → void
clearOverrideDutyCycle() → void
clearOverrideFrequency() → void
clearPaFanDisabled() → void
clearRegion() → void
clearSpreadFactor() → void
clearSx126xRxBoostedGain() → void
clearTxEnabled() → void
clearTxPower() → void
clearUsePreset() → void
clone() Config_LoRaConfig
Creates a deep copy of the fields in this message. (The generated code uses mergeFromMessage.)
copyWith(void updates(Config_LoRaConfig)) Config_LoRaConfig
Apply updates to a copy of this message.
createEmptyInstance() Config_LoRaConfig
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.
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
hasBandwidth() bool
hasChannelNum() bool
hasCodingRate() bool
hasConfigOkToMqtt() bool
hasExtension(Extension extension) bool
Returns true if a value of extension is present.
inherited
hasField(int tagNumber) bool
Whether this message has a field associated with tagNumber.
inherited
hasFrequencyOffset() bool
hasHopLimit() bool
hasIgnoreMqtt() bool
hasModemPreset() bool
hasOverrideDutyCycle() bool
hasOverrideFrequency() bool
hasPaFanDisabled() bool
hasRegion() bool
hasRequiredFields() bool
Whether the message has required fields.
inherited
hasSpreadFactor() bool
hasSx126xRxBoostedGain() bool
hasTxEnabled() bool
hasTxPower() bool
hasUsePreset() 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 a CodedBufferReader input.
inherited
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from data, a JSON object, encoded as described by GeneratedMessage.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

Apply updates 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
writeToBuffer() Uint8List
Serialize the message as the protobuf binary format.
inherited
writeToCodedBufferWriter(CodedBufferWriter output) → void
Same as writeToBuffer, but serializes to the given CodedBufferWriter.
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