Table of Contents

Struct LoraDataRate

Namespace
Pamoja.Lora
Assembly
Pamoja.Lora.dll

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

Kind LoraModulation

How this rate is carried.

BitrateBps uint

The payload bitrate in bits per second.

BandwidthHz uint?

The channel bandwidth in hertz, for a LoRa or LR-FHSS rate.

SpreadingFactor byte?

The spreading factor, for a LoRa rate.

CodingRateNumerator byte?

The coding-rate numerator, for an LR-FHSS rate.

CodingRateDenominator byte?

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

uint

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

LoraModulation

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

bitrateBps uint

The 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

spreadingFactor byte

The spreading factor.

bandwidthHz uint

The channel bandwidth in hertz.

bitrateBps uint

The 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

codingRateNumerator byte

The coding-rate numerator.

codingRateDenominator byte

The coding-rate denominator.

bandwidthHz uint

The occupied bandwidth in hertz.

bitrateBps uint

The 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.