Skip to content

ethercrab-v0.4.0

Compare
Choose a tag to compare
@jamwaffles jamwaffles released this 03 Apr 08:59
· 43 commits to master since this release

Changed

  • (breaking) #134 Bump MSRV to 1.75.0

  • #134 Refactor sub device EEPROM reader to be
    more efficient when skipping sections of the device EEPROM map.

  • (breaking) #142 Remove PduRead and
    PduData traits. These are replaced with EtherCrabWireRead and EtherCrabWireReadWrite traits
    respectively, along with EtherCrabWireReadWrite for write-only items.

    Some pertinent trait bounds changes in the public API:

    • SlaveRef::sdo_read from PduData to EtherCrabWireWrite
    • SlaveRef::sdo_write from PduData to EtherCrabWireReadSized
    • SlaveRef::register_read from PduData to EtherCrabWireWrite
    • SlaveRef::register_write from PduData to EtherCrabWireReadWrite
  • (breaking) #144
    PduError::InvalidIndex(usize) is now a PduError::InvalidIndex(u8) as the EtherCAT index field
    is itself onl a u8.

  • #151 Reduced overhead for EEPROM reads. Each
    chunk reader now only checks for and (attempt to) clear device errors once before reading a chunk
    of data, not for every chunk.

  • #156 Update embassy-time from 0.2.0 to
    0.3.0.

  • #181 PduStorage now stores complete
    Ethernet frames instead of building them on the fly. This adds a little more overhead to each
    slot, so the reserved data const parameter must be larger to compensate. Use the new
    PduStorage::element_size method to calculate element sizes based on a given maximum PDU payload
    value.

Added

  • #141 Added the ethercat-wire and
    ethercat-wire-derive crates.

    These crates are EXPERIMENTAL. They may be improved for public use in the future but are
    currently designed around EtherCrab's internal needs and may be rough and/or buggy. Use with
    caution, and expect breaking changes.

  • #141 Re-export the following traits from
    ethercrab-wire for dealing with packing/unpacking data:

    • EtherCrabWireRead
    • EtherCrabWireReadSized
    • EtherCrabWireReadWrite
    • EtherCrabWireSized
    • EtherCrabWireWrite
  • #151 Add EepromError::ClearErrors variant.

  • #152 Expose error::CoeAbortCode for
    matching on CoE transfer errors.

  • #169 Linux only: add io_uring-based
    blocking TX/RX loop for better performance.

  • #173 Add MUSL libc support.

  • #178 Add Error::SubDevice to get a
    subdevice status code on failure.

  • #180 Add PreOpPdi state, allowing access
    to a group's PDI whilst in PRE-OP.

  • #180 Add ethercrab::std::ethercat_now
    function to get the current time in nanoseconds from the EtherCAT epoch of 2000-01-01.

  • #194 Added SlaveGroup methods to
    facilitate graceful shutdown:

    • SlaveGroup<Op>::into_safe_op
    • SlaveGroup<SafeOp>::into_pre_op
    • SlaveGroup<PreOp>::into_init

    The ek1100 example shows these methods in use.

  • #195 Add Register::DcCyclicUnitControl
    (0x0980).

  • #193 Add
    SlaveGroup::<PreOp>::request_into_op to request all SubDevices in a group transition to OP, but
    does not wait for them to transition. Also add SlaveGroup::<Op>::all_op to check if all
    SubDevices in the group have reached OP state.

  • #198 Add Error::DistributedClock(_) and
    DistributedClockError error variant and type to communicate DC errors.

  • #198 Add
    SlaveGroup::tx_rx_sync_system_time, SlaveGroup::tx_rx_dc, SlaveRef::set_dc_sync and
    SlaveGroup::configure_dc_sync to support EtherCAT Distributed Clocks.

Fixed

  • (breaking) (technically) #143 Fix typo
    in name AlStatusCode::ApplicationControllerAvailableI ->
    AlStatusCode::ApplicationControllerAvailable
  • #152 CoE errors are not reported correctly
    from sdo_read and sdo_write.
  • #194 SlaveGroup<PreOp>::into_op now
    transitions through SAFE-OP instead of illegally transitioning straight into OP.

Removed

  • (breaking) #145 Remove the context
    field from Error::WorkingCounter. The output from EtherCrab's error logging should be used
    instead.
  • (breaking) #181 Remove async
    SendableFrame::send. Use SendableFrame::send_blocking instead.
  • #197 Remove SlaveGroupState trait. It is
    no longer required, but the same methods are available so migration should be as simple as just
    removing the import.