blcu

package
v0.0.0-...-0b3c072 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BLCU_COMPONENT_NAME = "blcu"
	BLCU_BOARD_NAME     = "blcu"
	BLCU_HANDLER_NAME   = "blcu"
	BLCU_INPUT_CHAN_BUF = 100
	BLCU_ACK_CHAN_BUF   = 1
)
View Source
const FlashMemorySize = 786432

Variables

This section is empty.

Functions

This section is empty.

Types

type BLCU

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

func NewBLCU

func NewBLCU(laddr net.TCPAddr, boardIds map[string]uint16, config BLCUConfig) BLCU

func (*BLCU) HandlerName

func (blcu *BLCU) HandlerName() string

func (*BLCU) NotifyAck

func (blcu *BLCU) NotifyAck()

func (*BLCU) ReadTFTP

func (blcu *BLCU) ReadTFTP(output io.Writer, onProgress func(float64)) error

func (*BLCU) SetSendOrder

func (blcu *BLCU) SetSendOrder(sendOrder func(o models.Order) error)

func (*BLCU) UpdateMessage

func (blcu *BLCU) UpdateMessage(client wsModels.Client, msg wsModels.Message)

func (*BLCU) WriteTFTP

func (blcu *BLCU) WriteTFTP(reader io.Reader, size int, onProgress func(float64)) error

type BLCUConfig

type BLCUConfig struct {
	Packets struct {
		Upload   PacketData
		Download PacketData
		Ack      PacketData
	}

	DownloadPath string `toml:"download_path,omitempty"`

	Topics struct {
		Upload   string
		Download string
	}
}

type Download

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

func NewDownload

func NewDownload(writer io.Writer, size int, onProgress func(float64)) Download

func (*Download) Write

func (download *Download) Write(p []byte) (n int, err error)

type PacketData

type PacketData struct {
	Id    uint16 `toml:"id,omitempty"`
	Field string `toml:"field,omitempty"`
	Name  string `toml:"name,omitempty"`
}

type Upload

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

func NewUpload

func NewUpload(reader io.Reader, size int, onProgress func(float64)) Upload

func (*Upload) Read

func (upload *Upload) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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