async2v.event module¶
Reference¶
-
REGISTER_EVENT= 'async2v.register'¶ Type: str Internal event key. Components to be registered are published as payload on this key.
Don’t use directly - To register a component, use the
registermethod on theApplication.
-
DEREGISTER_EVENT= 'async2v.deregister'¶ Type: str Internal event key. Components to be de-registered are published as payload on this key.
Don’t use directly - To de-register a component, use the
deregistermethod on theApplication.
-
SHUTDOWN_EVENT= 'async2v.shutdown'¶ Type: str Internal event key used to trigger application shutdown.
Don’t use directly - To shutdown, call
shutdownfrom within a component.
-
SHUTDOWN_DUE_TO_ERROR= 'async2v.shutdown_due_to_error'¶ Type: str Internal event key used to trigger application shutdown due to an uncaught exception in one of the components.
Don’t use directly. From a
EventDrivenComponentorIteratingComponent, shutdown can be triggered by raising an exception within the processing logic.
-
OPENCV_FRAME_EVENT= 'async2v.opencv.frame'¶ Type: str Event key to collect debug frames. Push events containing
Framepayload to this key to have them displayed in theOpenCvDebugDisplay.
-
DURATION_EVENT= 'async2v.duration'¶ Type: str Metric events containing
Durationpayload are pushed on this event key by the framework.
-
FPS_EVENT= 'async2v.fps'¶ Type: str Metric events containing
Fpspayload are pushed on this event key by the framework.
-
class
Event(key, value=None, timestamp=None)¶ Bases:
typing.GenericEnvelope for all data passed between components.
The key serves as an address: Events are delivered to all input
fieldsthat listen to the key specified in the event. There is no need to explicitly construct events in production code, as theOutputfield takes care of that.Eventis a generic type, useEvent[T]to denote an event with a value of typeT.Parameters: -
timestamp¶ Type: float Timestamp of the event in seconds since the epoch
-
value¶ Type: T Payload
-