grepros 1.2.2
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
ConditionMixin.Topic Class Reference

Object for <topic x> replacements in condition expressions. More...

Public Member Functions

 __init__ (self, count, firsts, lasts)
 
 __bool__ (self)
 
 __contains__ (self, item)
 Returns whether value exists in last message, or raises NoMessageException.
 
 __getattr__ (self, name)
 Returns attribute value of last message, or raises NoMessageException.
 
 __getitem__ (self, key)
 Returns message from history at key, or Empty() if no such message.
 
 __len__ (self)
 
 __nonzero__ (self)
 

Detailed Description

Object for <topic x> replacements in condition expressions.

  • len(topic) -> number of messages processed in topic
  • bool(topic) -> whether there are any messages in topic
  • topic[x] -> history at -1 -2 for last and but one, or 0 1 for first and second
  • topic.x -> attribute x of last message
  • value in topic -> whether any field of last message contains value
  • value in topic[x] -> whether any field of topic history at position contains value

Definition at line 306 of file inputs.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  count,
  firsts,
  lasts 
)

Definition at line 308 of file inputs.py.

Member Function Documentation

◆ __bool__()

__bool__ (   self)

Definition at line 313 of file inputs.py.

◆ __contains__()

__contains__ (   self,
  item 
)

Returns whether value exists in last message, or raises NoMessageException.

Definition at line 317 of file inputs.py.

◆ __getattr__()

__getattr__ (   self,
  name 
)

Returns attribute value of last message, or raises NoMessageException.

Definition at line 327 of file inputs.py.

◆ __getitem__()

__getitem__ (   self,
  key 
)

Returns message from history at key, or Empty() if no such message.

Definition at line 322 of file inputs.py.

◆ __len__()

__len__ (   self)

Definition at line 315 of file inputs.py.

◆ __nonzero__()

__nonzero__ (   self)

Definition at line 314 of file inputs.py.


The documentation for this class was generated from the following file: