bp35a1

package module
v0.0.0-...-2515329 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 10 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.

README

bp35a1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BP35A1

type BP35A1 struct {
	Device string
	Baud   int
	Port   *serial.Port
}

func NewBP35A1

func NewBP35A1(device string, baud int) *BP35A1

func (*BP35A1) Close

func (b *BP35A1) Close()

func (*BP35A1) Connect

func (b *BP35A1) Connect() error

func (*BP35A1) SKINFO

func (b *BP35A1) SKINFO() (string, error)

func (*BP35A1) SKJOIN

func (b *BP35A1) SKJOIN(addr string) (bool, error)

func (*BP35A1) SKLL64

func (b *BP35A1) SKLL64(addr string) (string, error)

func (*BP35A1) SKSCAN

func (b *BP35A1) SKSCAN() (*PAN, error)

func (*BP35A1) SKSENDTO

func (b *BP35A1) SKSENDTO(handle uint8, ipaddr string, port uint16, sec uint8, data []byte, done <-chan struct{}) (<-chan *Frame, error)

func (*BP35A1) SKSETPWD

func (b *BP35A1) SKSETPWD(pwd string) error

func (*BP35A1) SKSETRBID

func (b *BP35A1) SKSETRBID(rbid string) error

func (*BP35A1) SKSREG

func (b *BP35A1) SKSREG(sreg string, val string) error

func (*BP35A1) SKVER

func (b *BP35A1) SKVER() (string, error)

type Frame

type Frame struct {
	EHD1       uint8
	EHD2       uint8
	TID        uint16
	SEOJ       uint32 // Use only 24 bits
	DEOJ       uint32 // Use only 24 bits
	ESV        uint8
	OPC        uint8
	Properties []*Property
}

func NewFrame

func NewFrame(ehd1, ehd2 uint8, tid uint16, seoj, deoj uint32, esv, opc uint8, props []*Property) *Frame

func NewFrameFromString

func NewFrameFromString(s string) (*Frame, error)

func (*Frame) Bytes

func (f *Frame) Bytes() []byte

type PAN

type PAN struct {
	Channel     uint8
	ChannelPage uint8
	PanID       uint16
	Addr        string
	LQI         uint8
	PairID      string
}

type PortWrapper

type PortWrapper struct {
	Port io.Reader
	// contains filtered or unexported fields
}

func NewPortWrapper

func NewPortWrapper(r io.Reader) *PortWrapper

func (*PortWrapper) ReadLine

func (p *PortWrapper) ReadLine() string

func (*PortWrapper) ReadLinesUntilOk

func (p *PortWrapper) ReadLinesUntilOk() []string

func (*PortWrapper) ScanAndText

func (p *PortWrapper) ScanAndText() (bool, string)

type Property

type Property struct {
	EPC uint8
	PDC uint8
	EDT []byte
}

func NewProperty

func NewProperty(epc uint8, pdc uint8, edt []byte) (*Property, error)

func (*Property) Bytes

func (p *Property) Bytes() []byte

Jump to

Keyboard shortcuts

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