C_runtime/service/erpc_PLCObject_client.hpp
author Edouard Tisserant <edouard@beremiz.fr>
Thu, 05 Dec 2024 13:56:59 +0100
changeset 4060 d2f5eb3c7d6e
parent 4058 5472b88bbc9d
permissions -rw-r--r--
py_ext: fix CSV Writer

fix POU logic :
- SAVE is a BOOL
- invocation of py_eval on rising edge of SAVE
- remove save python argument

fix python:
- use no encoding for file open (python2)
- re-use detected dialect if any
- use no "rt+" and truncate since no need to re-sniff dialect for output file
- return "OK" instead of "#SUCCESS", preventing POU logic to ACK result
- support creating new line if writing just after last line
- support appending data on short rows

fix example:
- use a HMI:Button to trigger CSV write instead of HMI:Input +1
- reload CSVs on on each new CSV opened in file browser
- add display of CSV write output
/*
 * Generated by erpcgen 1.13.0 on Fri Nov 22 15:03:08 2024.
 *
 * AUTOGENERATED - DO NOT EDIT
 */


#if !defined(_erpc_PLCObject_client_hpp_)
#define _erpc_PLCObject_client_hpp_

#include "erpc_PLCObject_interface.hpp"

#include "erpc_client_manager.h"

namespace erpcShim
{

class BeremizPLCObjectService_client: public BeremizPLCObjectService_interface
{
    public:
        BeremizPLCObjectService_client(erpc::ClientManager *manager);

        virtual ~BeremizPLCObjectService_client();

        virtual uint32_t AppendChunkToBlob(const binary_t * data, const binary_t * blobID, binary_t * newBlobID);

        virtual uint32_t GetLogMessage(uint8_t level, uint32_t msgID, log_message * message);

        virtual uint32_t GetPLCID(PSKID * plcID);

        virtual uint32_t GetPLCstatus(PLCstatus * status);

        virtual uint32_t GetTraceVariables(uint32_t debugToken, TraceVariables * traces);

        virtual uint32_t MatchMD5(const char * MD5, bool * match);

        virtual uint32_t NewPLC(const char * md5sum, const binary_t * plcObjectBlobID, const list_extra_file_1_t * extrafiles, bool * success);

        virtual uint32_t PurgeBlobs(void);

        virtual uint32_t RepairPLC(void);

        virtual uint32_t ResetLogCount(void);

        virtual uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);

        virtual uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);

        virtual uint32_t StartPLC(void);

        virtual uint32_t StopPLC(bool * success);

        virtual uint32_t ExtendedCall(const char * method, const binary_t * argument, binary_t * answer);

    protected:
        erpc::ClientManager *m_clientManager;
};

} // erpcShim


#endif // _erpc_PLCObject_client_hpp_