Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClassCDownlinkLockDuration = time.Second * 2
ClassCDownlinkLockDuration contains the duration to lock the downlink Class-C transmissions after a preceeding downlink tx.
View Source
var ClassCScheduleBatchSize = 100
ClassCScheduleBatchSize contains the batch size of the Class-C scheduler
View Source
var ClassCScheduleInterval = time.Second
ClassCScheduleInterval it the interval in which the Class-C scheduler must run.
View Source
var SpreadFactorToRequiredSNRTable = map[int]float64{
6: -5,
7: -7.5,
8: -10,
9: -12.5,
10: -15,
11: -17.5,
12: -20,
}
SpreadFactorToRequiredSNRTable contains the required SNR to demodulate a LoRa frame for the given spreadfactor. These values are taken from the SX1276 datasheet.
View Source
var Version string
Version defines the LoRa Server version.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { General struct { LogLevel int `mapstructure:"log_level"` } PostgreSQL struct { DSN string `mapstructure:"dsn"` Automigrate bool DB *common.DBLogger } `mapstructure:"postgresql"` Redis struct { URL string `mapstructure:"url"` Pool *redis.Pool } NetworkServer struct { NetID lorawan.NetID NetIDString string `mapstructure:"net_id"` DeduplicationDelay time.Duration `mapstructure:"deduplication_delay"` DeviceSessionTTL time.Duration `mapstructure:"device_session_ttl"` GetDownlinkDataDelay time.Duration `mapstructure:"get_downlink_data_delay"` Band struct { Band band.Band Name band.Name DwellTime400ms bool `mapstructure:"dwell_time_400ms"` RepeaterCompatible bool `mapstructure:"repeater_compatible"` } NetworkSettings struct { InstallationMargin float64 `mapstructure:"installation_margin"` RX1Delay int `mapstructure:"rx1_delay"` RX1DROffset int `mapstructure:"rx1_dr_offset"` RX2DR int `mapstructure:"rx2_dr"` RX2Frequency int `mapstructure:"rx2_frequency"` EnabledUplinkChannels []int `mapstructure:"enabled_uplink_channels"` DisableMACCommands bool `mapstructure:"disable_mac_commands"` EnabledUplinkChannelsLegacy string `mapstructure:"enabled_uplink_channels_legacy"` ExtraChannelsLegacy []int `mapstructure:"extra_channels_legacy"` ExtraChannels []struct { Frequency int MinDR int `mapstructure:"min_dr"` MaxDR int `mapstructure:"max_dr"` } `mapstructure:"extra_channels"` ClassB struct { PingSlotDR int `mapstructure:"ping_slot_dr"` PingSlotFrequency int `mapstructure:"ping_slot_frequency"` } `mapstructure:"class_b"` } `mapstructure:"network_settings"` API struct { Bind string CACert string `mapstructure:"ca_cert"` TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` } `mapstructure:"api"` Gateway struct { Stats struct { TimezoneLocation *time.Location CreateGatewayOnStats bool `mapstructure:"create_gateway_on_stats"` Timezone string AggregationIntervals []string `mapstructure:"aggregation_intervals"` } Backend struct { Backend backend.Gateway MQTT gateway.MQTTBackendConfig } } } `mapstructure:"network_server"` JoinServer struct { Pool jsclient.Pool Default struct { Server string CACert string `mapstructure:"ca_cert"` TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` } } `mapstructure:"join_server"` ApplicationServer struct { Pool asclient.Pool } NetworkController struct { Client nc.NetworkControllerClient Server string CACert string `mapstructure:"ca_cert"` TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` } `mapstructure:"network_controller"` }
Config defines the configuration structure.
var C Config
C holds the global configuration.
Click to show internal directories.
Click to hide internal directories.