sync

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNone         uint8 = 0 // No SYNC event in last cycle
	EventRxOrTx       uint8 = 1 // SYNC message was received or transmitted in last cycle
	EventPassedWindow uint8 = 2 // Time has just passed SYNC window in last cycle (0x1007)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SYNC

type SYNC struct {
	*canopen.BusManager
	// contains filtered or unexported fields
}

func NewSYNC

func NewSYNC(
	bm *canopen.BusManager,
	emergency *emergency.EMCY,
	entry1005 *od.Entry,
	entry1006 *od.Entry,
	entry1007 *od.Entry,
	entry1019 *od.Entry,
) (*SYNC, error)

func (*SYNC) Counter

func (sync *SYNC) Counter() uint8

func (*SYNC) CounterOverflow

func (sync *SYNC) CounterOverflow() uint8

func (*SYNC) Handle

func (sync *SYNC) Handle(frame canopen.Frame)

Handle SYNC related RX CAN frames

func (*SYNC) Process

func (sync *SYNC) Process(nmtIsPreOrOperational bool, timeDifferenceUs uint32, timerNextUs *uint32) uint8

Process SYNC state machine and TX CAN frames It returns the according sync event This should be called periodically

func (*SYNC) RxToggle

func (sync *SYNC) RxToggle() bool

Jump to

Keyboard shortcuts

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