syncmanager

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlStatus

type CtrlStatus struct {
	InVisibleBufferState     uint16 // [3:4]
	VisibleBufferBufferState uint16 // [5]
	CanReadIRQ               bool   // [7]
	CanWriteIRQ              bool   // [8]
	IsTriggerWatchdog        bool   // [10]
	IsPdiIRQ                 bool   // [11]
	IsEcatIRQ                bool   // [12]
	Access                   uint16 // [13:14]
	OpMode                   uint16 // [15:16]
}

CtrlStatus represents the control status with various bit fields.

func NewCtrlStatusFromUint16

func NewCtrlStatusFromUint16(ctrlStatus uint16) *CtrlStatus

NewCtrlStatusFromUint16 creates a CtrlStatus from a uint16 value. It returns a pointer to the created CtrlStatus.

Returns:

  • *CtrlStatus: A pointer to the created CtrlStatus.

func (CtrlStatus) ToUint16

func (c CtrlStatus) ToUint16() uint16

ToUint16 converts CtrlStatus to its uint16 representation. It returns the uint16 representation of the CtrlStatus.

Returns:

  • uint16: The uint16 representation of the CtrlStatus.

type Enable

type Enable struct {
	IsRepeatAcknowledge bool // [7]
	IsDeactivate        bool // [8]
	IsLatchChangePDI    bool // [9]
	IsLatchChangeECAT   bool // [10]
	IsRepeatRequest     bool // [15]
	IsEnable            bool // [16]
}

Enable represents the enable field with various control bits.

func NewEnableFromUint16

func NewEnableFromUint16(enable uint16) *Enable

NewEnableFromUint16 creates an Enable from a uint16 value. It returns a pointer to the created Enable.

Returns:

  • *Enable: A pointer to the created Enable.

func (Enable) ToUint16

func (e Enable) ToUint16() uint16

ToUint16 converts Enable to its uint16 representation. It returns the uint16 representation of the Enable.

Returns:

  • uint16: The uint16 representation of the Enable.

type SyncManager

type SyncManager struct {
	Start      uint16
	Length     uint16
	CtrlStatus CtrlStatus
	Enable     Enable
}

SyncManager represents a synchronization manager with start, length, control status, and enable fields.

func (SyncManager) Bytes

func (s SyncManager) Bytes() []byte

Bytes converts SyncManager to its byte representation. It returns the byte slice representing the SyncManager.

Returns:

  • []byte: The byte representation of the SyncManager.

Jump to

Keyboard shortcuts

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