Python wpistruct structarray

crossposting from robotpy in case anyone has any advice?

Hi,

So I have a set of StructArrayTopics identified by a key prefix, and I want to subscribe to updates for all of them, and I’m having trouble figuring out how to do it.

I tried using a NetworkTableListenerPoller with readQueue(), from which I can get ValueEventData and eventually Value.getRaw(), but I can’t find a way to unpack the bytes into the correct array.

Is there a wpistruct array unpacker? or some other way to combine “subscribe to prefix” with “StructArray”?

thanks!

I replied at Trying to create a MultiSubscriber for a StructArrayTopic, help! · robotpy/mostrobotpy · Discussion #106 · GitHub

… but also, when asking python questions here on CD, make sure to add a python tag or post in the technical → Python forum.

1 Like