Get union type in python

Hi!

This is rather a simple python question than a pyuavcan question perhaps… But how do I detect the union type of a broadcasted message payload?

Lets say a broadcasted message contains uavcan.protocol.param.Value and the source node has set real_value.

How does the subscriber, inside the callback, parse and detect the type?

/python newbie

I just noticed uavcan.get_active_union_field !!!

=)

1 Like