# Functions

CreateDevice creates the given device.
CreateDeviceActivation creates the given device-activation.
CreateDeviceProfile creates the given device-profile.
CreateDeviceProfileCache caches the given device-profile into Redis.
CreateDeviceQueueItem adds the given item to the device queue.
CreateGateway creates the given gateway.
CreateGatewayProfile creates the given gateway-profile.
CreateMACCommandQueueItem creates a new mac-command queue item.
CreateRoutingProfile creates the given routing-profile.
CreateServiceProfile creates the given service-profile.
CreateServiceProfileCache caches the given service-profile into the Redis.
DeleteDevice deletes the device matching the given DevEUI.
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 MAC.
DeleteGatewayProfile deletes the gateway-profile matching the given ID.
DeleteMACCommandQueueItem deletes the given mac-command from the queue.
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.
FlushMACCommandQueue flushes the mac-command queue for the given DevEUI.
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.
GetAndCacheServiceProfile returns the service-profile from cache in case available, else it will be retrieved from the database and then stored in cache.
GetDevice returns the device matching the given DevEUI.
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 MAC.
GetGatewayProfile returns the gateway-profile matching the given ID.
GetGatewaysForMACs returns a map of gateways given a slice of MACs.
GetGatewayStats returns the stats for the given gateway.
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.
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 free DevAddr.
GetRoutingProfile returns the routing-profile matching the given id.
GetServiceProfile returns the service-profile matching the given id.
GetServiceProfileCache returns a cached service-profile.
HandleGatewayStatsPacket handles a received stats packet by the gateway.
MustSetStatsAggregationIntervals sets the aggregation intervals to use.
SaveDeviceSession saves the device-session.
SetPendingMACCommand sets a mac-command to the pending buffer.
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.
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

Templates used for generating Redis keys.
Modulations.
Modulations.
Available RX window options.
Available RX window options.
Templates used for generating Redis keys.
UplinkHistorySize contains the number of frames to store.

# Variables

# Structs

Device defines a LoRaWAN device.
DeviceActivation defines the device-activation for a LoRaWAN device.
DeviceProfile defines the backend.DeviceProfile with some extra meta-data.
DeviceQueueItem represents an item in the device queue (downlink).
DeviceSession defines a device-session.
ExtraChannel defines an extra channel for the gateway-profile.
Gateway represents a gateway.
GatewayProfile defines a gateway-profile.
GPSPoint contains a GPS point.
MACCommandBlock defines a block of MAC commands that must be handled together.
RoutingProfile defines the backend.RoutingProfile with some extra meta-data.
ServiceProfile defines the backend.ServiceProfile with some extra meta-data.
Stats represents a single gateway stats record.
UplinkHistory contains the meta-data of an uplink transmission.

# Type aliases

MACCommands holds a slice of MACCommand items.
RXWindow defines the RX window option.