edouard@3884: # edouard@4035: # Generated by erpcgen 1.13.0 on Fri Nov 8 11:06:24 2024. edouard@3884: # edouard@3884: # AUTOGENERATED - DO NOT EDIT edouard@3884: # edouard@3884: edouard@3884: import erpc edouard@3884: from . import common, interface edouard@3884: edouard@3884: # Client for BeremizPLCObjectService edouard@3884: class BeremizPLCObjectServiceClient(interface.IBeremizPLCObjectService): edouard@3884: def __init__(self, manager): edouard@3884: super(BeremizPLCObjectServiceClient, self).__init__() edouard@3884: self._clientManager = manager edouard@3884: edouard@3884: def AppendChunkToBlob(self, data, blobID, newBlobID): edouard@3884: assert type(newBlobID) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.APPENDCHUNKTOBLOB_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if data is None: edouard@3884: raise ValueError("data is None") edouard@3884: codec.write_binary(data) edouard@3884: if blobID is None: edouard@3884: raise ValueError("blobID is None") edouard@3884: codec.write_binary(blobID) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: newBlobID.value = codec.read_binary() edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def GetLogMessage(self, level, msgID, message): edouard@3884: assert type(message) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.GETLOGMESSAGE_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if level is None: edouard@3884: raise ValueError("level is None") edouard@3884: codec.write_uint8(level) edouard@3884: if msgID is None: edouard@3884: raise ValueError("msgID is None") edouard@3884: codec.write_uint32(msgID) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: message.value = common.log_message()._read(codec) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def GetPLCID(self, plcID): edouard@3884: assert type(plcID) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.GETPLCID_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: plcID.value = common.PSKID()._read(codec) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def GetPLCstatus(self, status): edouard@3884: assert type(status) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.GETPLCSTATUS_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: status.value = common.PLCstatus()._read(codec) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def GetTraceVariables(self, debugToken, traces): edouard@3884: assert type(traces) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.GETTRACEVARIABLES_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if debugToken is None: edouard@3884: raise ValueError("debugToken is None") edouard@3884: codec.write_uint32(debugToken) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: traces.value = common.TraceVariables()._read(codec) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def MatchMD5(self, MD5, match): edouard@3884: assert type(match) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.MATCHMD5_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if MD5 is None: edouard@3884: raise ValueError("MD5 is None") edouard@3884: codec.write_string(MD5) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: match.value = codec.read_bool() edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def NewPLC(self, md5sum, plcObjectBlobID, extrafiles, success): edouard@3884: assert type(success) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.NEWPLC_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if md5sum is None: edouard@3884: raise ValueError("md5sum is None") edouard@3884: codec.write_string(md5sum) edouard@3884: if plcObjectBlobID is None: edouard@3884: raise ValueError("plcObjectBlobID is None") edouard@3884: codec.write_binary(plcObjectBlobID) edouard@3884: if extrafiles is None: edouard@3884: raise ValueError("extrafiles is None") edouard@3884: codec.start_write_list(len(extrafiles)) edouard@3884: for _i0 in extrafiles: edouard@3884: _i0._write(codec) edouard@3884: edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: success.value = codec.read_bool() edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def PurgeBlobs(self): edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.PURGEBLOBS_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def RepairPLC(self): edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.REPAIRPLC_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def ResetLogCount(self): edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.RESETLOGCOUNT_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def SeedBlob(self, seed, blobID): edouard@3884: assert type(blobID) is erpc.Reference, "out parameter must be a Reference object" edouard@3884: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.SEEDBLOB_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if seed is None: edouard@3884: raise ValueError("seed is None") edouard@3884: codec.write_binary(seed) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: blobID.value = codec.read_binary() edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3885: def SetTraceVariablesList(self, orders, debugtoken): edouard@3885: assert type(debugtoken) is erpc.Reference, "out parameter must be a Reference object" edouard@3885: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.SETTRACEVARIABLESLIST_ID, edouard@3884: sequence=request.sequence)) edouard@3884: if orders is None: edouard@3884: raise ValueError("orders is None") edouard@3884: codec.start_write_list(len(orders)) edouard@3884: for _i0 in orders: edouard@3884: _i0._write(codec) edouard@3884: edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3941: debugtoken.value = codec.read_int32() edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3884: def StartPLC(self): edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.STARTPLC_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3884: _result = codec.read_uint32() edouard@3884: return _result edouard@3884: edouard@3885: def StopPLC(self, success): edouard@3885: assert type(success) is erpc.Reference, "out parameter must be a Reference object" edouard@3885: edouard@3884: # Build remote function invocation message. edouard@3884: request = self._clientManager.create_request() edouard@3884: codec = request.codec edouard@3884: codec.start_write_message(erpc.codec.MessageInfo( edouard@3884: type=erpc.codec.MessageType.kInvocationMessage, edouard@3884: service=self.SERVICE_ID, edouard@3884: request=self.STOPPLC_ID, edouard@3884: sequence=request.sequence)) edouard@3884: edouard@3884: # Send request and process reply. edouard@3884: self._clientManager.perform_request(request) edouard@3885: success.value = codec.read_bool() edouard@3885: _result = codec.read_uint32() edouard@3885: return _result edouard@3885: edouard@4032: def ExtendedCall(self, method, argument, answer): edouard@4032: assert type(answer) is erpc.Reference, "out parameter must be a Reference object" edouard@4032: edouard@4032: # Build remote function invocation message. edouard@4032: request = self._clientManager.create_request() edouard@4032: codec = request.codec edouard@4032: codec.start_write_message(erpc.codec.MessageInfo( edouard@4032: type=erpc.codec.MessageType.kInvocationMessage, edouard@4032: service=self.SERVICE_ID, edouard@4032: request=self.EXTENDEDCALL_ID, edouard@4032: sequence=request.sequence)) edouard@4032: if method is None: edouard@4032: raise ValueError("method is None") edouard@4032: codec.write_string(method) edouard@4032: if argument is None: edouard@4032: raise ValueError("argument is None") edouard@4032: codec.write_binary(argument) edouard@4032: edouard@4032: # Send request and process reply. edouard@4032: self._clientManager.perform_request(request) edouard@4032: answer.value = codec.read_binary() edouard@4032: _result = codec.read_uint32() edouard@4032: return _result edouard@4032: edouard@4032: