loracloud

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGeolocBuffer

func GetGeolocBuffer(ctx context.Context, devEUI lorawan.EUI64, ttl time.Duration) ([][]*gw.UplinkRXInfo, error)

GetGeolocBuffer returns the geolocation buffer. Items that exceed the given TTL are not returned.

func SaveGeolocBuffer

func SaveGeolocBuffer(ctx context.Context, devEUI lorawan.EUI64, items [][]*gw.UplinkRXInfo, ttl time.Duration) error

SaveGeolocBuffer saves the given items in the geolocation buffer. It overwrites the previous buffer to make sure that expired items do not stay in the buffer as the TTL is set on the key, not on the items.

Types

type Config

type Config struct {
	// Geolocation.
	Geolocation                 bool   `json:"geolocation"`
	GeolocationToken            string `json:"geolocationToken"`
	GeolocationBufferTTL        int    `json:"geolocationBufferTTL"`
	GeolocationMinBufferSize    int    `json:"geolocationMinBufferSize"`
	GeolocationTDOA             bool   `json:"geolocationTDOA"`
	GeolocationRSSI             bool   `json:"geolocationRSSI"`
	GeolocationGNSS             bool   `json:"geolocationGNSS"`
	GeolocationGNSSPayloadField string `json:"geolocationGNSSPayloadField"`
	GeolocationGNSSUseRxTime    bool   `json:"geolicationGNSSUseRxTime"`
	GeolocationWifi             bool   `json:"geolocationWifi"`
	GeolocationWifiPayloadField string `json:"geolocationWifiPayloadField"`

	// Device Application Services.
	DAS                          bool   `json:"das"`
	DASToken                     string `json:"dasToken"`
	DASModemPort                 uint8  `json:"dasModemPort"`
	DASGNSSPort                  uint8  `json:"dasGNSSPort"`
	DASGNSSUseRxTime             bool   `json:"dasGNSSUseRxTime"`
	DASStreamingGeolocWorkaround bool   `json:"dasStreamingGeolocWorkaround"`
}

Config contains the LoRaCloud integration configuration.

type FrameRXInfo

type FrameRXInfo struct {
	// Uplink Gateway meta-data.
	RxInfo               []*gw.UplinkRXInfo `protobuf:"bytes,1,rep,name=rx_info,json=rxInfo,proto3" json:"rx_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*FrameRXInfo) Descriptor

func (*FrameRXInfo) Descriptor() ([]byte, []int)

func (*FrameRXInfo) GetRxInfo

func (m *FrameRXInfo) GetRxInfo() []*gw.UplinkRXInfo

func (*FrameRXInfo) ProtoMessage

func (*FrameRXInfo) ProtoMessage()

func (*FrameRXInfo) Reset

func (m *FrameRXInfo) Reset()

func (*FrameRXInfo) String

func (m *FrameRXInfo) String() string

func (*FrameRXInfo) XXX_DiscardUnknown

func (m *FrameRXInfo) XXX_DiscardUnknown()

func (*FrameRXInfo) XXX_Marshal

func (m *FrameRXInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FrameRXInfo) XXX_Merge

func (m *FrameRXInfo) XXX_Merge(src proto.Message)

func (*FrameRXInfo) XXX_Size

func (m *FrameRXInfo) XXX_Size() int

func (*FrameRXInfo) XXX_Unmarshal

func (m *FrameRXInfo) XXX_Unmarshal(b []byte) error

type Integration

type Integration struct {
	// contains filtered or unexported fields
}

Integration implements a LoRaCloud Integration.

func New

func New(conf Config) (*Integration, error)

New creates a new LoRaCloud integration.

func (*Integration) Close

func (i *Integration) Close() error

Close is not implemented.

func (*Integration) DataDownChan

func (i *Integration) DataDownChan() chan models.DataDownPayload

DataDownChan returns nil.

func (*Integration) HandleAckEvent

func (i *Integration) HandleAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.AckEvent) error

HandleAckEvent is not implemented.

func (*Integration) HandleErrorEvent

func (i *Integration) HandleErrorEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.ErrorEvent) error

HandleErrorEvent is not implemented.

func (*Integration) HandleIntegrationEvent

func (i *Integration) HandleIntegrationEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.IntegrationEvent) error

HandleIntegrationEvent is not implemented.

func (*Integration) HandleJoinEvent

func (i *Integration) HandleJoinEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.JoinEvent) error

HandleJoinEvent is not implemented.

func (*Integration) HandleLocationEvent

func (i *Integration) HandleLocationEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.LocationEvent) error

HandleLocationEvent is not implemented.

func (*Integration) HandleStatusEvent

func (i *Integration) HandleStatusEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.StatusEvent) error

HandleStatusEvent is not implemented.

func (*Integration) HandleTxAckEvent

func (i *Integration) HandleTxAckEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.TxAckEvent) error

HandleTxAckEvent is not implemented.

func (*Integration) HandleUplinkEvent

func (i *Integration) HandleUplinkEvent(ctx context.Context, ii models.Integration, vars map[string]string, pl pb.UplinkEvent) error

HandleUplinkEvent handles the Uplinkevent.

Directories

Path Synopsis
client
das

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL