Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CtrlStatus ¶
type CtrlStatus struct { InVisibleBuffer uint16 // [3:4] VisibleBufferBufferStat 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 ¶
NewEnableFromUint16 creates an Enable from a uint16 value. It returns a pointer to the created Enable.
Returns:
- *Enable: A pointer to the created 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.