def _handle_session_event(self, event): event_time = event.time if event_time is not None: event_time = float(event_time) return core_pb2.SessionEvent(node_id=event.node, event=event.event_type, name=event.name, data=event.data, time=event_time, session_id=event.session)
def handle_session_event(event: EventData) -> core_pb2.SessionEvent: """ Handle session event when there is a session event :param event: event data :return: session event """ event_time = event.time if event_time is not None: event_time = float(event_time) return core_pb2.SessionEvent( node_id=event.node, event=event.event_type.value, name=event.name, data=event.data, time=event_time, )
def handle_session_event(event): """ Handle session event when there is a session event :param core.emulator.data.EventData event: event data :return: session event :rtype: core.api.grpc.core_pb2.SessionEvent """ event_time = event.time if event_time is not None: event_time = float(event_time) return core_pb2.SessionEvent( node_id=event.node, event=event.event_type, name=event.name, data=event.data, time=event_time, )