MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / check_answer

Method check_answer

opcua/client/ua_client.py:87–95  ·  view source on GitHub ↗
(self, data, context)

Source from the content-addressed store, hash-verified

85 return data
86
87 def check_answer(self, data, context):
88 data = data.copy()
89 typeid = nodeid_from_binary(data)
90 if typeid == ua.FourByteNodeId(ua.ObjectIds.ServiceFault_Encoding_DefaultBinary):
91 self.logger.warning("ServiceFault from server received %s", context)
92 hdr = struct_from_binary(ua.ResponseHeader, data)
93 hdr.ServiceResult.check()
94 return False
95 return True
96
97 def _run(self):
98 self.logger.info("Thread started")

Callers 2

send_requestMethod · 0.95

Calls 4

nodeid_from_binaryFunction · 0.90
struct_from_binaryFunction · 0.90
copyMethod · 0.80
checkMethod · 0.80

Tested by

no test coverage detected