« Posts list

EtherCrab 0.5: Not Much In A Name

I've just released EtherCrab 0.5.0 (lib.rs), the pure Rust EtherCAT MainDevice. This is a smaller release than usual, with added support for FreeBSD/NetBSD and a bunch of renamed items in the public API. The full changelog can be found here.

Renamed items

This release removes the "master" and "slave" terminology in favour of the ETG-specified "MainDevice" and "SubDevice" respectively. The full list of changes is as follows:

TypeOldNew
enumSlaveStateSubDeviceState
fnClient::num_slaves()MainDevice::num_subdevices()
fnDs402::slave()Ds402::subdevice()
fnSlaveGroup::slave()SubDeviceGroup::subdevice()
modethercrab::slave_groupethercrab::subdevice_group
structClientMainDevice
structClientConfigMainDeviceConfig
structGroupSlaveIteratorGroupSubDeviceIterator
structSlaveSubDevice
structSlaveGroupSubDeviceGroup
structSlaveGroupRefSubDeviceGroupRef
structSlaveIdentitySubDeviceIdentity
structSlavePdiSubDevicePdi
structSlaveRefSubDeviceRef
variantAlStatusCode::SlaveNeedsColdStartAlStatusCode::SubDeviceNeedsColdStart
variantAlStatusCode::SlaveNeedsInitAlStatusCode::SubDeviceNeedsInit
variantAlStatusCode::SlaveNeedsPreopAlStatusCode::SubDeviceNeedsPreop
variantAlStatusCode::SlaveNeedsRestartedLocallyAlStatusCode::SubDeviceNeedsRestartedLocally
variantAlStatusCode::SlaveNeedsSafeopAlStatusCode::SubDeviceNeedsSafeop
variantError::UnknownSlaveError::UnknownSubDevice

This is largely a find and replace operation, but it's still a non-zero effort. Apologies for the churn, but now EtherCrab is more consistent with ETG documentation, and the oddly named Client struct is now called MainDevice. Frankly I don't know why I called it Client - it should've been Master or Controller. It's fixed now anyway 🙂.

FreeBSD/NetBSD support

EtherCrab now supports FreeBSD and NetBSD! It might support other BSDs too although it hasn't been tested against anything but FreeBSD. If you use a BSD, please give EtherCrab a try and open any issues on GitHub - I'm not too familiar with the BSD ecosystem.

Other smaller changes