# Functions

AddDeviceToMulticastGroup adds the given device to the given multicast-group.
CreateDevice creates the given device.
CreateDeviceActivation creates the given device-activation.
CreateDeviceProfile creates the given device-profile.
CreateDeviceProfileCache caches the given device-profile in Redis.
CreateDeviceQueueItem adds the given item to the device queue.
CreateGateway creates the given gateway.
CreateGatewayCache caches the given gateway in Redis.
CreateGatewayProfile creates the given gateway-profile.
CreateMACCommandQueueItem creates a new mac-command queue item.
CreateMulticastGroup creates the given multi-cast group.
CreateMulticastQueueItem adds the given item to the queue.
CreateRoutingProfile creates the given routing-profile.
CreateServiceProfile creates the given service-profile.
CreateServiceProfileCache caches the given service-profile into the Redis.
DB returns the PostgreSQL database object.
DeleteDevice deletes the device matching the given DevEUI.
DeleteDeviceActivationsForDevice removes the device-activation for the given DevEUI.
DeleteDeviceGatewayRXInfoSet deletes the device gateway rx-info meta-data for the given Device EUI.
DeleteDeviceProfile deletes the device-profile matching the given id.
DeleteDeviceQueueItem deletes the device-queue item matching the given id.
DeleteDeviceSession deletes the device-session matching the given DevEUI.
DeleteGateway deletes the gateway matching the given Gateway ID.
DeleteGatewayProfile deletes the gateway-profile matching the given ID.
DeleteMACCommandQueueItem deletes the given mac-command from the queue.
DeleteMulticastGroup deletes the multicast-group matching the given ID.
DeleteMulticastQueueItem deletes the queue-item given an id.
DeletePendingMACCommand removes the pending mac-command for the given CID.
DeleteRoutingProfile deletes the routing-profile matching the given id.
DeleteServiceProfile deletes the service-profile matching the given id.
DeviceSessionExists returns a bool indicating if a device session exist.
FlushDeviceProfileCache deletes a cached device-profile.
FlushDeviceQueueForDevEUI deletes all device-queue items for the given DevEUI.
FlushGatewayCache deletes a cached gateway.
FlushMACCommandQueue flushes the mac-command queue for the given DevEUI.
FlushMulticastQueueForMulticastGroup flushes the multicast-queue given a multicast-group id.
FlushServiceProfileCache deletes a cached service-profile.
GetAllRoutingProfiles returns all the available routing-profiles.
GetAndCacheDeviceProfile returns the device-profile from cache in case available, else it will be retrieved from the database and then stored in cache.
GetAndCacheGateway returns a gateway from the cache in case it is available.
GetAndCacheServiceProfile returns the service-profile from cache in case available, else it will be retrieved from the database and then stored in cache.
GetDevEUIsForMulticastGroup returns all Device EUIs within the given multicast-group id.
GetDevice returns the device matching the given DevEUI.
GetDeviceGatewayRXInfoSet returns the DeviceGatewayRXInfoSet for the given Device EUI.
GetDeviceGatewayRXInfoSetForDevEUIs returns the DeviceGatewayRXInfoSet objects for the given Device EUIs.
GetDeviceProfile returns the device-profile matching the given id.
GetDeviceProfileCache returns a cached device-profile.
GetDeviceQueueItem returns the device-queue item matching the given id.
GetDeviceQueueItemsForDevEUI returns all device-queue items for the given DevEUI, ordered by id (keep in mind FCnt rollover).
GetDeviceSession returns the device-session for the given DevEUI.
GetDeviceSessionForPHYPayload returns the device-session matching the given PHYPayload.
GetDeviceSessionsForDevAddr returns a slice of device-sessions using the given DevAddr.
GetDevicesWithClassBOrClassCDeviceQueueItems returns a slice of devices that qualify for downlink Class-C transmission.
GetGateway returns the gateway for the given Gateway ID.
GetGatewayCache returns a cached gateway.
GetGatewayProfile returns the gateway-profile matching the given ID.
GetGatewaysForIDs returns a map of gateways given a slice of IDs.
GetGeolocBuffer returns the geolocation buffer.
GetLastDeviceActivationForDevEUI returns the most recent activation for the given DevEUI.
GetMACCommandQueueItems returns the mac-command queue items for the given DevEUI.
GetMaxEmitAtTimeSinceGPSEpochForDevEUI returns the maximum / last GPS epoch scheduling timestamp for the given DevEUI.
GetMaxEmitAtTimeSinceGPSEpochForMulticastGroup returns the maximum / last GPS epoch scheduling timestamp for the given multicast-group.
GetMaxScheduleAtForMulticastGroup returns the maximum schedule at timestamp for the given multicast-group.
GetMetrics returns the metrics for the requested aggregation interval.
GetMulticastGroup returns the multicast-group for the given ID.
GetMulticastGroupsForDevEUI returns the multicast-group ids to which the given Device EUI belongs.
GetMulticastQueueItemsForMulticastGroup returns all queue-items given a multicast-group id.
GetNextDeviceQueueItemForDevEUI returns the next device-queue item for the given DevEUI, ordered by f_cnt (note that the f_cnt should never roll over).
GetNextDeviceQueueItemForDevEUIMaxPayloadSizeAndFCnt returns the next device-queue for the given DevEUI item respecting: * maxPayloadSize: the maximum payload size * fCnt: the current expected frame-counter In case the payload exceeds the max payload size or when the payload frame-counter is behind the actual frame-counter, the payload will be removed from the queue and the next one will be retrieved.
GetPendingDeviceQueueItemForDevEUI returns the pending device-queue item for the given DevEUI.
GetPendingMACCommand returns the pending mac-command for the given CID.
GetRandomDevAddr returns a random DevAddr, prefixed with NwkID based on the given NetID.
GetRoutingProfile returns the routing-profile matching the given id.
GetSchedulableMulticastQueueItems returns a slice of multicast-queue items for scheduling.
GetServiceProfile returns the service-profile matching the given id.
GetServiceProfileCache returns a cached service-profile.
PopDownlinkFrame returns the first downlink-frame for the given token.
RedisPool returns the RedisPool object.
RemoveDeviceFromMulticastGroup removes the given device from the given multicast-group.
SaveDeviceGatewayRXInfoSet saves the given DeviceGatewayRXInfoSet.
SaveDeviceSession saves the device-session.
SaveDownlinkFrames saves the given downlink-frames.
SaveGeolocBuffer saves the given items in the geolocation buffer.
SaveMetrics stores the given metrics into Redis.
SaveMetricsForInterval aggregates and stores the given metrics.
SetAggregationIntervals sets the metrics aggregation to the given intervals.
SetMetricsTTL sets the storage TTL.
SetPendingMACCommand sets a mac-command to the pending buffer.
SetTimeLocation sets the time location.
Setup configures the storage backend.
Transaction wraps the given function in a transaction.
UpdateDevice updates the given device.
UpdateDeviceProfile updates the given device-profile.
UpdateDeviceQueueItem updates the given device-queue item.
UpdateGateway updates the given gateway.
UpdateGatewayProfile updates the given gateway-profile.
UpdateMulticastGroup updates the given multicast-grup.
UpdateRoutingProfile updates the given routing-profile.
UpdateServiceProfile updates the given service-profile.
ValidateAndGetFullFCntUp validates if the given fCntUp is valid and returns the full 32 bit frame-counter.
ValidateDevNonce validates the given dev-nonce for the given DevEUI / JoinEUI combination.

# Constants

Metrics aggregation intervals.
Metrics aggregation intervals.
Metrics aggregation intervals.
Metrics aggregation intervals.
Available device modes.
Available device modes.
Available device modes.
Templates used for generating Redis keys.
Available rate policies.
Available rate policies.
Modulations.
Modulations.
Possible multicast-group types.
Possible multicast-group types.
Available RX window options.
Available RX window options.
Templates used for generating Redis keys.
UplinkHistorySize contains the number of frames to store.

# Variables

# Structs

DBLogger is a DB wrapper which logs the executed sql queries and their duration.
Device defines a LoRaWAN device.
DeviceActivation defines the device-activation for a LoRaWAN device.
DeviceGatewayRXInfo holds the meta-data of a gateway receiving the last uplink message.
No description provided by the author
DeviceGatewayRXInfoSet contains the rx-info set of the receiving gateways for the last uplink.
No description provided by the author
DeviceProfile defines the backend.DeviceProfile with some extra meta-data.
DeviceQueueItem represents an item in the device queue (downlink).
DeviceSession defines a device-session.
DeviceSessionOld defines the "old" device-session struct.
No description provided by the author
No description provided by the author
No description provided by the author
ExtraChannel defines an extra channel for the gateway-profile.
Gateway represents a gateway.
GatewayBoard holds the gateway board configuration.
GatewayProfile defines a gateway-profile.
GPSPoint contains a GPS point.
KeyEnvelope defined a key-envelope.
MACCommandBlock defines a block of MAC commands that must be handled together.
MetricsRecord holds a single metrics record.
MulticastGroup defines a multicast-group.
MulticastQueueItem defines a multicast queue-item.
RoutingProfile defines the backend.RoutingProfile with some extra meta-data.
ServiceProfile defines the backend.ServiceProfile with some extra meta-data.
TxLogger logs the executed sql queries and their duration.
UplinkHistory contains the meta-data of an uplink transmission.

# Type aliases

AggregationInterval defines the aggregation type.
DeviceMode defines the mode in which the device operates.
MACCommands holds a slice of MACCommand items.
MulticastGroupType type defines the multicast-group type.
RatePolicy defines the RatePolicy type.
RXWindow defines the RX window option.