frame

package
v0.0.0-...-83a780d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

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

func CreateFrame

func CreateFrame(data []byte, mType MsgType) Frame

func (*Frame) FillByte

func (p *Frame) FillByte(b byte) bool

func (*Frame) GetLength

func (p *Frame) GetLength() int

func (*Frame) GetPayload

func (p *Frame) GetPayload() []byte

func (*Frame) GetType

func (p *Frame) GetType() MsgType

func (*Frame) SetCrc

func (p *Frame) SetCrc(crc []byte)

func (*Frame) SetFooter

func (p *Frame) SetFooter(footer []byte)

func (*Frame) SetHeader

func (p *Frame) SetHeader(header []byte)

func (*Frame) SetPayload

func (p *Frame) SetPayload(payload []byte)

func (*Frame) ToBytes

func (p *Frame) ToBytes() []byte

func (*Frame) Validate

func (p *Frame) Validate() bool

type MsgType

type MsgType byte

MsgType indicates the type of the packet.

const (
	None MsgType = iota
	Cmd
	Data
	Response
	TransmissionControl = Response // Alias for Response, used for clarity in ArduinoBoardConfiguration Protocol
)

Jump to

Keyboard shortcuts

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