Documentation ¶
Overview ¶
Package lbslns implements the JSON configuration for the LoRa Basics Station `router_config` message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataRates ¶
type DataRates [16][3]int
DataRates encodes the available datarates of the channel plan for the Station in the format below: [0] -> SF (Spreading Factor; Range: 7...12 for LoRa, 0 for FSK) [1] -> BW (Bandwidth; 125/250/500 for LoRa, ignored for FSK) [2] -> DNONLY (Downlink Only; 1 = true, 0 = false)
type LBSRFConfig ¶ added in v3.13.0
LBSRFConfig contains the configuration for one of the radios only fields used for LoRa Basics Station gateways. The other fields of RFConfig (in pkg/pfconfig/shared) are hardware specific and are left out here. - `type`, `rssi_offset`, `tx_enable` and `tx_notch_freq` are set in the gateway. - `tx_freq_min` and `tx_freq_max` are defined in the `freq_range` parameter of `router_config`.
type LBSSX1301Config ¶ added in v3.13.0
type LBSSX1301Config struct { LBTConfig *shared.LBTConfig Radios []LBSRFConfig Channels []shared.IFConfig LoRaStandardChannel *shared.IFConfig FSKChannel *shared.IFConfig }
LBSSX1301Config contains the configuration for the SX1301 concentrator for the LoRa Basics Station `router_config` message. This structure incorporates modifications for the `v1.5` and `v2` concentrator reference. https://doc.sm.tc/station/gw_v1.5.html https://doc.sm.tc/station/gw_v2.html The fields `lorawan_public` and `clock_source` are omitted as they should be present in the gateway's `station.conf`.
func (LBSSX1301Config) MarshalJSON ¶ added in v3.13.0
func (c LBSSX1301Config) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*LBSSX1301Config) UnmarshalJSON ¶ added in v3.13.0
func (c *LBSSX1301Config) UnmarshalJSON(msg []byte) error
UnmarshalJSON implements json.Unmarshaler.
type RouterConfig ¶
type RouterConfig struct { NetID []int `json:"NetID"` JoinEUI [][]int `json:"JoinEui"` Region string `json:"region"` HardwareSpec string `json:"hwspec"` FrequencyRange []int `json:"freq_range"` DataRates DataRates `json:"DRs"` SX1301Config []LBSSX1301Config `json:"sx1301_conf"` // These are debug options to be unset in production gateways. NoCCA bool `json:"nocca"` NoDutyCycle bool `json:"nodc"` NoDwellTime bool `json:"nodwell"` MuxTime float64 `json:"MuxTime"` }
RouterConfig contains the router configuration. This message is sent by the Gateway Server.
func GetRouterConfig ¶
func GetRouterConfig(bandID string, fps map[string]*frequencyplans.FrequencyPlan, isProd bool, dlTime time.Time) (RouterConfig, error)
GetRouterConfig returns the routerconfig message to be sent to the gateway. Currently as per the basic station docs, all frequency plans have to be from the same region (band) https://doc.sm.tc/station/tcproto.html#router-config-message.
func (RouterConfig) MarshalJSON ¶
func (conf RouterConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.