1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <memory>
- #include <string>
- #include "DIOS.Dev.IODevice.hpp"
- #include "DIOS.Dev.IODevice.Detail.hpp"
- #include "Base64.h"
- namespace DIOS::Dev::Detail
- {
- //-----------------------------------------------------------------------------
- // ErrorMessage
- //-----------------------------------------------------------------------------
- namespace AttrKey
- {
- static const char* ErrorList = "ErrorList";
- }
- class MSGUnit
- {
- std::string m_pDevicePath;
- public:
- MSGUnit(std::string strPath);
- virtual ~MSGUnit();
- std::string JSGet();
- std::string GetKey();
- int AddWarnMessage(const char* Code, int& Level, const char* ResInfo, int nSenderID = 0);
- int DelWarnMessage(const char* Code, int& Level, const char* ResInfo);
- int AddErrorMessage(const char* Code, int& Level, const char* ResInfo, int nSenderID = 0);
- int DelErrorMessage(const char* Code, int& Level, const char* ResInfo);
- protected:
- std::string Key{ AttrKey ::ErrorList};
- std::string m_ErrorList{""};
- int AddMessage(const char* Code, int& Level, const char* ResInfo, int nMessageType, int nSenderID);
- int DelMessage(const char* Code, int& Level, const char* ResInfo, int nMessageType);
- };
- }
|