flexbe_states.subscriber_state module

class flexbe_states.subscriber_state.SubscriberState(*args: Any, **kwargs: Any)

Bases: EventState

Gets the latest message on the given topic and stores it to userdata.

– topic string The topic on which should be listened. – blocking bool Blocks until a message is received. – clear bool Drops last message on this topic on enter

in order to only handle message received since this state is active.

#> message object Latest message on the given topic of the respective type.

<= received Message has been received and stored in userdata or state is not blocking. <= unavailable The topic is not available when this state becomes actives.

execute(userdata)
on_enter(userdata)