C_runtime/PLCObject.hpp
changeset 3977 2b0f8c4c8d02
parent 3961 f01bd9a40554
equal deleted inserted replaced
3963:38bebb9ee34e 3977:2b0f8c4c8d02
    70         uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);
    70         uint32_t SeedBlob(const binary_t * seed, binary_t * blobID);
    71         uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);
    71         uint32_t SetTraceVariablesList(const list_trace_order_1_t * orders, int32_t * debugtoken);
    72         uint32_t StartPLC(void);
    72         uint32_t StartPLC(void);
    73         uint32_t StopPLC(bool * success);
    73         uint32_t StopPLC(bool * success);
    74 
    74 
       
    75         // Public interface used by runtime
       
    76         uint32_t AutoLoad();
       
    77         uint32_t LogMessage(uint8_t level, std::string message);
       
    78 
    75     private:
    79     private:
    76         // A map of all the blobs
    80         // A map of all the blobs
    77         std::map<std::vector<uint8_t>, Blob*> m_mapBlobIDToBlob;
    81         std::map<std::vector<uint8_t>, Blob*> m_mapBlobIDToBlob;
    78 
    82 
    79         // PLC object library handle
    83         // PLC object library handle
   106         std::mutex m_tracesMutex;
   110         std::mutex m_tracesMutex;
   107 
   111 
   108         // Trace double buffer
   112         // Trace double buffer
   109         std::vector<trace_sample> m_traces;
   113         std::vector<trace_sample> m_traces;
   110 
   114 
   111         uint32_t AutoLoad();
       
   112         uint32_t BlobAsFile(const binary_t * BlobID, std::filesystem::path filename);
   115         uint32_t BlobAsFile(const binary_t * BlobID, std::filesystem::path filename);
   113         uint32_t LoadPLC(void);
   116         uint32_t LoadPLC(void);
   114         uint32_t UnLoadPLC(void);
   117         uint32_t UnLoadPLC(void);
   115         uint32_t LogMessage(uint8_t level, std::string message);
       
   116         uint32_t PurgePLC(void);
   118         uint32_t PurgePLC(void);
   117         void PurgeTraceBuffer(void);
   119         void PurgeTraceBuffer(void);
   118         void TraceThreadProc(void);
   120         void TraceThreadProc(void);
   119 };
   121 };
   120 
   122