Skip to content

It's not clear when can::ErrorKind::Acknowledge should be returned #387

Open
@jonas-schievink

Description

@jonas-schievink
Contributor

Its docs say "An ACK error shall be detected by a transmitter whenever it does not monitor a dominant bit during the ACK slot.", but Can::transmit only enqueues a frame for transmission, so it's impossible to detect this condition for the frame passed there. Can::transmit could check if any previous frame caused an ACK error and return an error, but then its return value indicates whether a different frame was transmitted successfully.

Activity

added this to the v1.0.0 milestone on Jun 6, 2022
eldruin

eldruin commented on Jun 6, 2022

@eldruin
Member
timokroeger

timokroeger commented on Jun 6, 2022

@timokroeger
Contributor

I fully agree with jonas here.
The error kinds were chosen to map to the error conditions defined by the CAN spec (same wording in the doc strings as the description in the spec).
For our transmit() interface returning an ACK error does not make sense as those should be handled internally by the controller.

eldruin

eldruin commented on Jul 5, 2022

@eldruin
Member

We discussed in the WG meeting that we could keep the variant but improve its documentation.
Any change suggestions?

added 2 commits that reference this issue on Sep 26, 2022
removed this from the v1.0.0 milestone on Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @eldruin@timokroeger@jonas-schievink

        Issue actions

          It's not clear when `can::ErrorKind::Acknowledge` should be returned · Issue #387 · rust-embedded/embedded-hal