Builder for ordered EtherCAT datagram transactions.
Transaction is the caller-side unit of atomic intent. The bus may coalesce
multiple reliable transactions into one frame, but each transaction still
receives its own ordered list of results.
Transactions may be built incrementally:
Transaction.new()
|> Transaction.fpwr(0x1001, Registers.al_control(0x08))
|> Transaction.fprd(0x1001, Registers.al_status())Or created directly for a single datagram:
Transaction.fprd(0x1001, Registers.al_status())
Transaction.lrw({0x0000, image})
Summary
Functions
Auto-increment read. position is 0-based. reg is {offset, length}.
Auto-increment read/write. reg is {offset, data}.
Auto-increment write. reg is {offset, data}.
Auto-increment read multiple write (ARMW). reg is {offset, length_or_data}.
When length is an integer, a zero-filled binary of that size is used as the
write payload.
Broadcast read. reg is {offset, length}.
Broadcast read/write. reg is {offset, data}.
Broadcast write. reg is {offset, data}.
Configured address read. reg is {offset, length} from Registers.
Configured address read/write. reg is {offset, data}.
Configured address write. reg is {offset, data} from Registers.
Configured address read multiple write (FRMW). reg is {offset, length_or_data}.
When length is an integer, a zero-filled binary of that size is used as the
write payload.
Logical memory read. addr_len is {addr, length}.
Logical memory read/write. addr_data is {addr, data}.
Logical memory write. addr_data is {addr, data}.
Types
Functions
@spec aprd( non_neg_integer(), {non_neg_integer(), pos_integer()} ) :: t()
@spec aprd(t(), non_neg_integer(), {non_neg_integer(), pos_integer()}) :: t()
Auto-increment read. position is 0-based. reg is {offset, length}.
@spec aprw( non_neg_integer(), {non_neg_integer(), binary()} ) :: t()
@spec aprw(t(), non_neg_integer(), {non_neg_integer(), binary()}) :: t()
Auto-increment read/write. reg is {offset, data}.
@spec apwr( non_neg_integer(), {non_neg_integer(), binary()} ) :: t()
@spec apwr(t(), non_neg_integer(), {non_neg_integer(), binary()}) :: t()
Auto-increment write. reg is {offset, data}.
@spec armw( non_neg_integer(), {non_neg_integer(), pos_integer() | binary()} ) :: t()
@spec armw(t(), non_neg_integer(), {non_neg_integer(), pos_integer() | binary()}) :: t()
Auto-increment read multiple write (ARMW). reg is {offset, length_or_data}.
When length is an integer, a zero-filled binary of that size is used as the
write payload.
@spec brd({non_neg_integer(), pos_integer()}) :: t()
@spec brd( t(), {non_neg_integer(), pos_integer()} ) :: t()
Broadcast read. reg is {offset, length}.
@spec brw({non_neg_integer(), binary()}) :: t()
@spec brw( t(), {non_neg_integer(), binary()} ) :: t()
Broadcast read/write. reg is {offset, data}.
@spec bwr({non_neg_integer(), binary()}) :: t()
@spec bwr( t(), {non_neg_integer(), binary()} ) :: t()
Broadcast write. reg is {offset, data}.
@spec datagrams(t()) :: [EtherCAT.Bus.Datagram.t()]
@spec fprd( non_neg_integer(), {non_neg_integer(), pos_integer()} ) :: t()
@spec fprd(t(), non_neg_integer(), {non_neg_integer(), pos_integer()}) :: t()
Configured address read. reg is {offset, length} from Registers.
@spec fprw( non_neg_integer(), {non_neg_integer(), binary()} ) :: t()
@spec fprw(t(), non_neg_integer(), {non_neg_integer(), binary()}) :: t()
Configured address read/write. reg is {offset, data}.
@spec fpwr( non_neg_integer(), {non_neg_integer(), binary()} ) :: t()
@spec fpwr(t(), non_neg_integer(), {non_neg_integer(), binary()}) :: t()
Configured address write. reg is {offset, data} from Registers.
@spec frmw( non_neg_integer(), {non_neg_integer(), pos_integer() | binary()} ) :: t()
@spec frmw(t(), non_neg_integer(), {non_neg_integer(), pos_integer() | binary()}) :: t()
Configured address read multiple write (FRMW). reg is {offset, length_or_data}.
When length is an integer, a zero-filled binary of that size is used as the
write payload.
@spec lrd({non_neg_integer(), pos_integer()}) :: t()
@spec lrd( t(), {non_neg_integer(), pos_integer()} ) :: t()
Logical memory read. addr_len is {addr, length}.
@spec lrw({non_neg_integer(), binary()}) :: t()
@spec lrw( t(), {non_neg_integer(), binary()} ) :: t()
Logical memory read/write. addr_data is {addr, data}.
@spec lwr({non_neg_integer(), binary()}) :: t()
@spec lwr( t(), {non_neg_integer(), binary()} ) :: t()
Logical memory write. addr_data is {addr, data}.
@spec new() :: t()