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
Click to show internal directories.
Click to hide internal directories.