application

package
v0.0.0-...-e1273a2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecoderErr

type DecoderErr struct {
	Code      int
	Messages  []string
	Timestamp time.Time
}

func (*DecoderErr) Error

func (e *DecoderErr) Error() string

type Error

type Error struct {
	Type    string `json:"type,omitempty"`
	Message string `json:"message,omitempty"`
}

type Measurement

type Measurement struct {
	Timestamp time.Time  `json:"timestamp"`
	Pack      senml.Pack `json:"pack"`
}

type RXInfo

type RXInfo struct {
	GatewayId string  `json:"gatewayId,omitempty"`
	UplinkId  string  `json:"uplinkId,omitempty"`
	Rssi      int32   `json:"rssi,omitempty"`
	Snr       float32 `json:"snr,omitempty"`
}

type SensorEvent

type SensorEvent struct {
	DevEui     string              `json:"devEui"`
	DeviceName string              `json:"deviceName"`
	SensorType string              `json:"sensorType"`
	FPort      uint8               `json:"fPort"`
	Data       []byte              `json:"data"`
	Object     json.RawMessage     `json:"object,omitempty"`
	Tags       map[string][]string `json:"tags,omitempty"`
	Timestamp  time.Time           `json:"timestamp"`
	RXInfo     RXInfo              `json:"rxInfo,omitempty"`
	TXInfo     TXInfo              `json:"txInfo,omitempty"`
	Error      Error               `json:"error,omitempty"`
}

func ChirpStack

func ChirpStack(uplinkPayload []byte) (SensorEvent, error)

func Netmore

func Netmore(uplinkPayload []byte) (SensorEvent, error)

func (*SensorEvent) HasError

func (s *SensorEvent) HasError() bool

type TXInfo

type TXInfo struct {
	Frequency uint32 `json:"frequency,omitempty"`
}

type UplinkASFunc

type UplinkASFunc func([]byte) (SensorEvent, error)

func GetFacade

func GetFacade(as string) UplinkASFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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