grepros 1.3.0
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
ConditionMixin.Topic Class Reference
Inheritance diagram for ConditionMixin.Topic:
Inheritance graph

Public Member Functions

 __init__ (self, count, firsts, lasts)
 
 __bool__ (self)
 
 __contains__ (self, item)
 
 __getattr__ (self, name)
 
 __getitem__ (self, key)
 
 __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 293 of file inputs.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  count,
  firsts,
  lasts 
)

Definition at line 305 of file inputs.py.

Member Function Documentation

◆ __bool__()

__bool__ (   self)

Definition at line 310 of file inputs.py.

◆ __contains__()

__contains__ (   self,
  item 
)
Returns whether value exists in last message, or raises NoMessageException.

Definition at line 314 of file inputs.py.

◆ __getattr__()

__getattr__ (   self,
  name 
)
Returns attribute value of last message, or raises NoMessageException.

Definition at line 324 of file inputs.py.

◆ __getitem__()

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

Definition at line 319 of file inputs.py.

◆ __len__()

__len__ (   self)

Definition at line 312 of file inputs.py.

◆ __nonzero__()

__nonzero__ (   self)

Definition at line 311 of file inputs.py.


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