sdo

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientIntiateDownload = 0x20 // 0010 0000
	ClientSegmentDownload = 0x00 // 0110 0000

	ServerInitiateDownload = 0x60 // 0110 0000
	ServerSegmentDownload  = 0x20 // 0010 0000
)
View Source
const (
	TransferExpedited            = 0x2
	TransferSizeIndicated        = 0x1
	TransferMaskCommandSpecifier = 0xE0
	TransferMaskSize             = 0xC
	TransferSegmentToggle        = 0x10
	TransferAbort                = 0x80
)
View Source
const (
	ClientIntiateUpload = 0x40 // 0100 0000
	ClientSegmentUpload = 0x60 // 0110 0000

	ServerInitiateUpload = 0x40 // 0100 0000
	ServerSegmentUpload  = 0x00 // 0000 0000
)

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

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