Subscribing to Raw Messages from any ID?

43 views
Skip to first unread message

Erik Rainey

unread,
Apr 4, 2018, 6:22:42 PM4/4/18
to UAVCAN
Is there a mechanism to receive all the messages that the underlying CAN Driver sees through UAVCAN, somewhat like a raw tap on the underlying CAN interface? Everything seems to be geared towards having a known structure to UAVCAN and not at being able to receive unknown structures. Would I have to insert some tap under the drivers with interfaces to UAVCAN?

Pavel Kirienko

unread,
Apr 5, 2018, 9:26:31 AM4/5/18
to Erik Rainey, UAVCAN
There's a good reason for that. You can't receive an unknown structure, by design, because the answer is right there: the structure is unknown. You can receive only known structures, so the solution for that is to instantiate a subscriber for every type you know.

However, if you just want raw CAN frames, all of our open source libraries allow you to receive raw traffic from the bus directly in your application:


On Thu, Apr 5, 2018 at 1:22 AM, Erik Rainey <erik....@gmail.com> wrote:
Is there a mechanism to receive all the messages that the underlying CAN Driver sees through UAVCAN, somewhat like a raw tap on the underlying CAN interface? Everything seems to be geared towards having a known structure to UAVCAN and not at being able to receive unknown structures. Would I have to insert some tap under the drivers with interfaces to UAVCAN?

--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+unsubscribe@googlegroups.com.
To post to this group, send email to uav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uavcan/a22bdb81-74b9-47cc-95ca-a8c713bd95f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik Rainey

unread,
Apr 5, 2018, 3:30:50 PM4/5/18
to UAVCAN
Thanks for the response! I've installed the callback interface and I've received some callbacks to my `handleRxFrame` method, but not for every single message on the bus, but only for messages for my node. I assume that's by design? Would I have to install some specific acceptable filters to get my node to receive all traffic?


On Thursday, April 5, 2018 at 6:26:31 AM UTC-7, Pavel Kirienko wrote:
There's a good reason for that. You can't receive an unknown structure, by design, because the answer is right there: the structure is unknown. You can receive only known structures, so the solution for that is to instantiate a subscriber for every type you know.

However, if you just want raw CAN frames, all of our open source libraries allow you to receive raw traffic from the bus directly in your application:

On Thu, Apr 5, 2018 at 1:22 AM, Erik Rainey <erik....@gmail.com> wrote:
Is there a mechanism to receive all the messages that the underlying CAN Driver sees through UAVCAN, somewhat like a raw tap on the underlying CAN interface? Everything seems to be geared towards having a known structure to UAVCAN and not at being able to receive unknown structures. Would I have to insert some tap under the drivers with interfaces to UAVCAN?

--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+un...@googlegroups.com.

Pavel Kirienko

unread,
Apr 6, 2018, 2:27:17 AM4/6/18
to Erik Rainey, UAVCAN
Erik,

In order to receive all frames from the bus, you should disable acceptance filtering. It is disabled by default.

Pavel.

Erik Rainey

unread,
Apr 6, 2018, 11:24:28 AM4/6/18
to Pavel Kirienko, UAVCAN
Thank you for the clarification!
Reply all
Reply to author
Forward
0 new messages