Struct LoraDataRate
One data rate: what a number on the wire means for the radio.
public readonly record struct LoraDataRate : IEquatable<LoraDataRate>
- Implements
- Inherited Members
Constructors
LoraDataRate(LoraModulation, uint, uint?, byte?, byte?, byte?)
One data rate: what a number on the wire means for the radio.
public LoraDataRate(LoraModulation Kind, uint BitrateBps, uint? BandwidthHz, byte? SpreadingFactor, byte? CodingRateNumerator, byte? CodingRateDenominator)
Parameters
KindLoraModulationHow this rate is carried.
BitrateBpsuintThe payload bitrate in bits per second.
BandwidthHzuint?The channel bandwidth in hertz, for a LoRa or LR-FHSS rate.
SpreadingFactorbyte?The spreading factor, for a LoRa rate.
CodingRateNumeratorbyte?The coding-rate numerator, for an LR-FHSS rate.
CodingRateDenominatorbyte?The coding-rate denominator, for an LR-FHSS rate.
Properties
BandwidthHz
The channel bandwidth in hertz, for a LoRa or LR-FHSS rate.
public uint? BandwidthHz { get; init; }
Property Value
- uint?
BitrateBps
The payload bitrate in bits per second.
public uint BitrateBps { get; init; }
Property Value
CodingRateDenominator
The coding-rate denominator, for an LR-FHSS rate.
public byte? CodingRateDenominator { get; init; }
Property Value
- byte?
CodingRateNumerator
The coding-rate numerator, for an LR-FHSS rate.
public byte? CodingRateNumerator { get; init; }
Property Value
- byte?
Kind
How this rate is carried.
public LoraModulation Kind { get; init; }
Property Value
SpreadingFactor
The spreading factor, for a LoRa rate.
public byte? SpreadingFactor { get; init; }
Property Value
- byte?
Methods
ForFsk(uint)
Describes a rate carried by frequency-shift keying.
public static LoraDataRate ForFsk(uint bitrateBps)
Parameters
bitrateBpsuintThe payload bitrate in bits per second.
Returns
- LoraDataRate
The data rate.
ForLora(byte, uint, uint)
Describes a rate carried by LoRa modulation.
public static LoraDataRate ForLora(byte spreadingFactor, uint bandwidthHz, uint bitrateBps)
Parameters
spreadingFactorbyteThe spreading factor.
bandwidthHzuintThe channel bandwidth in hertz.
bitrateBpsuintThe payload bitrate in bits per second.
Returns
- LoraDataRate
The data rate.
ForLrFhss(byte, byte, uint, uint)
Describes a rate carried by frequency-hopping spread spectrum.
public static LoraDataRate ForLrFhss(byte codingRateNumerator, byte codingRateDenominator, uint bandwidthHz, uint bitrateBps)
Parameters
codingRateNumeratorbyteThe coding-rate numerator.
codingRateDenominatorbyteThe coding-rate denominator.
bandwidthHzuintThe occupied bandwidth in hertz.
bitrateBpsuintThe payload bitrate in bits per second.
Returns
- LoraDataRate
The data rate.
Reserved()
Describes a data-rate number the region reserves.
public static LoraDataRate Reserved()
Returns
- LoraDataRate
The reserved slot, which carries nothing.