-
Notifications
You must be signed in to change notification settings - Fork 0
/
backend.go
14 lines (12 loc) · 849 Bytes
/
backend.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package backend
import "github.com/brocaar/loraserver/api/gw"
// Gateway is the interface of a gateway backend.
// A gateway backend is responsible for the communication with the gateway.
type Gateway interface {
SendTXPacket(gw.DownlinkFrame) error // send the given packet to the gateway
SendGatewayConfigPacket(gw.GatewayConfiguration) error // SendGatewayConfigPacket sends the given GatewayConfigPacket to the gateway.
RXPacketChan() chan gw.UplinkFrame // channel containing the received packets
StatsPacketChan() chan gw.GatewayStats // channel containing the received gateway stats
DownlinkTXAckChan() chan gw.DownlinkTXAck // channel containing the downlink tx acknowledgements
Close() error // close the gateway backend.
}