Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 3,
MagicCookieKey: "ADR_PLUGIN",
MagicCookieValue: "ADR_PLUGIN",
}
HandshakeConfig for ADR plugins.
Functions ¶
This section is empty.
Types ¶
type HandleRequest ¶
type HandleRequest struct { // Region. Region string // DevEUI of the device. DevEUI lorawan.EUI64 // MAC version of the device. MACVersion string // Regional parameter revision. RegParamsRevision string // ADR defines if the device has ADR enabled. ADR bool // DR holds the uplink data-rate of the device. DR int // TxPowerIndex holds the current tx-power index of the device. TxPowerIndex int // NbTrans holds the number of transmissions for the device. NbTrans int // MaxTxPowerIndex defines the max allowed tx-power index. MaxTxPowerIndex int // RequiredSNRForDR defines the min. required SNR for the current data-rate. RequiredSNRForDR float32 // InstallationMargin defines the configured installation margin. InstallationMargin float32 // MinDR defines the min. allowed data-rate. MinDR int // MaxDR defines the max. allowed data-rate. MaxDR int // UplinkHistory contains the meta-data of the last uplinks. // Note: this table is for the current data-date only! UplinkHistory []UplinkMetaData }
HandleRequest implements the ADR handle request.
type HandleResponse ¶
type HandleResponse struct { // DR holds the data-rate to which the device must change. DR int // TxPowerIndex holds the tx-power index to which the device must change. TxPowerIndex int // NbTrans holds the number of transmissions which the device must use for each uplink. NbTrans int }
HandleResponse implements the ADR handle response.
type Handler ¶
type Handler interface { ID() (string, error) Name() (string, error) Handle(HandleRequest) (HandleResponse, error) }
Handler defines the ADR handler interface.
type HandlerPlugin ¶
type HandlerPlugin struct { // Impl holds the interface implementation. Impl Handler }
HandlerPlugin implements plugin.Plugin.
func (*HandlerPlugin) Client ¶
func (p *HandlerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*HandlerPlugin) Server ¶
func (p *HandlerPlugin) Server(*plugin.MuxBroker) (interface{}, error)
type HandlerRPC ¶
type HandlerRPC struct {
// contains filtered or unexported fields
}
HandlerRPC implements the RPC client for the Handler interface.
func (*HandlerRPC) Handle ¶
func (r *HandlerRPC) Handle(req HandleRequest) (HandleResponse, error)
func (*HandlerRPC) ID ¶
func (r *HandlerRPC) ID() (string, error)
func (*HandlerRPC) Name ¶
func (r *HandlerRPC) Name() (string, error)
type HandlerRPCServer ¶
type HandlerRPCServer struct { // Impl holds the interface implementation. Impl Handler }
HandlerRPCServer implements the RPC server for the Handler interface.
func (*HandlerRPCServer) Handle ¶
func (s *HandlerRPCServer) Handle(req HandleRequest, resp *HandleResponse) error
func (*HandlerRPCServer) ID ¶
func (s *HandlerRPCServer) ID(req interface{}, resp *string) error
func (*HandlerRPCServer) Name ¶
func (s *HandlerRPCServer) Name(req interface{}, resp *string) error
Click to show internal directories.
Click to hide internal directories.