| | |
| | | int nRecipeID; // 子配方ID |
| | | std::string strRecipeName; // 子配方名称 |
| | | std::string strDeviceName; // 设备名称 |
| | | std::vector<uint8_t> paramsRawData; // 配方原始数据 |
| | | std::vector<CParam*> m_params; // 出站时记录参数 |
| | | }; |
| | | |
| | | // 配方信息 |
| | |
| | | std::string strDescription; // 配方描述 |
| | | std::string strCreateTime; // 创建时间 |
| | | std::vector<DeviceRecipe> vecDeviceList; // 关联的设备信息列表 |
| | | std::vector<CParam*> m_params; // 出站时记录参数 |
| | | void RecipeInfo::addIntParam(const char* pszName, const char* pszId, const char* pszUnit, int value) |
| | | { |
| | | CParam* pParam = new CParam(pszName, pszId, pszUnit, value); |
| | | m_params.push_back(pParam); |
| | | } |
| | | |
| | | void RecipeInfo::addDoubleParam(const char* pszName, const char* pszId, const char* pszUnit, double value) |
| | | { |
| | | CParam* pParam = new CParam(pszName, pszId, pszUnit, value); |
| | | m_params.push_back(pParam); |
| | | } |
| | | |
| | | std::vector<CParam*>& RecipeInfo::getParams() |
| | | { |
| | | return m_params; |
| | | } |
| | | }; |
| | | |
| | | using RecipeMap = std::unordered_map<std::string, RecipeInfo>; // 按 PPID 映射的配方表 |