EtherCAT.Bus.Result (ethercat v0.4.2)

Copy Markdown View Source

Result of a single EtherCAT datagram round-trip.

Results are returned in the same order as commands were added to the transaction.

Fields

  • data — response payload (binary)
  • wkc — working counter (raw, caller interprets)
  • circulartrue if the frame circulated (ring break indicator, spec §3.5)
  • irq — AL event request bitmask (2-byte little-endian binary), ORed across all slaves the datagram passed through (spec §12)

Example

{:ok, [%Result{data: <<status::16-little>>, wkc: 1}]} =
  Bus.transaction(bus, Transaction.fprd(0x1001, Registers.al_status()))

Summary

Types

t()

@type t() :: %EtherCAT.Bus.Result{
  circular: boolean(),
  data: binary(),
  irq: <<_::16>>,
  wkc: non_neg_integer()
}