packet

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MAGIC_NUMBER

type MAGIC_NUMBER uint8

MAGIC_NUMBER type

type Packet

type Packet interface {
	// Version returns version of packet framing
	Version() version.MAVLINK_VERSION
	// IsNil returns true if packet is nil
	IsNil() bool
	// IsSigned checks whether the frame contains a signature. It does not validate the signature
	IsSigned() bool
	// SysID returns system id
	SysID() uint8
	// CompID returns component id
	CompID() uint8
	// MsgID returns message id
	MsgID() message.MessageID
	// Checksum returns packet checksum
	Checksum() uint16
	// SeqID returns packet sequence number
	SeqID() uint8
	// Payload returns packet payload
	Payload() []byte
	// Signature returns packet signature
	Signature() *signature.Signature
	// Copy returns deep copy of packet
	Copy() Packet
	// Message returns dialect message
	Message() (message.Message, error)
	// String returns string representation of packet
	String() string
	// Marshal encodes Packet to byte slice
	Marshal() ([]byte, error)
	// MarshalWithSignature encodes Packet to byte slice including signature at appendix
	MarshalWithSignature(linkID byte, timestamp time.Time, secretKey [32]byte) ([]byte, error)
	// Unmarshal parses PAYLOAD and stores the result in Packet
	Unmarshal(payload []byte) error
}

Packet is the interface implemented by frames of every supported version.

Jump to

Keyboard shortcuts

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