Versions in this module Expand all Collapse all v1 v1.0.0 Oct 30, 2019 Changes in this version + const DeviceProfileKeyTempl + const ModulationFSK + const ModulationLoRa + const RX1 + const RX2 + const ServiceProfileKeyTempl + const UplinkHistorySize + var ErrAlreadyExists = errors.New("object already exists") + var ErrDoesNotExist = errors.New("object does not exist") + var ErrDoesNotExistOrFCntOrMICInvalid = errors.New("device-session does not exist or invalid fcnt or mic") + var ErrInvalidAggregationInterval = errors.New("invalid aggregation interval") + var ErrInvalidFPort = errors.New("invalid fPort (must be > 0)") + var ErrInvalidName = errors.New("invalid gateway name") + func AddDeviceToMulticastGroup(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64, ...) error + func CreateDevice(ctx context.Context, db sqlx.Execer, d *Device) error + func CreateDeviceActivation(ctx context.Context, db sqlx.Queryer, da *DeviceActivation) error + func CreateDeviceProfile(ctx context.Context, db sqlx.Execer, dp *DeviceProfile) error + func CreateDeviceProfileCache(ctx context.Context, p *redis.Pool, dp DeviceProfile) error + func CreateDeviceQueueItem(ctx context.Context, db sqlx.Queryer, qi *DeviceQueueItem) error + func CreateGateway(ctx context.Context, db sqlx.Execer, gw *Gateway) error + func CreateGatewayCache(ctx context.Context, p *redis.Pool, gw Gateway) error + func CreateGatewayProfile(ctx context.Context, db sqlx.Execer, c *GatewayProfile) error + func CreateMACCommandQueueItem(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ...) error + func CreateMulticastGroup(ctx context.Context, db sqlx.Execer, mg *MulticastGroup) error + func CreateMulticastQueueItem(ctx context.Context, db sqlx.Queryer, qi *MulticastQueueItem) error + func CreateRoutingProfile(ctx context.Context, db sqlx.Execer, rp *RoutingProfile) error + func CreateServiceProfile(ctx context.Context, db sqlx.Execer, sp *ServiceProfile) error + func CreateServiceProfileCache(ctx context.Context, p *redis.Pool, sp ServiceProfile) error + func DeleteDevice(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64) error + func DeleteDeviceActivationsForDevice(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64) error + func DeleteDeviceGatewayRXInfoSet(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) error + func DeleteDeviceProfile(ctx context.Context, db sqlx.Execer, id uuid.UUID) error + func DeleteDeviceQueueItem(ctx context.Context, db sqlx.Execer, id int64) error + func DeleteDeviceSession(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) error + func DeleteGateway(ctx context.Context, db sqlx.Execer, id lorawan.EUI64) error + func DeleteGatewayProfile(ctx context.Context, db sqlx.Execer, id uuid.UUID) error + func DeleteMACCommandQueueItem(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ...) error + func DeleteMulticastGroup(ctx context.Context, db sqlx.Execer, id uuid.UUID) error + func DeleteMulticastQueueItem(ctx context.Context, db sqlx.Execer, id int64) error + func DeletePendingMACCommand(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, cid lorawan.CID) error + func DeleteRoutingProfile(ctx context.Context, db sqlx.Execer, id uuid.UUID) error + func DeleteServiceProfile(ctx context.Context, db sqlx.Execer, id uuid.UUID) error + func DeviceSessionExists(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) (bool, error) + func FlushDeviceProfileCache(ctx context.Context, p *redis.Pool, id uuid.UUID) error + func FlushDeviceQueueForDevEUI(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64) error + func FlushGatewayCache(ctx context.Context, p *redis.Pool, gatewayID lorawan.EUI64) error + func FlushMACCommandQueue(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) error + func FlushMulticastQueueForMulticastGroup(ctx context.Context, db sqlx.Execer, multicastGroupID uuid.UUID) error + func FlushServiceProfileCache(ctx context.Context, p *redis.Pool, id uuid.UUID) error + func GetDevEUIsForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroupID uuid.UUID) ([]lorawan.EUI64, error) + func GetGatewaysForIDs(ctx context.Context, db sqlx.Queryer, ids []lorawan.EUI64) (map[lorawan.EUI64]Gateway, error) + func GetGeolocBuffer(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ttl time.Duration) ([]*geo.FrameRXInfo, error) + func GetMaxEmitAtTimeSinceGPSEpochForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (time.Duration, error) + func GetMaxEmitAtTimeSinceGPSEpochForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroupID uuid.UUID) (time.Duration, error) + func GetMaxScheduleAtForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroupID uuid.UUID) (time.Time, error) + func GetMulticastGroupsForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) ([]uuid.UUID, error) + func GetRandomDevAddr(netID lorawan.NetID) (lorawan.DevAddr, error) + func PopDownlinkFrame(ctx context.Context, p *redis.Pool, token uint32) (lorawan.EUI64, gw.DownlinkFrame, error) + func RedisPool() *redis.Pool + func RemoveDeviceFromMulticastGroup(ctx context.Context, db sqlx.Execer, devEUI lorawan.EUI64, ...) error + func SaveDeviceGatewayRXInfoSet(ctx context.Context, p *redis.Pool, rxInfoSet DeviceGatewayRXInfoSet) error + func SaveDeviceSession(ctx context.Context, p *redis.Pool, s DeviceSession) error + func SaveDownlinkFrames(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ...) error + func SaveGeolocBuffer(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ...) error + func SaveMetrics(ctx context.Context, p *redis.Pool, name string, metrics MetricsRecord) error + func SaveMetricsForInterval(ctx context.Context, p *redis.Pool, agg AggregationInterval, name string, ...) error + func SetAggregationIntervals(intervals []AggregationInterval) error + func SetMetricsTTL(minute, hour, day, month time.Duration) + func SetPendingMACCommand(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, ...) error + func SetTimeLocation(name string) error + func Setup(c config.Config) error + func Transaction(f func(tx sqlx.Ext) error) error + func UpdateDevice(ctx context.Context, db sqlx.Execer, d *Device) error + func UpdateDeviceProfile(ctx context.Context, db sqlx.Execer, dp *DeviceProfile) error + func UpdateDeviceQueueItem(ctx context.Context, db sqlx.Execer, qi *DeviceQueueItem) error + func UpdateGateway(ctx context.Context, db sqlx.Execer, gw *Gateway) error + func UpdateGatewayProfile(ctx context.Context, db sqlx.Execer, c *GatewayProfile) error + func UpdateMulticastGroup(ctx context.Context, db sqlx.Execer, mg *MulticastGroup) error + func UpdateRoutingProfile(ctx context.Context, db sqlx.Execer, rp *RoutingProfile) error + func UpdateServiceProfile(ctx context.Context, db sqlx.Execer, sp *ServiceProfile) error + func ValidateAndGetFullFCntUp(s DeviceSession, fCntUp uint32) (uint32, bool) + func ValidateDevNonce(ctx context.Context, db sqlx.Queryer, joinEUI, devEUI lorawan.EUI64, ...) error + type AggregationInterval string + const AggregationDay + const AggregationHour + const AggregationMinute + const AggregationMonth + type DBLogger struct + func DB() *DBLogger + func (db *DBLogger) Beginx() (*TxLogger, error) + func (db *DBLogger) Exec(query string, args ...interface{}) (sql.Result, error) + func (db *DBLogger) Query(query string, args ...interface{}) (*sql.Rows, error) + func (db *DBLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (db *DBLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + type Device struct + CreatedAt time.Time + DevEUI lorawan.EUI64 + DeviceProfileID uuid.UUID + Mode DeviceMode + ReferenceAltitude float64 + RoutingProfileID uuid.UUID + ServiceProfileID uuid.UUID + SkipFCntCheck bool + UpdatedAt time.Time + func GetDevice(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (Device, error) + func GetDevicesWithClassBOrClassCDeviceQueueItems(ctx context.Context, db sqlx.Ext, count int) ([]Device, error) + type DeviceActivation struct + CreatedAt time.Time + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + DevNonce lorawan.DevNonce + FNwkSIntKey lorawan.AES128Key + ID int64 + JoinEUI lorawan.EUI64 + JoinReqType lorawan.JoinType + NwkSEncKey lorawan.AES128Key + SNwkSIntKey lorawan.AES128Key + func GetLastDeviceActivationForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (DeviceActivation, error) + type DeviceGatewayRXInfo struct + Antenna uint32 + Board uint32 + Context []byte + GatewayID lorawan.EUI64 + LoRaSNR float64 + RSSI int + type DeviceGatewayRXInfoPB struct + Antenna uint32 + Board uint32 + Context []byte + GatewayId []byte + LoraSnr float64 + Rssi int32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeviceGatewayRXInfoPB) Descriptor() ([]byte, []int) + func (*DeviceGatewayRXInfoPB) ProtoMessage() + func (m *DeviceGatewayRXInfoPB) GetAntenna() uint32 + func (m *DeviceGatewayRXInfoPB) GetBoard() uint32 + func (m *DeviceGatewayRXInfoPB) GetContext() []byte + func (m *DeviceGatewayRXInfoPB) GetGatewayId() []byte + func (m *DeviceGatewayRXInfoPB) GetLoraSnr() float64 + func (m *DeviceGatewayRXInfoPB) GetRssi() int32 + func (m *DeviceGatewayRXInfoPB) Reset() + func (m *DeviceGatewayRXInfoPB) String() string + func (m *DeviceGatewayRXInfoPB) XXX_DiscardUnknown() + func (m *DeviceGatewayRXInfoPB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeviceGatewayRXInfoPB) XXX_Merge(src proto.Message) + func (m *DeviceGatewayRXInfoPB) XXX_Size() int + func (m *DeviceGatewayRXInfoPB) XXX_Unmarshal(b []byte) error + type DeviceGatewayRXInfoSet struct + DR int + DevEUI lorawan.EUI64 + Items []DeviceGatewayRXInfo + func GetDeviceGatewayRXInfoSet(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) (DeviceGatewayRXInfoSet, error) + func GetDeviceGatewayRXInfoSetForDevEUIs(ctx context.Context, p *redis.Pool, devEUIs []lorawan.EUI64) ([]DeviceGatewayRXInfoSet, error) + type DeviceGatewayRXInfoSetPB struct + DevEui []byte + Dr uint32 + Items []*DeviceGatewayRXInfoPB + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeviceGatewayRXInfoSetPB) Descriptor() ([]byte, []int) + func (*DeviceGatewayRXInfoSetPB) ProtoMessage() + func (m *DeviceGatewayRXInfoSetPB) GetDevEui() []byte + func (m *DeviceGatewayRXInfoSetPB) GetDr() uint32 + func (m *DeviceGatewayRXInfoSetPB) GetItems() []*DeviceGatewayRXInfoPB + func (m *DeviceGatewayRXInfoSetPB) Reset() + func (m *DeviceGatewayRXInfoSetPB) String() string + func (m *DeviceGatewayRXInfoSetPB) XXX_DiscardUnknown() + func (m *DeviceGatewayRXInfoSetPB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeviceGatewayRXInfoSetPB) XXX_Merge(src proto.Message) + func (m *DeviceGatewayRXInfoSetPB) XXX_Size() int + func (m *DeviceGatewayRXInfoSetPB) XXX_Unmarshal(b []byte) error + type DeviceMode string + const DeviceModeA + const DeviceModeB + const DeviceModeC + type DeviceProfile struct + ClassBTimeout int + ClassCTimeout int + CreatedAt time.Time + FactoryPresetFreqs []int + GeolocBufferTTL int + GeolocMinBufferSize int + ID uuid.UUID + MACVersion string + MaxDutyCycle int + MaxEIRP int + PingSlotDR int + PingSlotFreq int + PingSlotPeriod int + RFRegion string + RXDROffset1 int + RXDataRate2 int + RXDelay1 int + RXFreq2 int + RegParamsRevision string + Supports32bitFCnt bool + SupportsClassB bool + SupportsClassC bool + SupportsJoin bool + UpdatedAt time.Time + func GetAndCacheDeviceProfile(ctx context.Context, db sqlx.Queryer, p *redis.Pool, id uuid.UUID) (DeviceProfile, error) + func GetDeviceProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (DeviceProfile, error) + func GetDeviceProfileCache(ctx context.Context, p *redis.Pool, id uuid.UUID) (DeviceProfile, error) + type DeviceQueueItem struct + Confirmed bool + CreatedAt time.Time + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + EmitAtTimeSinceGPSEpoch *time.Duration + FCnt uint32 + FPort uint8 + FRMPayload []byte + ID int64 + IsPending bool + TimeoutAfter *time.Time + UpdatedAt time.Time + func GetDeviceQueueItem(ctx context.Context, db sqlx.Queryer, id int64) (DeviceQueueItem, error) + func GetDeviceQueueItemsForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) ([]DeviceQueueItem, error) + func GetNextDeviceQueueItemForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (DeviceQueueItem, error) + func GetNextDeviceQueueItemForDevEUIMaxPayloadSizeAndFCnt(ctx context.Context, db sqlx.Ext, devEUI lorawan.EUI64, maxPayloadSize int, ...) (DeviceQueueItem, error) + func GetPendingDeviceQueueItemForDevEUI(ctx context.Context, db sqlx.Queryer, devEUI lorawan.EUI64) (DeviceQueueItem, error) + func (d DeviceQueueItem) Validate() error + type DeviceSession struct + ADR bool + AFCntDown uint32 + AppSKeyEvelope *KeyEnvelope + BeaconLocked bool + ChannelFrequencies []int + ConfFCnt uint32 + DR int + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + DeviceProfileID uuid.UUID + DownlinkDwellTime400ms bool + EnabledChannels []int + EnabledUplinkChannels []int + ExtraUplinkChannels map[int]loraband.Channel + FCntUp uint32 + FNwkSIntKey lorawan.AES128Key + JoinEUI lorawan.EUI64 + LastDevStatusRequested time.Time + LastDownlinkTX time.Time + MACVersion string + MaxSupportedTXPowerIndex int + MinSupportedTXPowerIndex int + NFCntDown uint32 + NbTrans uint8 + NwkSEncKey lorawan.AES128Key + PendingRejoinDeviceSession *DeviceSession + PingSlotDR int + PingSlotFrequency int + PingSlotNb int + RX1DROffset uint8 + RX2DR uint8 + RX2Frequency int + RXDelay uint8 + RXWindow RXWindow + ReferenceAltitude float64 + RejoinCount0 uint16 + RejoinRequestEnabled bool + RejoinRequestMaxCountN int + RejoinRequestMaxTimeN int + RoutingProfileID uuid.UUID + SNwkSIntKey lorawan.AES128Key + ServiceProfileID uuid.UUID + SkipFCntValidation bool + TXPowerIndex int + UplinkDwellTime400ms bool + UplinkHistory []UplinkHistory + UplinkMaxEIRPIndex uint8 + func GetDeviceSession(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) (DeviceSession, error) + func GetDeviceSessionForPHYPayload(ctx context.Context, p *redis.Pool, phy lorawan.PHYPayload, txDR, txCh int) (DeviceSession, error) + func GetDeviceSessionsForDevAddr(ctx context.Context, p *redis.Pool, devAddr lorawan.DevAddr) ([]DeviceSession, error) + func (s *DeviceSession) AppendUplinkHistory(up UplinkHistory) + func (s *DeviceSession) ResetToBootParameters(dp DeviceProfile) + func (s DeviceSession) GetMACVersion() lorawan.MACVersion + func (s DeviceSession) GetPacketLossPercentage() float64 + type DeviceSessionOld struct + ADR bool + BeaconLocked bool + ChannelFrequencies []int + DR int + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + DeviceProfileID string + EnabledChannels []int + EnabledUplinkChannels []int + ExtraUplinkChannels map[int]loraband.Channel + FCntDown uint32 + FCntUp uint32 + JoinEUI lorawan.EUI64 + LastDevStatusBattery uint8 + LastDevStatusMargin int8 + LastDevStatusRequested time.Time + LastDownlinkTX time.Time + MaxSupportedTXPowerIndex int + NbTrans uint8 + NwkSKey lorawan.AES128Key + PingSlotDR int + PingSlotFrequency int + PingSlotNb int + RX1DROffset uint8 + RX2DR uint8 + RX2Frequency int + RXDelay uint8 + RXWindow RXWindow + RoutingProfileID string + ServiceProfileID string + SkipFCntValidation bool + TXPowerIndex int + UplinkHistory []UplinkHistory + type DeviceSessionPB struct + AFCntDown uint32 + Adr bool + AppSKeyEnvelope *common.KeyEnvelope + BeaconLocked bool + ChannelFrequencies []uint32 + ConfFCnt uint32 + DevAddr []byte + DevEui []byte + DeviceProfileId string + DownlinkDwellTime_400Ms bool + Dr uint32 + EnabledUplinkChannels []uint32 + ExtraUplinkChannels map[uint32]*DeviceSessionPBChannel + FCntUp uint32 + FNwkSIntKey []byte + JoinEui []byte + LastDeviceStatusRequestTimeUnixNs int64 + LastDownlinkTxTimestampUnixNs int64 + MacVersion string + MaxSupportedTxPowerIndex uint32 + MinSupportedTxPowerIndex uint32 + NFCntDown uint32 + NbTrans uint32 + NwkSEncKey []byte + PendingRejoinDeviceSession []byte + PingSlotDr uint32 + PingSlotFrequency uint32 + PingSlotNb uint32 + ReferenceAltitude float64 + RejoinCount_0 uint32 + RejoinRequestEnabled bool + RejoinRequestMaxCountN uint32 + RejoinRequestMaxTimeN uint32 + RoutingProfileId string + Rx1DrOffset uint32 + Rx2Dr uint32 + Rx2Frequency uint32 + RxDelay uint32 + SNwkSIntKey []byte + ServiceProfileId string + SkipFCntCheck bool + TxPowerIndex uint32 + UplinkAdrHistory []*DeviceSessionPBUplinkADRHistory + UplinkDwellTime_400Ms bool + UplinkMaxEirpIndex uint32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeviceSessionPB) Descriptor() ([]byte, []int) + func (*DeviceSessionPB) ProtoMessage() + func (m *DeviceSessionPB) GetAFCntDown() uint32 + func (m *DeviceSessionPB) GetAdr() bool + func (m *DeviceSessionPB) GetAppSKeyEnvelope() *common.KeyEnvelope + func (m *DeviceSessionPB) GetBeaconLocked() bool + func (m *DeviceSessionPB) GetChannelFrequencies() []uint32 + func (m *DeviceSessionPB) GetConfFCnt() uint32 + func (m *DeviceSessionPB) GetDevAddr() []byte + func (m *DeviceSessionPB) GetDevEui() []byte + func (m *DeviceSessionPB) GetDeviceProfileId() string + func (m *DeviceSessionPB) GetDownlinkDwellTime_400Ms() bool + func (m *DeviceSessionPB) GetDr() uint32 + func (m *DeviceSessionPB) GetEnabledUplinkChannels() []uint32 + func (m *DeviceSessionPB) GetExtraUplinkChannels() map[uint32]*DeviceSessionPBChannel + func (m *DeviceSessionPB) GetFCntUp() uint32 + func (m *DeviceSessionPB) GetFNwkSIntKey() []byte + func (m *DeviceSessionPB) GetJoinEui() []byte + func (m *DeviceSessionPB) GetLastDeviceStatusRequestTimeUnixNs() int64 + func (m *DeviceSessionPB) GetLastDownlinkTxTimestampUnixNs() int64 + func (m *DeviceSessionPB) GetMacVersion() string + func (m *DeviceSessionPB) GetMaxSupportedTxPowerIndex() uint32 + func (m *DeviceSessionPB) GetMinSupportedTxPowerIndex() uint32 + func (m *DeviceSessionPB) GetNFCntDown() uint32 + func (m *DeviceSessionPB) GetNbTrans() uint32 + func (m *DeviceSessionPB) GetNwkSEncKey() []byte + func (m *DeviceSessionPB) GetPendingRejoinDeviceSession() []byte + func (m *DeviceSessionPB) GetPingSlotDr() uint32 + func (m *DeviceSessionPB) GetPingSlotFrequency() uint32 + func (m *DeviceSessionPB) GetPingSlotNb() uint32 + func (m *DeviceSessionPB) GetReferenceAltitude() float64 + func (m *DeviceSessionPB) GetRejoinCount_0() uint32 + func (m *DeviceSessionPB) GetRejoinRequestEnabled() bool + func (m *DeviceSessionPB) GetRejoinRequestMaxCountN() uint32 + func (m *DeviceSessionPB) GetRejoinRequestMaxTimeN() uint32 + func (m *DeviceSessionPB) GetRoutingProfileId() string + func (m *DeviceSessionPB) GetRx1DrOffset() uint32 + func (m *DeviceSessionPB) GetRx2Dr() uint32 + func (m *DeviceSessionPB) GetRx2Frequency() uint32 + func (m *DeviceSessionPB) GetRxDelay() uint32 + func (m *DeviceSessionPB) GetSNwkSIntKey() []byte + func (m *DeviceSessionPB) GetServiceProfileId() string + func (m *DeviceSessionPB) GetSkipFCntCheck() bool + func (m *DeviceSessionPB) GetTxPowerIndex() uint32 + func (m *DeviceSessionPB) GetUplinkAdrHistory() []*DeviceSessionPBUplinkADRHistory + func (m *DeviceSessionPB) GetUplinkDwellTime_400Ms() bool + func (m *DeviceSessionPB) GetUplinkMaxEirpIndex() uint32 + func (m *DeviceSessionPB) Reset() + func (m *DeviceSessionPB) String() string + func (m *DeviceSessionPB) XXX_DiscardUnknown() + func (m *DeviceSessionPB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeviceSessionPB) XXX_Merge(src proto.Message) + func (m *DeviceSessionPB) XXX_Size() int + func (m *DeviceSessionPB) XXX_Unmarshal(b []byte) error + type DeviceSessionPBChannel struct + Frequency uint32 + MaxDr uint32 + MinDr uint32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeviceSessionPBChannel) Descriptor() ([]byte, []int) + func (*DeviceSessionPBChannel) ProtoMessage() + func (m *DeviceSessionPBChannel) GetFrequency() uint32 + func (m *DeviceSessionPBChannel) GetMaxDr() uint32 + func (m *DeviceSessionPBChannel) GetMinDr() uint32 + func (m *DeviceSessionPBChannel) Reset() + func (m *DeviceSessionPBChannel) String() string + func (m *DeviceSessionPBChannel) XXX_DiscardUnknown() + func (m *DeviceSessionPBChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeviceSessionPBChannel) XXX_Merge(src proto.Message) + func (m *DeviceSessionPBChannel) XXX_Size() int + func (m *DeviceSessionPBChannel) XXX_Unmarshal(b []byte) error + type DeviceSessionPBUplinkADRHistory struct + FCnt uint32 + GatewayCount uint32 + MaxSnr float32 + TxPowerIndex uint32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*DeviceSessionPBUplinkADRHistory) Descriptor() ([]byte, []int) + func (*DeviceSessionPBUplinkADRHistory) ProtoMessage() + func (m *DeviceSessionPBUplinkADRHistory) GetFCnt() uint32 + func (m *DeviceSessionPBUplinkADRHistory) GetGatewayCount() uint32 + func (m *DeviceSessionPBUplinkADRHistory) GetMaxSnr() float32 + func (m *DeviceSessionPBUplinkADRHistory) GetTxPowerIndex() uint32 + func (m *DeviceSessionPBUplinkADRHistory) Reset() + func (m *DeviceSessionPBUplinkADRHistory) String() string + func (m *DeviceSessionPBUplinkADRHistory) XXX_DiscardUnknown() + func (m *DeviceSessionPBUplinkADRHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *DeviceSessionPBUplinkADRHistory) XXX_Merge(src proto.Message) + func (m *DeviceSessionPBUplinkADRHistory) XXX_Size() int + func (m *DeviceSessionPBUplinkADRHistory) XXX_Unmarshal(b []byte) error + type ExtraChannel struct + Bandwidth int + Bitrate int + Frequency int + Modulation string + SpreadingFactors []int64 + type GPSPoint struct + Latitude float64 + Longitude float64 + func (l *GPSPoint) Scan(src interface{}) error + func (l GPSPoint) Value() (driver.Value, error) + type Gateway struct + Altitude float64 + Boards []GatewayBoard + CreatedAt time.Time + FirstSeenAt *time.Time + GatewayID lorawan.EUI64 + GatewayProfileID *uuid.UUID + LastSeenAt *time.Time + Location GPSPoint + RoutingProfileID uuid.UUID + UpdatedAt time.Time + func GetAndCacheGateway(ctx context.Context, db sqlx.Queryer, p *redis.Pool, gatewayID lorawan.EUI64) (Gateway, error) + func GetGateway(ctx context.Context, db sqlx.Queryer, id lorawan.EUI64) (Gateway, error) + func GetGatewayCache(ctx context.Context, p *redis.Pool, gatewayID lorawan.EUI64) (Gateway, error) + type GatewayBoard struct + FPGAID *lorawan.EUI64 + FineTimestampKey *lorawan.AES128Key + type GatewayProfile struct + Channels []int64 + CreatedAt time.Time + ExtraChannels []ExtraChannel + ID uuid.UUID + UpdatedAt time.Time + func GetGatewayProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (GatewayProfile, error) + func (p GatewayProfile) GetVersion() string + type KeyEnvelope struct + AESKey []byte + KEKLabel string + type MACCommandBlock struct + CID lorawan.CID + External bool + MACCommands MACCommands + func GetMACCommandQueueItems(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64) ([]MACCommandBlock, error) + func GetPendingMACCommand(ctx context.Context, p *redis.Pool, devEUI lorawan.EUI64, cid lorawan.CID) (*MACCommandBlock, error) + func (m *MACCommandBlock) Size() (int, error) + type MACCommands []lorawan.MACCommand + func (m *MACCommands) UnmarshalBinary(data []byte) error + func (m MACCommands) MarshalBinary() ([]byte, error) + type MetricsRecord struct + Metrics map[string]float64 + Time time.Time + func GetMetrics(ctx context.Context, p *redis.Pool, agg AggregationInterval, name string, ...) ([]MetricsRecord, error) + type MulticastGroup struct + CreatedAt time.Time + DR int + FCnt uint32 + Frequency int + GroupType MulticastGroupType + ID uuid.UUID + MCAddr lorawan.DevAddr + MCNwkSKey lorawan.AES128Key + PingSlotPeriod int + RoutingProfileID uuid.UUID + ServiceProfileID uuid.UUID + UpdatedAt time.Time + func GetMulticastGroup(ctx context.Context, db sqlx.Queryer, id uuid.UUID, forUpdate bool) (MulticastGroup, error) + type MulticastGroupType string + const MulticastGroupB + const MulticastGroupC + type MulticastQueueItem struct + CreatedAt time.Time + EmitAtTimeSinceGPSEpoch *time.Duration + FCnt uint32 + FPort uint8 + FRMPayload []byte + GatewayID lorawan.EUI64 + ID int64 + MulticastGroupID uuid.UUID + ScheduleAt time.Time + func GetMulticastQueueItemsForMulticastGroup(ctx context.Context, db sqlx.Queryer, multicastGroupID uuid.UUID) ([]MulticastQueueItem, error) + func GetSchedulableMulticastQueueItems(ctx context.Context, db sqlx.Ext, count int) ([]MulticastQueueItem, error) + func (m MulticastQueueItem) Validate() error + type RXWindow int8 + type RatePolicy string + const Drop + const Mark + type RoutingProfile struct + ASID string + CACert string + CreatedAt time.Time + ID uuid.UUID + TLSCert string + TLSKey string + UpdatedAt time.Time + func GetAllRoutingProfiles(ctx context.Context, db sqlx.Queryer) ([]RoutingProfile, error) + func GetRoutingProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (RoutingProfile, error) + func (rp RoutingProfile) GetApplicationServerClient() (as.ApplicationServerServiceClient, error) + type ServiceProfile struct + AddGWMetadata bool + ChannelMask []byte + CreatedAt time.Time + DLBucketSize int + DLRate int + DLRatePolicy RatePolicy + DRMax int + DRMin int + DevStatusReqFreq int + HRAllowed bool + ID uuid.UUID + MinGWDiversity int + NwkGeoLoc bool + PRAllowed bool + RAAllowed bool + ReportDevStatusBattery bool + ReportDevStatusMargin bool + TargetPER int + ULBucketSize int + ULRate int + ULRatePolicy RatePolicy + UpdatedAt time.Time + func GetAndCacheServiceProfile(ctx context.Context, db sqlx.Queryer, p *redis.Pool, id uuid.UUID) (ServiceProfile, error) + func GetServiceProfile(ctx context.Context, db sqlx.Queryer, id uuid.UUID) (ServiceProfile, error) + func GetServiceProfileCache(ctx context.Context, p *redis.Pool, id uuid.UUID) (ServiceProfile, error) + type TxLogger struct + func (q *TxLogger) Exec(query string, args ...interface{}) (sql.Result, error) + func (q *TxLogger) Query(query string, args ...interface{}) (*sql.Rows, error) + func (q *TxLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row + func (q *TxLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error) + type UplinkHistory struct + FCnt uint32 + GatewayCount int + MaxSNR float64 + TXPowerIndex int