sdo

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DownloadInitiateRequest  = 0x20 // 0010 0000
	DownloadInitiateResponse = 0x60 // 0110 0000

	DownloadSegmentRequest  = 0x00 // 0000 0000
	DownloadSegmentResponse = 0x20 // 0010 0000
)
View Source
const (
	UploadInitiateRequest  = 0x40 // 0100 0000
	UploadInitiateResponse = 0x40 // 0100 0000

	UploadSegmentRequest  = 0x60 // 0110 0000
	UploadSegmentResponse = 0x00 // 0000 0000
	TransferAbort         = 0x80
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

type Download struct {
	ObjectIndex canopen.ObjectIndex

	Data          []byte
	RequestCobID  uint16
	ResponseCobID uint16
}

Download represents a SDO download process to write data to a CANopen device – download because the receiving node downloads data.

func (Download) Do

func (download Download) Do(bus *can.Bus) error

func (Download) DoBlock added in v0.1.6

func (download Download) DoBlock(bus *can.Bus) error

type Upload

type Upload struct {
	ObjectIndex canopen.ObjectIndex

	RequestCobID  uint16
	ResponseCobID uint16
}

Upload represents a SDO upload process to read data from a CANopen device – upload because the receiving node uploads data to another node.

func (Upload) Do

func (upload Upload) Do(bus *can.Bus) ([]byte, error)

Jump to

Keyboard shortcuts

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