Releases: ethercrab-rs/ethercrab
v0.3.1
v0.3.0
Added
-
#91 Add support for "cross" topologies, e.g. with EK1122.
-
#102 PDU retry behaviour is now configurable between no retries, a limited count, or retrying
forever with theRetryBehaviour
struct and associatedClientConfig.retry_behaviour
option. -
#103 Added optional
serde
feature to enable ser/de of some EtherCrab items. -
#104 Implement
std::error::Error
forethercrab::error::Error
when thestd
feature is
enabled. -
#107 Add watchdog fields to
Register
enum:WatchdogDivider
,PdiWatchdog
SyncManagerWatchdog
,SyncManagerWatchdogStatus
SyncManagerWatchdogCounter
,
PdiWatchdogCounter
. -
#113
SlaveState
now implementsPduRead
so can now be read directly, e.g.let (status, _wkc) = Command::fprd(slave.configured_address(), RegisterAddress::AlStatus.into()) .receive::<SlaveState>(&client) .await?;
Changed
- #92 If no slave devices are detected,
Client::init
will no longer exit with an error. - (breaking) #101
SendableFrame::send_blocking
andSendableFrame::send
must now return the
number of bytes sent over the network. - (breaking) #101
SendableFrame::write_ethernet_packet
is no longerpub
. Instead, use
SendableFrame::send_blocking
orSendableFrame::send
. - #103 Removed inner
smoltcp::error::Error
fromPduError::Ethernet
andPduError::CreateFrame
as these don't add much meaning to the variant. - (breaking) #109 Make all methods on
PduLoop
private. - (breaking) #113
Command::{code,address,parse}
are no longerpub
. - (breaking) #119 Changed
SlaveState::Unknown
toSlaveState::Other(u8)
to better represent
unknown or different states of multiple slaves (e.g. when sending aBRD
).
Removed
- (breaking) #99 All PDU methods on
Client
(Client::bwr
,Client::fprd
) have been
removed. Instead, use the same methods onCommand
likeCommand::bwr
,Command::fprd
etc.
v0.2.1
Fixed
- #84
GroupSlave::iter
will now panic instead of completing early if a slave device is already
borrowed.
Added
- #83 Add
SlaveRef::identity
method to get the vendor ID, hardware revision, etc of a slave
device.
Changed
- #84 The
SlaveGroupState
trait is now not-doc-hidden so theGroupSlave::slave
method is more
easily accessible.
v0.2.0
Added
- #47 Add the ability to read/write registers/SDOs from grouped slave devices, with the methods
SlaveRef::register_read
,SlaveRef::register_write
,SlaveRef::sdo_read
and
SlaveRef::sdo_write
. - #30 Added
Copy
,Clone
,PartialEq
andEq
implementations toError
andPduError
. - #1 Added
SlaveGroup::len
andSlaveGroup::is_empty
methods. - #29 Implement
Display
forError
,PduError
,MailboxError
,EepromError
,
VisibleStringError
andPduValidationError
- (breaking) #31 Added a
ClientConfig
argument toClient::new
to allow configuration of
various EtherCrab behaviours. - #55 Added
Client::init_single_group
to reduce boilerplate when only using a single group of
devices. - #55 Removed MSRV commitment (was 1.68)
- #59 Added
SendableFrame::send_blocking
method.
Removed
- (breaking) #75
Client::request_slave_state
is removed. Groups should be transitioned into
the various states individually usinginto_op
orinto_safe_op
. - (breaking) #75
SlaveGroup::new
is removed. Slave groups can be created with
SlaveGroup::default()
instead - (breaking) #45 The
SlaveGroupContainer
trait is no longer needed and has been removed.
Changed
-
(breaking) #75
Client::init
no longer takes agroups
argument and now requires
G: Default
. -
(breaking) #75
SlaveGroup
s no longer configure using a closure - instead use
SlaveGroup::iter
orSlaveGroup::slave
to configure slave devices inline. -
(breaking) #75
SlaveGroup
s now have a type state. Useinto_safe_op
andinto_op
to
transition from PRE-OP as provided byClient::init
into run mode. -
#47 Slave
sdo_read
andsdo_write
methods no longer require the use ofSubIndex
. For single
accesses, a rawu8
can be passed instead for cleaner configuration code. -
(breaking) #47
SlaveGroup::slave
andSlaveGroup::iter
(wasslaves
) now requires the
passing of aClient
reference when called. -
(breaking) #47
SlaveGroup::slaves
is renamed toSlaveGroup::iter
-
(breaking) #47 Grouped slaves that were previously represented as
GroupSlave
s are now
represented asSlaveRef<'_, SlavePdi<'_>>
instead.GroupSlave
is removed. -
(breaking) #47 The
io()
,inputs()
andoutputs()
methods on grouped slaves have been
renamed toio_raw()
,inputs_raw()
andoutputs_raw()
respecitively. -
(breaking) #47 The
Slave.name
andSlave.identity
fields have been replaced with methods
of the same name. -
(breaking) #45 The grouping closure passed to
Client::init
now requires a
&dyn SlaveGroupHandle
to be returned. This is a sealed trait only implemented forSlaveGroup
s
and allows some internal refactors by erasing the const generics fromSlaveGroup
. -
(breaking) #32 To mitigate some internal issues,
PduStorage
now requiresN
(the number
of storage elements) to be a power of two. -
(breaking) #33
send_frames_blocking
is removed. It is replaced with
PduTx::next_sendable_frame
which can be used to send any available frames in a loop until it
returnsNone
. -
(breaking) #30 Removed
PduError::Encode
variant. -
(breaking) #25 Renamed
pdu_rx
toreceive_frame
to mirrorsend_frames_blocking
. -
(breaking) #20 Changed the way the client, tx and rx instances are initialised to only allow
one TX and RX to exist.Before
static PDU_STORAGE: PduStorage<MAX_FRAMES, MAX_PDU_DATA> = PduStorage::new(); static PDU_LOOP: PduLoop = PduLoop::new(PDU_STORAGE.as_ref()); async fn main_app(ex: &LocalExecutor<'static>) -> Result<(), Error> { let client = Arc::new(Client::new(&PDU_LOOP, Timeouts::default())); ex.spawn(tx_rx_task(INTERFACE, &client).unwrap()).detach(); }
After
static PDU_STORAGE: PduStorage<MAX_FRAMES, MAX_PDU_DATA> = PduStorage::new(); async fn main_app(ex: &LocalExecutor<'static>) -> Result<(), Error> { let (tx, rx, pdu_loop) = PDU_STORAGE.try_split().expect("can only split once"); let client = Arc::new(Client::new(pdu_loop, Timeouts::default())); ex.spawn(tx_rx_task(INTERFACE, tx, rx).unwrap()).detach(); }
-
(breaking) #16 Remove
TIMER
/TIMEOUT
generic parameter.std
environments will now use
the timer provided bysmol
(async-io
).no_std
environments will useembassy-time
. -
(breaking) #9 Rename the fields of some variants in
ethercrab::error::Error
to make them
less confusing. -
(breaking) #2 Rename
slave_group::Configurator
toSlaveGroupRef
. -
(breaking) #1
SlaveGroup::slaves
now returns an iterator over each slave with IO in the
group, instead of a plain slave.
Fixed
- #28 Fix abort code parsing for expedited SDO responses.
- #26 🎉 EtherCrab now works on stable Rust. The MSRV is 1.68.
- #23 Strip trailing null bytes (
\0
) in strings read from SII - #14 Fixed various overflow/arithmetic bugs in distributed clock time calculations and PDI
configuration - #6 Fixed topology detection not stopping at first upstream fork when there is a slave device
before the fork. - #6 Internal bugfixes to topology discovery code.
- #2 Fixed multiple group PDI mapping calculation during initialisation.
- [#57] Fixed a buffer size calculation crash when reading SDOs.
v0.1.0
Added
- Initial release