Documentation ¶
Overview ¶
Package shared contains the configuration that is common to various gateway types.
Index ¶
Constants ¶
const DefaultGatewayServerUDPPort = 1700
DefaultGatewayServerUDPPort is the default port used for connecting to Gateway Server.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IFConfig ¶
type IFConfig struct { Enable bool `json:"enable"` Radio uint8 `json:"radio"` IFValue int32 `json:"if"` Bandwidth uint32 `json:"bandwidth,omitempty"` SpreadFactor uint8 `json:"spread_factor,omitempty"` Datarate uint32 `json:"datarate,omitempty"` }
IFConfig contains the configuration for one of the channels.
func (IFConfig) MarshalJSON ¶
MarshalJSON implements json.Marshaler
type LBTChannelConfig ¶
type LBTChannelConfig struct { Frequency uint64 `json:"freq_hz"` ScanTimeMicroseconds uint32 `json:"scan_time_us"` }
LBTChannelConfig contains the listen-before-talk configuration for a channel.
type LBTConfig ¶
type LBTConfig struct { Enable bool `json:"enable"` RSSITarget float32 `json:"rssi_target"` ChannelConfigs []LBTChannelConfig `json:"chan_cfg"` RSSIOffset float32 `json:"sx127x_rssi_offset"` }
LBTConfig contains the configuration for listen-before-talk.
type RFConfig ¶
type RFConfig struct { Enable bool `json:"enable"` Type string `json:"type,omitempty"` Frequency uint64 `json:"freq"` RSSIOffset float32 `json:"rssi_offset"` TxEnable bool `json:"tx_enable"` TxFreqMin uint64 `json:"tx_freq_min,omitempty"` TxFreqMax uint64 `json:"tx_freq_max,omitempty"` TxNotchFreq uint64 `json:"tx_notch_freq,omitempty"` }
RFConfig contains the configuration for one of the radios.
type SX1301Config ¶
type SX1301Config struct { LoRaWANPublic bool ClockSource uint8 AntennaGain float32 LBTConfig *LBTConfig Radios []RFConfig Channels []IFConfig LoRaStandardChannel *IFConfig FSKChannel *IFConfig TxLUTConfigs []TxLUTConfig }
SX1301Config contains the configuration for the SX1301 concentrator.
func BuildSX1301Config ¶
func BuildSX1301Config(frequencyPlan *frequencyplans.FrequencyPlan) (*SX1301Config, error)
BuildSX1301Config builds the SX1301 configuration for the given frequency plan.
func (SX1301Config) MarshalJSON ¶
func (c SX1301Config) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SX1301Config) UnmarshalJSON ¶
func (c *SX1301Config) UnmarshalJSON(msg []byte) error
UnmarshalJSON implements json.Unmarshaler.