Versions in this module Expand all Collapse all v3 v3.7.3 Apr 29, 2020 Changes in this version + func MustUplinkToken(ids ttnpb.GatewayAntennaIdentifiers, timestamp uint32) []byte + func ParseUplinkToken(buf []byte) (ids ttnpb.GatewayAntennaIdentifiers, timestamp uint32, err error) + func UplinkToken(ids ttnpb.GatewayAntennaIdentifiers, timestamp uint32) ([]byte, error) + type Connection struct + func NewConnection(ctx context.Context, frontend Frontend, gateway *ttnpb.Gateway, ...) (*Connection, error) + func (c *Connection) BandID() string + func (c *Connection) ConnectTime() time.Time + func (c *Connection) Context() context.Context + func (c *Connection) Disconnect(err error) + func (c *Connection) Down() <-chan *ttnpb.DownlinkMessage + func (c *Connection) DownStats() (total uint64, t time.Time, ok bool) + func (c *Connection) FrequencyPlans() map[string]*frequencyplans.FrequencyPlan + func (c *Connection) Frontend() Frontend + func (c *Connection) Gateway() *ttnpb.Gateway + func (c *Connection) HandleStatus(status *ttnpb.GatewayStatus) error + func (c *Connection) HandleTxAck(ack *ttnpb.TxAcknowledgment) error + func (c *Connection) HandleUp(up *ttnpb.UplinkMessage) error + func (c *Connection) LocationChanged() <-chan struct{} + func (c *Connection) RTTStats() (min, max, median time.Duration, count int) + func (c *Connection) RecordRTT(d time.Duration) + func (c *Connection) ScheduleDown(path *ttnpb.DownlinkPath, msg *ttnpb.DownlinkMessage) (time.Duration, error) + func (c *Connection) SendDown(msg *ttnpb.DownlinkMessage) error + func (c *Connection) Stats() *ttnpb.GatewayConnectionStats + func (c *Connection) StatsChanged() <-chan struct{} + func (c *Connection) Status() <-chan *ttnpb.GatewayStatus + func (c *Connection) StatusStats() (last *ttnpb.GatewayStatus, t time.Time, ok bool) + func (c *Connection) SyncWithGatewayConcentrator(timestamp uint32, server time.Time, concentrator scheduling.ConcentratorTime) + func (c *Connection) TimeFromTimestampTime(timestamp uint32) (scheduling.ConcentratorTime, bool) + func (c *Connection) TxAck() <-chan *ttnpb.TxAcknowledgment + func (c *Connection) Up() <-chan *ttnpb.GatewayUplinkMessage + func (c *Connection) UpStats() (total uint64, t time.Time, ok bool) + type DownlinkTokens struct + func (t *DownlinkTokens) Next(correlationIDs []string, time time.Time) uint16 + func (t DownlinkTokens) Get(token uint16, time time.Time) (correlationIDs []string, delta time.Duration, ok bool) + type Frontend interface + Protocol func() string + SupportsDownlinkClaim func() bool + type Server interface + ClaimDownlink func(ctx context.Context, ids ttnpb.GatewayIdentifiers) error + Connect func(ctx context.Context, frontend Frontend, ids ttnpb.GatewayIdentifiers) (*Connection, error) + FillGatewayContext func(ctx context.Context, ids ttnpb.GatewayIdentifiers) (context.Context, ttnpb.GatewayIdentifiers, error) + GetBaseConfig func(ctx context.Context) config.ServiceBase + GetFrequencyPlans func(ctx context.Context, ids ttnpb.GatewayIdentifiers) (map[string]*frequencyplans.FrequencyPlan, error) + UnclaimDownlink func(ctx context.Context, ids ttnpb.GatewayIdentifiers) error