event#
- class besser.agent.core.transition.event.Event(name, session_id=None, timestamp=None)[source]#
Bases:
ABC
The event abstract class.
An agent can receive events through its platforms. An agent can define transitions from one state to another based on the reception of specific events.
This class serves as a template to implement events.
- Parameters:
- _timestamp#
the timestamp indicating the event reception instant
- Type:
datetime
- _abc_impl = <_abc._abc_data object>#
- is_broadcasted()[source]#
Whether the event is broadcasted to all agent sessions or not (i.e., sent to a specific session)
- Returns:
true if the event is broadcasted, false otherwise
- Return type:
- is_matching(event)[source]#
Check whether an event matches another one.
This function can be overridden. Default behavior only checks if the event names are equal.
- log()[source]#
Create a log message for the event.
This function can be overridden. Default message is the event name
- Returns:
the log message
- Return type:
- property timestamp#
The timestamp indicating the event reception instant.
- Type:
datetime