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 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 []shared.SX1301Config `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.