Versions in this module Expand all Collapse all v3 v3.7.3 Apr 29, 2020 Changes in this version + var DutyCycleWindow = 1 * time.Hour + var QueueDelay = 30 * time.Millisecond + var ScheduleTimeLong = 500*time.Millisecond + QueueDelay + var ScheduleTimeShort = 100*time.Millisecond + QueueDelay + var SystemTimeSource = &systemTimeSource + type Clock interface + FromGatewayTime func(time.Time) (ConcentratorTime, bool) + FromServerTime func(time.Time) (ConcentratorTime, bool) + FromTimestampTime func(timestamp uint32) ConcentratorTime + IsSynced func() bool + ToServerTime func(ConcentratorTime) time.Time + type ConcentratorTime int64 + type DutyCycleCeilings map[ttnpb.TxSchedulePriority]float32 + var DefaultDutyCycleCeilings DutyCycleCeilings = map[ttnpb.TxSchedulePriority]float32{ ... } + type Emission struct + func NewEmission(starts ConcentratorTime, duration time.Duration) Emission + func (em Emission) AfterWithOffAir(other Emission, toa frequencyplans.TimeOffAir) time.Duration + func (em Emission) BeforeWithOffAir(other Emission, toa frequencyplans.TimeOffAir) time.Duration + func (em Emission) Duration() time.Duration + func (em Emission) Ends() ConcentratorTime + func (em Emission) EndsWithOffAir(toa frequencyplans.TimeOffAir) ConcentratorTime + func (em Emission) OffAir(toa frequencyplans.TimeOffAir) time.Duration + func (em Emission) OverlapsWithOffAir(other Emission, toa frequencyplans.TimeOffAir) bool + func (em Emission) Starts() ConcentratorTime + func (em Emission) Within(from, to ConcentratorTime) time.Duration + type Emissions []Emission + func (ems Emissions) Insert(em Emission) Emissions + type RTTs interface + Stats func() (min, max, median time.Duration, count int) + type RolloverClock struct + func (c *RolloverClock) FromGatewayTime(gateway time.Time) (ConcentratorTime, bool) + func (c *RolloverClock) FromServerTime(server time.Time) (ConcentratorTime, bool) + func (c *RolloverClock) FromTimestampTime(timestamp uint32) ConcentratorTime + func (c *RolloverClock) IsSynced() bool + func (c *RolloverClock) Sync(timestamp uint32, server time.Time) + func (c *RolloverClock) SyncWithGatewayAbsolute(timestamp uint32, server, gateway time.Time) + func (c *RolloverClock) SyncWithGatewayConcentrator(timestamp uint32, server time.Time, concentrator ConcentratorTime) + func (c *RolloverClock) ToServerTime(t ConcentratorTime) time.Time + type Scheduler struct + func NewScheduler(ctx context.Context, fps map[string]*frequencyplans.FrequencyPlan, ...) (*Scheduler, error) + func (s *Scheduler) IsGatewayTimeSynced() bool + func (s *Scheduler) Now() (ConcentratorTime, bool) + func (s *Scheduler) ScheduleAnytime(ctx context.Context, payloadSize int, settings ttnpb.TxSettings, rtts RTTs, ...) (Emission, error) + func (s *Scheduler) ScheduleAt(ctx context.Context, payloadSize int, settings ttnpb.TxSettings, rtts RTTs, ...) (Emission, error) + func (s *Scheduler) SubBandCount() int + func (s *Scheduler) Sync(v uint32, server time.Time) + func (s *Scheduler) SyncWithGatewayAbsolute(timestamp uint32, server, gateway time.Time) + func (s *Scheduler) SyncWithGatewayConcentrator(timestamp uint32, server time.Time, concentrator ConcentratorTime) + func (s *Scheduler) TimeFromTimestampTime(t uint32) (ConcentratorTime, bool) + type SubBand struct + func NewSubBand(params SubBandParameters, clock Clock, ceilings DutyCycleCeilings) *SubBand + func (sb *SubBand) DutyCycleUtilization() float32 + func (sb *SubBand) HasOverlap(subBand *SubBand) bool + func (sb *SubBand) IsIdentical(subBand *SubBand) bool + func (sb *SubBand) Schedule(em Emission, p ttnpb.TxSchedulePriority) error + func (sb *SubBand) ScheduleAnytime(d time.Duration, next func() ConcentratorTime, p ttnpb.TxSchedulePriority) (Emission, error) + type SubBandParameters struct + DutyCycle float32 + MaxFrequency uint64 + MinFrequency uint64 + func (sb SubBandParameters) Comprises(frequency uint64) bool + type TimeSource interface + Now func() time.Time