Message

class eagerx.utils.utils.Msg(info: Info, msgs: List[Any])[source]

A dataclass representing a (windowed) input that is passed to callback().

property info

Info on the received messages in msgs.

property msgs

The received messages with indexing msgs[-1] being the most recent message and msgs[0] the oldest.

class eagerx.utils.utils.Info(name: Optional[str] = None, node_tick: Optional[int] = None, rate_in: Optional[float] = None, t_node: Optional[List[Stamp]] = None, t_in: Optional[List[Stamp]] = None, done: Optional[bool] = None)[source]

A dataclass containing info about the received messages in msgs.

property name

Name of the registered input.

property node_tick

Number of times callback() has been called since the last reset.

property rate_in

Rate (Hz) of the input.

property t_in

Simulated timestamp that states at what time the message was received according to rate_in and seq.

property t_node

Simulated timestamp that states during which cycle the message was received since the last reset according to rate and node_tick.

class eagerx.utils.utils.Stamp(seq: Optional[int] = None, sc: Optional[float] = None, wc: Optional[float] = None)[source]

A dataclass for timestamping received messages.

property sc

Timestamp according to the simulated clock (seconds). This time is scaled by the real-time factor if > 0.

property seq

Sequence number of received message.

property wc

Timestamp according to the wall clock (seconds).