ota

package
v0.0.0-...-88d6d00 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

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

Encoder writes a binary to an output stream in the ota format.

func NewEncoder

func NewEncoder(w io.Writer, magicNumberPart1, magicNumberPart2 string) *Encoder

NewEncoder creates a new ota encoder.

func (*Encoder) Encode

func (e *Encoder) Encode(data []byte) error

Encode compresses data using a lzss algorithm, encodes the result in ota format and writes it to e's underlying writer.

type Version

type Version struct {
	HeaderVersion   uint8
	Compression     bool
	Signature       bool
	Spare           uint8
	PayloadTarget   uint8
	PayloadMayor    uint8
	PayloadMinor    uint8
	PayloadPatch    uint8
	PayloadBuildNum uint32
}

Version contains all the OTA header information Check out https://arduino.atlassian.net/wiki/spaces/RFC/pages/1616871540/OTA+header+structure for more information on the OTA header specs.

func (*Version) Bytes

func (v *Version) Bytes() []byte

Bytes builds a 8 byte length representation of the Version Struct for the OTA update.

Jump to

Keyboard shortcuts

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