ecat

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ecat added in v1.0.4

type Ecat struct {
	// contains filtered or unexported fields
}

ecat represents an EtherCAT packet.

func NewEcat

func NewEcat() Ecat

NewEcat creates and returns a new EtherCAT packet with a default header and an empty list of datagrams.

Returns:

  • ecat: New EtherCAT packet

func (*Ecat) AppendDatagram added in v1.0.4

func (e *Ecat) AppendDatagram(data datagram.EcatDatagram) error

AppendDatagram appends a new EtherCAT datagram to the packet and updates the packet header(Length). It returns an error if the new header length exceeds the valid range.

Parameters:

  • data (datagram.EcatDatagram): EtherCAT datagram to append

Returns:

  • error: Error if the new header length exceeds the valid range

func (*Ecat) Bytes added in v1.0.4

func (e *Ecat) Bytes() []byte

Bytes returns the byte representation of the EtherCAT packet, including the header and datagrams.

Returns:

  • []byte: Byte representation of the EtherCAT packet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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