fkdevice

package module
v0.0.0-...-4af77be Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: BSD-3-Clause Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 5
)

Variables

View Source
var DeviceBusyErr = fmt.Errorf("Busy")

Functions

func Decode

func Decode(ctx context.Context, decode DecodeFunction) error

func DecodeApp

func DecodeApp(ctx context.Context, b []byte) error

func DecodeData

func DecodeData(ctx context.Context, b []byte) error

func DecodeModuleConfig

func DecodeModuleConfig(ctx context.Context, b []byte) error

Types

type DeadlineReader

type DeadlineReader struct {
	Target  net.Conn
	Timeout time.Duration
}

func (*DeadlineReader) Read

func (dr *DeadlineReader) Read(p []byte) (n int, err error)

type DebugReader

type DebugReader struct {
	Target io.Reader
}

func (*DebugReader) Read

func (dr *DebugReader) Read(p []byte) (n int, err error)

type DecodeFunction

type DecodeFunction func(ctx context.Context, b []byte) error

type DeviceClient

type DeviceClient struct {
	Callbacks DeviceClientLoggingCallbacks
	Address   string
	HexEncode bool
	Port      int
}

func (*DeviceClient) ClearLora

func (d *DeviceClient) ClearLora() (*pb.HttpReply, error)

func (*DeviceClient) ConfigureLoraAbp

func (d *DeviceClient) ConfigureLoraAbp(appSessionKey, networkSessionKey, deviceAddress string, uplinkCounter, downlinkCounter, frequencyBand uint32) (*pb.HttpReply, error)

func (*DeviceClient) ConfigureLoraOtaa

func (d *DeviceClient) ConfigureLoraOtaa(deviceEui, appKey, joinEui string, frequencyBand int) (*pb.HttpReply, error)

func (*DeviceClient) ConfigureName

func (d *DeviceClient) ConfigureName(name string) (*pb.HttpReply, error)

func (*DeviceClient) ConfigureSchedule

func (d *DeviceClient) ConfigureSchedule(readings, network, gps, lora uint32) (*pb.HttpReply, error)

func (*DeviceClient) ConfigureTransmission

func (d *DeviceClient) ConfigureTransmission(url, token string) (*pb.HttpReply, error)

func (*DeviceClient) ConfigureWifiNetworks

func (d *DeviceClient) ConfigureWifiNetworks(networks []*pb.NetworkInfo) (*pb.HttpReply, error)

func (*DeviceClient) FactoryReset

func (d *DeviceClient) FactoryReset() (*pb.HttpReply, error)

func (*DeviceClient) ModuleQuery

func (d *DeviceClient) ModuleQuery(bay uint32, query []byte) ([]byte, error)

func (*DeviceClient) QueryGetReadings

func (d *DeviceClient) QueryGetReadings() (*pb.HttpReply, error)

func (*DeviceClient) QueryListing

func (d *DeviceClient) QueryListing(path string, page uint32) (*pb.HttpReply, error)

func (*DeviceClient) QueryScanModules

func (d *DeviceClient) QueryScanModules() (*pb.HttpReply, error)

func (*DeviceClient) QueryScanNetworks

func (d *DeviceClient) QueryScanNetworks() (*pb.HttpReply, error)

func (*DeviceClient) QueryStartRecording

func (d *DeviceClient) QueryStartRecording() (*pb.HttpReply, error)

func (*DeviceClient) QueryStatus

func (d *DeviceClient) QueryStatus() (*pb.HttpReply, error)

func (*DeviceClient) QueryStopRecording

func (d *DeviceClient) QueryStopRecording() (*pb.HttpReply, error)

func (*DeviceClient) QueryTakeReadings

func (d *DeviceClient) QueryTakeReadings() (*pb.HttpReply, error)

type DeviceClientLoggingCallbacks

type DeviceClientLoggingCallbacks interface {
	Sent(query *pb.HttpQuery)
	Received(reply *pb.HttpReply)
}

type DeviceQueryOpts

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

type LimitedReader

type LimitedReader struct {
	Target           io.Reader
	MessagesExpected int
}

func (*LimitedReader) Read

func (dr *LimitedReader) Read(p []byte) (n int, err error)

type LogJsonCallbacks

type LogJsonCallbacks struct {
	Save string
}

func (*LogJsonCallbacks) Received

func (cb *LogJsonCallbacks) Received(reply *pb.HttpReply)

func (*LogJsonCallbacks) Sent

func (cb *LogJsonCallbacks) Sent(query *pb.HttpQuery)

type QueryResponse

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

func (*QueryResponse) Close

func (qr *QueryResponse) Close() error

func (*QueryResponse) Reader

func (qr *QueryResponse) Reader(to int) io.Reader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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