OpenCyphal / libcanard

A compact implementation of the Cyphal/CAN protocol in C for high-integrity real-time embedded systems
http://opencyphal.org
MIT License
327 stars 192 forks source link

Applying hardware acceptance filters #200

Closed rebeccaRossRobotics closed 1 year ago

rebeccaRossRobotics commented 1 year ago

Hello!

I'm currently attempting to implement acceptance filters into my application (which is based off the differential_pressure_sensor demo found here). I've followed the explanation in the readme, using the API provided (canardMakeFilters and consolidateFilters functions).

After using those functions it says to call configureHardwareFilters(combined_config.extended_can_id, combined_config.extended_mask);, however I cannot find any trace of this function within libcanard or socketcan. Is this something that I am meant to implement myself?

I've looked back through the commits in libcanard to the point where the filters were added to the readme and the function doesn't exist there either.

Thank in advance

pavel-kirienko commented 1 year ago

I cannot find any trace of this function within libcanard or socketcan. Is this something that I am meant to implement myself?

For SocketCAN you should use socketcanFilter(), otherwise you may need to implement it yourself.