edouard@3884: /* edouard@3884: Written by Edouard TISSERANT (C) 2024 edouard@3884: This file is part of Beremiz runtime and IDE edouard@3884: See COPYING.Runtime and COPYING file for copyrights details. edouard@3884: */ edouard@3884: edouard@3884: program erpc_PLCObject edouard@3884: edouard@3884: struct PSKID { edouard@3884: string ID; edouard@3884: string PSK; edouard@3884: }; edouard@3884: edouard@3884: enum PLCstatus_enum { edouard@3884: Empty edouard@3884: Stopped, edouard@3884: Started, edouard@3884: Broken, edouard@3884: Disconnected edouard@3884: } edouard@3884: edouard@3884: struct PLCstatus { edouard@3884: PLCstatus_enum PLCstatus; edouard@3884: uint32[4] logcounts; edouard@3884: }; edouard@3884: edouard@3884: struct trace_sample { edouard@3884: uint32 tick; edouard@3884: binary TraceBuffer; edouard@3884: }; edouard@3884: edouard@3884: struct TraceVariables { edouard@3884: PLCstatus_enum PLCstatus; edouard@3884: list traces; edouard@3884: }; edouard@3884: edouard@3884: struct extra_file { edouard@3884: string fname; edouard@3884: binary blobID; edouard@3884: }; edouard@3884: edouard@3884: struct trace_order { edouard@3884: uint32 idx; edouard@3884: binary force; edouard@3884: }; edouard@3884: edouard@3884: struct log_message { edouard@3884: string msg; edouard@3884: uint32 tick; edouard@3884: uint32 sec; edouard@3884: uint32 nsec; edouard@3884: }; edouard@3884: edouard@3884: edouard@3884: interface BeremizPLCObjectService { edouard@3884: AppendChunkToBlob(in binary data, in binary blobID, out binary newBlobID) -> uint32 edouard@3884: GetLogMessage(in uint8 level, in uint32 msgID, out log_message message) -> uint32 edouard@3884: GetPLCID(out PSKID plcID) -> uint32 edouard@3884: GetPLCstatus(out PLCstatus status) -> uint32 edouard@3884: GetTraceVariables(in uint32 debugToken, out TraceVariables traces) -> uint32 edouard@3884: MatchMD5(in string MD5, out bool match) -> uint32 edouard@3884: NewPLC(in string md5sum, in binary plcObjectBlobID, in list extrafiles, out bool success) -> uint32 edouard@3884: PurgeBlobs() -> uint32 edouard@3884: RepairPLC() -> uint32 edouard@3884: ResetLogCount() -> uint32 edouard@3884: SeedBlob(in binary seed, out binary blobID) -> uint32 edouard@3941: SetTraceVariablesList(in list orders, out int32 debugtoken) -> uint32 edouard@3884: StartPLC() -> uint32 edouard@3885: StopPLC(out bool success) -> uint32 edouard@4032: ExtendedCall(in string method, in binary argument, out binary answer ) -> uint32 edouard@3884: }