bobocep.cep.event.action.BoboEventAction
- class bobocep.cep.event.action.BoboEventAction(event_id, timestamp: int, data: Any, phenomenon_name: str, pattern_name: str, action_name: str, success: bool)[source]
Bases:
BoboEventAn action event.
- __init__(event_id, timestamp: int, data: Any, phenomenon_name: str, pattern_name: str, action_name: str, success: bool)[source]
- Parameters:
event_id – The event ID.
timestamp – The event timestamp.
data – The event data.
phenomenon_name – The phenomenon name.
pattern_name – The pattern name.
action_name – The action name.
success – True if the action was successful; False otherwise.
- Raises:
BoboEventError – If length of phenomenon name is equal to 0.
BoboEventError – If length of pattern name is equal to 0.
BoboEventError – If length of action name is equal to 0.
- property action_name: str
- Returns:
Action name.
- cast(dtype: type) BoboEventAction[source]
- Parameters:
dtype – The type to which the event’s data is cast.
- Returns:
A new BoboEventAction instance with its data cast to dtype and all other properties identical to the original event.
- property data: Any
Get event data.
- property event_id: str
Get event ID.
- static from_json_dict(d: dict) BoboEventAction[source]
- Parameters:
d – A JSON dict representation of the event.
- Returns:
A new instance of the event type.
- static from_json_str(j: str) BoboEventAction[source]
- Parameters:
j – A JSON str representation of the event.
- Returns:
A new instance of the event type.
- property pattern_name: str
- Returns:
Pattern name.
- property phenomenon_name: str
- Returns:
Phenomenon name.
- property success: bool
- Returns:
True if action was executed successfully; False otherwise.
- property timestamp: int
Get event timestamp.