public StandardConfig(bool enable, Radio radio, int @if, Bandwidth bandwidth, SpreadingFactor spreadingFactor) { Enable = enable; Radio = radio; If = @if; Bandwidth = bandwidth; SpreadingFactor = spreadingFactor; }
public void From(SpreadingFactor sf, Bandwidth bw) { var subject = LoRaDataRate.From(sf, bw); Assert.Equal(sf, subject.SpreadingFactor); Assert.Equal(bw, subject.Bandwidth); Assert.Equal(ModulationKind.LoRa, subject.ModulationKind); }
public LoraWanGatewaySettings( uint frequency, SpreadingFactor spreadingFactor, string[] hosts) : base( RadioModemKind.Lora, frequency, BandWidth.BandWidth_125_00_kHz, spreadingFactor, CodingRate.FourOfFive, 8, true, false, LoraSyncWord.Public) { Hosts = hosts; }
public TransceiverSettings( RadioModemKind radioModem, uint frequency, BandWidth bandWidth, SpreadingFactor spreadingFactor, CodingRate codingRate, ushort symbolTimeout, bool crcEnabled, bool enableLowDataRateOptimize, LoraSyncWord loraSyncWord) { RadioModem = radioModem; Frequency = frequency; BandWidth = bandWidth; SpreadingFactor = spreadingFactor; CodingRate = codingRate; SymbolTimeout = symbolTimeout; CrcEnabled = crcEnabled; EnableLowDataRateOptimize = enableLowDataRateOptimize; LoraSyncWord = loraSyncWord; }
private static LoraRegisterModemConfig2.SpreadingFactorEnum ConvertSpreadingFactor(SpreadingFactor spreadingFactor) { switch (spreadingFactor) { case SpreadingFactor.SF7: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_0128_ChipsPerSymbol); case SpreadingFactor.SF8: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_0256_ChipsPerSymbol); case SpreadingFactor.SF9: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_0512_ChipsPerSymbol); case SpreadingFactor.SF10: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_1024_ChipsPerSymbol); case SpreadingFactor.SF11: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_2048_ChipsPerSymbol); case SpreadingFactor.SF12: return(LoraRegisterModemConfig2.SpreadingFactorEnum.Sf_4096_ChipsPerSymbol); default: throw new ArgumentOutOfRangeException(); } }