gabrieltool.statemachine.callable_zoo.predicate_zoo package¶
Submodules¶
gabrieltool.statemachine.callable_zoo.predicate_zoo.base module¶
Callable classes for Transition Predicates.
All the classes here should be a callable and return either True/False when called (to indicate whether or not to take a transition). All classes should inherit from CallableBase class and annoate their constructor (if there is one) with the @record_kwargs decorator for proper serialization.
-
class
Always[source]¶ Bases:
gabrieltool.statemachine.callable_zoo.base.CallableBaseAlways take this transition.
Useful for welcome message when the application starts.
-
classmethod
from_json(json_obj)¶ Create a CallableBase class instance from a json object.
Subclasses should overide this class depending on the input type of their constructor.
-
classmethod
-
class
HasObjectClass(class_name)[source]¶ Bases:
gabrieltool.statemachine.callable_zoo.base.CallableBaseCheck if there is an object class in the extracted information of the sensor data.
-
classmethod
from_json(json_obj)¶ Create a CallableBase class instance from a json object.
Subclasses should overide this class depending on the input type of their constructor.
-
classmethod
-
class
HasObjectClassWhileNotOthers(has_classes=None, absent_classes=None)[source]¶ Bases:
gabrieltool.statemachine.callable_zoo.base.CallableBaseCheck if there are some object classes in the extracted information while some other classes are not.
-
classmethod
from_json(json_obj)¶ Create a CallableBase class instance from a json object.
Subclasses should overide this class depending on the input type of their constructor.
-
classmethod
-
class
Wait(wait_time=None)[source]¶ Bases:
gabrieltool.statemachine.callable_zoo.base.CallableBaseWait for some time before turning true.
-
classmethod
from_json(json_obj)¶ Create a CallableBase class instance from a json object.
Subclasses should overide this class depending on the input type of their constructor.
-
classmethod