async def send_heartbeat(self): request = call.HeartbeatPayload() response = await self.call(request) if response.current_time: print("Heartbeat delivered: ", response.current_time) else: print("Heartbeat not delivered")
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" )
async def send_heartbeart(self): """ This contains the field definition of the Heartbeat.req PDU sent by the Charge Point to the Central System. See also Heartbeat No fields are defined. """ request = call.HeartbeatPayload() response = await self.call(request) print(response.current_time)
async def heart_beat(self): request = call.HeartbeatPayload() response = await self.call(request) print("heart beat response is ", response)
async def send_heartbeat(self): """Send a heartbeat.""" request = call.HeartbeatPayload() resp = await self.call(request) assert len(resp.current_time) > 0
def test_create_call_error(): payload = asdict(call_v16.HeartbeatPayload()) call: Call = Call(unique_id=123, action="Heartbeat", payload=payload) message = call.to_json() call_error: str = create_call_error(message) assert type(call_error) is str
async def send_heartbeat(self): request = call.HeartbeatPayload() response = await self.call(request) print("Heartbeat sent")