diff -r 03df7946c2fa -r b217fb367574 erpc_interface/erpc_PLCObject/server.py --- a/erpc_interface/erpc_PLCObject/server.py Tue Nov 19 23:52:04 2024 +0100 +++ b/erpc_interface/erpc_PLCObject/server.py Fri Nov 22 16:31:51 2024 +0100 @@ -1,5 +1,5 @@ # -# Generated by erpcgen 1.12.0 on Mon May 20 17:53:37 2024. +# Generated by erpcgen 1.13.0 on Fri Nov 8 11:06:24 2024. # # AUTOGENERATED - DO NOT EDIT # @@ -27,6 +27,7 @@ interface.IBeremizPLCObjectService.SETTRACEVARIABLESLIST_ID: self._handle_SetTraceVariablesList, interface.IBeremizPLCObjectService.STARTPLC_ID: self._handle_StartPLC, interface.IBeremizPLCObjectService.STOPPLC_ID: self._handle_StopPLC, + interface.IBeremizPLCObjectService.EXTENDEDCALL_ID: self._handle_ExtendedCall, } def _handle_AppendChunkToBlob(self, sequence, codec): @@ -348,4 +349,29 @@ codec.write_bool(success.value) codec.write_uint32(_result) - + def _handle_ExtendedCall(self, sequence, codec): + # Create reference objects to pass into handler for out/inout parameters. + answer = erpc.Reference() + + # Read incoming parameters. + method = codec.read_string() + argument = codec.read_binary() + + # Invoke user implementation of remote function. + _result = self._handler.ExtendedCall(method, argument, answer) + + # Prepare codec for reply message. + codec.reset() + + # Construct reply message. + codec.start_write_message(erpc.codec.MessageInfo( + type=erpc.codec.MessageType.kReplyMessage, + service=interface.IBeremizPLCObjectService.SERVICE_ID, + request=interface.IBeremizPLCObjectService.EXTENDEDCALL_ID, + sequence=sequence)) + if answer.value is None: + raise ValueError("answer.value is None") + codec.write_binary(answer.value) + codec.write_uint32(_result) + +