def on_heartbeat(self, **kwargs): """ This contains the field definition of the Heartbeat.conf PDU sent by the Central System to the Charge Point in response to a Heartbeat.req PDU. """ return call_result.HeartbeatPayload( current_time=datetime.utcnow().isoformat())
def on_heartbeat_notification(self, **kwargs): print("on heart beat is", kwargs) # self.export_json_file(kwargs, "./dataFromCp2Server", "Heartbeat.req") response = call_result.HeartbeatPayload( current_time=datetime.utcnow().isoformat()) # self.export_json_file(response.__dict__, "./dataFromCp2Server", "Heartbeat.con") return response
def on_heartbeat(self): """ callback function for when a heartbeat is received """ logger.console("=> Hearbeat") if "Heartbeat" in self.__awaited_msgs: self.__msgq.put(call.HeartbeatPayload()) return call_result.HeartbeatPayload( current_time=datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S') + "Z" )
def heartbeat_notification(self, **kwargs): return call_result.HeartbeatPayload( current_time=datetime.utcnow().isoformat())
def on_heartbeat(self): return call_result.HeartbeatPayload( current_time=datetime.utcnow().isoformat())
async def _on_heartbeat(self, **kwargs) -> call_result.HeartbeatPayload: self._data_object.last_heartbeat = utc_datetime() self._session.commit() return call_result.HeartbeatPayload( current_time=utc_datetime().isoformat())
def heart_beat(self): return call_result.HeartbeatPayload()