7 changed files with 68 additions and 109 deletions
-
58appsrc/appsetting/project_setting/project_setting.hpp
-
53appsrc/appsetting/project_setting/project_setting_mgr.cpp
-
54appsrc/appsetting/project_setting/project_setting_mgr.hpp
-
2appsrc/baseservice/db/setting_db_dao.cpp
-
2appsrc/service/disinfection_logs_service.cpp
-
2appsrc/service/hardware/base/uint_convert_mgr.cpp
-
6appsrc/service/hardware/base/uint_convert_mgr.hpp
@ -1,58 +0,0 @@ |
|||||
#pragma once
|
|
||||
#include <fstream>
|
|
||||
#include <iostream>
|
|
||||
#include <list>
|
|
||||
#include <map>
|
|
||||
#include <memory>
|
|
||||
#include <mutex>
|
|
||||
#include <set>
|
|
||||
#include <sstream>
|
|
||||
#include <string>
|
|
||||
#include <vector>
|
|
||||
|
|
||||
#include "appbase/appbasedep.hpp"
|
|
||||
#include "appbase/appbean/hardware_component.hpp"
|
|
||||
//
|
|
||||
#include "basic/componentid.hpp"
|
|
||||
#include "basic/gconfig.hpp"
|
|
||||
#include "basic/project_constant.hpp"
|
|
||||
namespace iflytop { |
|
||||
using namespace std; |
|
||||
using namespace transmit_disfection_protocol; |
|
||||
|
|
||||
class ProjectSetting { |
|
||||
THISCLASS(ProjectSetting); |
|
||||
|
|
||||
public: |
|
||||
map<int, ComponentId> m_componentIdMap; |
|
||||
|
|
||||
string projectType = PROJECT_LARGE_SPACE_DM; |
|
||||
int projectTypeInt = klarge_space_disinfection_machine; |
|
||||
|
|
||||
//
|
|
||||
// some properties
|
|
||||
//
|
|
||||
int extSensorNum = 0; |
|
||||
double gpmToSpeedRadio = 0; |
|
||||
|
|
||||
public: |
|
||||
bool isLageSpaceDM() { return projectTypeInt == klarge_space_disinfection_machine; } |
|
||||
bool isSmallSpaceDM() { return projectTypeInt == ksmall_space_disinfection_machine; } |
|
||||
bool isPipeDM() { return projectTypeInt == kpipe_disinfection_machine; } |
|
||||
bool isDrawBarDM() { return projectTypeInt == kdraw_bar_disinfection_box; } |
|
||||
|
|
||||
bool isProjectType(int id) { return id == projectTypeInt; } |
|
||||
bool isProjectType(int id0, int id1) { return id0 == projectTypeInt || id1 == projectTypeInt; } |
|
||||
bool isProjectType(int id0, int id1, int id2) { return id0 == projectTypeInt || id1 == projectTypeInt || id2 == projectTypeInt; } |
|
||||
bool isProjectType(int id0, int id1, int id2, int id3) { return id0 == projectTypeInt || id1 == projectTypeInt || id2 == projectTypeInt || id3 == projectTypeInt; } |
|
||||
|
|
||||
ComponentId getId(HardwareComponent component) { |
|
||||
auto it = m_componentIdMap.find(component); |
|
||||
if (it != m_componentIdMap.end()) { |
|
||||
return it->second; |
|
||||
} |
|
||||
THROW_APP_EXCEPTION(err::kappe_code_error, "ComponentIdMgr::getId: component not found"); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
} // namespace iflytop
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue