From f29a4a75e462ebf343f69b06c73893a730c74678 Mon Sep 17 00:00:00 2001 From: shi_jq Date: Mon, 17 Mar 2025 09:23:17 +0800 Subject: [PATCH] [ref]kbd->iot --- .../AlarmAnalyzeWidget/CAlarmStatistics.cpp | 8 +- .../CCompareQueryThread.cpp | 4 +- .../AlarmAnalyzeWidget/CCompareQueryThread.h | 2 +- .../CStatisticsQueryThread.cpp | 4 +- .../CStatisticsQueryThread.h | 2 +- .../AlarmAnalyzeWidget/CWaveListDialog.cpp | 4 +- .../gui/plugin/AlarmAnalyzeWidget/main.cpp | 4 +- .../AlarmManageWidget/AddObjAlarmDialog.cpp | 2 +- .../AlarmManageWidget/AddObjAlarmDialog.h | 2 +- .../AlarmManageWidget/AlarmManageForm.cpp | 4 +- .../AlarmManageWidget/AlarmManageWidget.cpp | 8 +- .../AlarmManageWidget/AlarmManageWidget.h | 4 +- .../gui/plugin/AlarmManageWidget/AlarmMng.cpp | 20 ++-- .../gui/plugin/AlarmManageWidget/AlarmMng.h | 4 +- .../src/gui/plugin/AlarmManageWidget/main.cpp | 10 +- .../AlarmShieldWidget/CAddShieldDialog.cpp | 8 +- .../plugin/AlarmShieldWidget/CAlarmShield.cpp | 4 +- .../AlarmShieldWidget/CDbInfoManage.cpp | 38 +++--- .../plugin/AlarmShieldWidget/CDbInfoManage.h | 18 +-- .../plugin/AlarmShieldWidget/CHeaderView.cpp | 4 +- .../src/gui/plugin/AlarmShieldWidget/main.cpp | 6 +- .../AlarmStatisWidget/CDataInfoManage.cpp | 62 +++++----- .../AlarmStatisWidget/CDataInfoManage.h | 6 +- .../AlarmStatisWidget/CHisEventManage.cpp | 6 +- .../AlarmStatisWidget/CHisEventManage.h | 4 +- .../plugin/AlarmStatisWidget/CMainWidget.cpp | 10 +- .../plugin/AlarmStatisWidget/CTsdbQuery.cpp | 10 +- .../gui/plugin/AlarmStatisWidget/CTsdbQuery.h | 4 +- .../src/gui/plugin/AlarmStatisWidget/main.cpp | 14 +-- .../AlarmWidget/CAccidentReviewDialog.cpp | 4 +- .../AlarmWidget/CAiAlarmDataCollect.cpp | 34 +++--- .../plugin/AlarmWidget/CAiAlarmDataCollect.h | 20 ++-- .../plugin/AlarmWidget/CAiAlarmDelegate.cpp | 12 +- .../plugin/AlarmWidget/CAiAlarmMsgInfo.cpp | 2 +- .../gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h | 2 +- .../gui/plugin/AlarmWidget/CAlarmBaseData.cpp | 110 ++++++++--------- .../gui/plugin/AlarmWidget/CAlarmBaseData.h | 10 +- .../plugin/AlarmWidget/CAlarmDataCollect.cpp | 38 +++--- .../plugin/AlarmWidget/CAlarmDataCollect.h | 24 ++-- .../gui/plugin/AlarmWidget/CAlarmDelegate.cpp | 12 +- .../plugin/AlarmWidget/CAlarmFilterDialog.cpp | 36 +++--- .../plugin/AlarmWidget/CAlarmFilterDialog.h | 2 +- .../src/gui/plugin/AlarmWidget/CAlarmForm.cpp | 66 +++++------ .../src/gui/plugin/AlarmWidget/CAlarmForm.h | 6 +- .../AlarmWidget/CAlarmInhibitDialog.cpp | 4 +- .../plugin/AlarmWidget/CAlarmItemModel.cpp | 2 +- .../plugin/AlarmWidget/CAlarmMediaPlayer.cpp | 6 +- .../gui/plugin/AlarmWidget/CAlarmMsgInfo.cpp | 2 +- .../gui/plugin/AlarmWidget/CAlarmMsgInfo.h | 2 +- .../plugin/AlarmWidget/CAlarmMsgManage.cpp | 22 ++-- .../gui/plugin/AlarmWidget/CAlarmMsgManage.h | 6 +- .../gui/plugin/AlarmWidget/CAlarmPlugin.cpp | 30 ++--- .../gui/plugin/AlarmWidget/CAlarmSetDlg.cpp | 4 +- .../gui/plugin/AlarmWidget/CAlarmSetMng.cpp | 4 +- .../src/gui/plugin/AlarmWidget/CAlarmSetMng.h | 2 +- .../plugin/AlarmWidget/CAlarmShiledDialog.cpp | 6 +- .../gui/plugin/AlarmWidget/CAlarmWidget.cpp | 10 +- product/src/gui/plugin/AlarmWidget/main.cpp | 10 +- .../gui/plugin/AssetWidget/CAssetDataMng.cpp | 4 +- .../gui/plugin/AssetWidget/CAssetDataMng.h | 2 +- .../gui/plugin/AssetWidget/CAssetDelegate.cpp | 4 +- .../gui/plugin/AssetWidget/CAssetWidget.cpp | 4 +- .../plugin/AssetWidget/CPropertyDialog.cpp | 4 +- .../gui/plugin/AssetWidget/CRecordDialog.cpp | 4 +- .../AssetWidget/CRecordPropertyDialog.cpp | 4 +- product/src/gui/plugin/BIWidget/CBIWidget.cpp | 16 +-- product/src/gui/plugin/BIWidget/CBIWidget.h | 2 +- .../CBreadcrumbNavWidget.cpp | 4 +- .../BreadcrumbNavWidget/CNavInfoManage.cpp | 2 +- .../BriefReportWidget/BriefReportWidget.cpp | 10 +- .../plugin/BriefReportWidget/QueryThread.cpp | 2 +- .../plugin/BriefReportWidget/QueryThread.h | 2 +- .../BTRealDataCollect.cpp | 20 ++-- .../BTRealDataCollect.h | 4 +- .../BusbarTemperatureWidget.cpp | 26 ++-- .../BusbarTemperatureWidget.h | 6 +- .../plugin/BusbarTemperatureWidget/main.cpp | 4 +- .../ButtonGroupWidget/CButtonGroupWidget.cpp | 2 +- .../plugin/ButtonGroupWidget/CJsonReader.cpp | 2 +- .../ChanStatusWidget/CRealDataCollect.cpp | 42 +++---- .../ChanStatusWidget/CRealDataCollect.h | 4 +- .../ChanStatusWidget/ChanStatusWidget.cpp | 16 +-- .../ChanStatusWidget/ChanStatusWidget.h | 2 +- .../src/gui/plugin/ChanStatusWidget/main.cpp | 12 +- .../gui/plugin/ConstCurves/CConstCurves.cpp | 4 +- .../gui/plugin/ConstCurves/CDbInterface.cpp | 2 +- .../src/gui/plugin/ConstCurves/CDbInterface.h | 2 +- .../gui/plugin/ConstCurves/CMessageManage.cpp | 6 +- .../gui/plugin/ConstCurves/CMessageManage.h | 6 +- product/src/gui/plugin/ConstCurves/main.cpp | 14 +-- .../plugin/DataOptWidget/CDataOptWidget.cpp | 16 +-- .../gui/plugin/DataOptWidget/CDataOptWidget.h | 6 +- .../gui/plugin/DataOptWidget/CDataOptWork.cpp | 4 +- .../gui/plugin/DataOptWidget/CDataOptWork.h | 4 +- product/src/gui/plugin/DataOptWidget/main.cpp | 10 +- .../plugin/DevHisDataWidget/CDbInterface.cpp | 10 +- .../plugin/DevHisDataWidget/CDbInterface.h | 4 +- .../DevHisDataWidget/CDevHisDataWidget.cpp | 6 +- .../DevHisDataWidget/CDevHisDataWidget.h | 2 +- .../DevHisDataWidget/CHisDataManage.cpp | 2 +- .../plugin/DevHisDataWidget/CHisDataManage.h | 6 +- .../src/gui/plugin/DevHisDataWidget/main.cpp | 14 +-- .../plugin/DevRealDataWidget/CDbInterface.cpp | 16 +-- .../plugin/DevRealDataWidget/CDbInterface.h | 4 +- .../DevRealDataWidget/CDevRealDataWidget.cpp | 18 +-- .../DevRealDataWidget/CDevRealDataWidget.h | 8 +- .../DevRealDataWidget/CRealDataCollect.cpp | 18 +-- .../DevRealDataWidget/CRealDataCollect.h | 4 +- .../src/gui/plugin/DevRealDataWidget/main.cpp | 10 +- .../DevSpePointWidget/CDevSpePointWidget.cpp | 52 ++++---- .../DevSpePointWidget/CDevSpePointWidget.h | 16 +-- .../DevSpePointWidget/CRealDataCollect.cpp | 20 ++-- .../DevSpePointWidget/CRealDataCollect.h | 4 +- .../DevSpePointWidget/CRealTableModel.cpp | 12 +- .../DocumentManageWidget/CDocComManage.h | 4 +- .../CDocumentManageWidget.cpp | 4 +- .../EventWidget/CAccidentReviewDialog.cpp | 4 +- .../plugin/EventWidget/CEventDataCollect.cpp | 112 +++++++++--------- .../plugin/EventWidget/CEventDataCollect.h | 12 +- .../gui/plugin/EventWidget/CEventDelegate.cpp | 18 +-- .../plugin/EventWidget/CEventFilterDialog.cpp | 32 ++--- .../plugin/EventWidget/CEventFilterDialog.h | 2 +- .../src/gui/plugin/EventWidget/CEventForm.cpp | 6 +- .../plugin/EventWidget/CEventHisThread.cpp | 12 +- .../gui/plugin/EventWidget/CEventHisThread.h | 4 +- .../plugin/EventWidget/CEventHistoryModel.cpp | 14 +-- .../gui/plugin/EventWidget/CEventMsgInfo.cpp | 2 +- .../gui/plugin/EventWidget/CEventMsgInfo.h | 2 +- product/src/gui/plugin/EventWidget/main.cpp | 16 +-- .../CFaultRecallRecordWidget.cpp | 22 ++-- .../CFaultRecallRecordWidget.h | 4 +- .../plugin/FaultRecallRecordWidget/main.cpp | 10 +- .../FaultRecordWidget/FaultRecordWidget.cpp | 18 +-- .../FaultRecordWidget/FaultRecordWidget.h | 2 +- .../HangPanelWidget/CHangPanelWidget.cpp | 14 +-- .../plugin/HangPanelWidget/CHangPanelWidget.h | 6 +- .../plugin/HangPanelWidget/CHangPanelWork.cpp | 4 +- .../plugin/HangPanelWidget/CHangPanelWork.h | 4 +- .../src/gui/plugin/HangPanelWidget/main.cpp | 10 +- .../plugin/HmiRollWidget/CHmiRollWidget.cpp | 4 +- .../HtmlBrowserWidget/CBrowserWidget.cpp | 36 +++--- .../plugin/HtmlBrowserWidget/CBrowserWidget.h | 6 +- .../ISCSAlarmWidget/CAiAlarmDataCollect.cpp | 34 +++--- .../ISCSAlarmWidget/CAiAlarmDataCollect.h | 20 ++-- .../ISCSAlarmWidget/CAiAlarmDelegate.cpp | 6 +- .../ISCSAlarmWidget/CAiAlarmMsgInfo.cpp | 2 +- .../plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.h | 2 +- .../ISCSAlarmWidget/CAlarmDataCollect.cpp | 36 +++--- .../ISCSAlarmWidget/CAlarmDataCollect.h | 22 ++-- .../plugin/ISCSAlarmWidget/CAlarmDelegate.cpp | 4 +- .../ISCSAlarmWidget/CAlarmFilterDialog.cpp | 36 +++--- .../ISCSAlarmWidget/CAlarmFilterDialog.h | 2 +- .../gui/plugin/ISCSAlarmWidget/CAlarmForm.cpp | 62 +++++----- .../ISCSAlarmWidget/CAlarmInhibitDialog.cpp | 4 +- .../ISCSAlarmWidget/CAlarmItemModel.cpp | 66 +++++------ .../plugin/ISCSAlarmWidget/CAlarmItemModel.h | 2 +- .../ISCSAlarmWidget/CAlarmMediaPlayer.cpp | 4 +- .../plugin/ISCSAlarmWidget/CAlarmMsgInfo.cpp | 2 +- .../plugin/ISCSAlarmWidget/CAlarmMsgInfo.h | 2 +- .../ISCSAlarmWidget/CAlarmMsgManage.cpp | 86 +++++++------- .../plugin/ISCSAlarmWidget/CAlarmMsgManage.h | 12 +- .../plugin/ISCSAlarmWidget/CAlarmPlugin.cpp | 28 ++--- .../plugin/ISCSAlarmWidget/CAlarmWidget.cpp | 10 +- .../src/gui/plugin/ISCSAlarmWidget/main.cpp | 10 +- .../ISCSEventWidget/CEventDataCollect.cpp | 90 +++++++------- .../ISCSEventWidget/CEventDataCollect.h | 12 +- .../ISCSEventWidget/CEventFilterDialog.cpp | 32 ++--- .../ISCSEventWidget/CEventFilterDialog.h | 2 +- .../gui/plugin/ISCSEventWidget/CEventForm.cpp | 4 +- .../ISCSEventWidget/CEventHistoryModel.cpp | 14 +-- .../plugin/ISCSEventWidget/CEventMsgInfo.cpp | 2 +- .../plugin/ISCSEventWidget/CEventMsgInfo.h | 2 +- .../src/gui/plugin/ISCSEventWidget/main.cpp | 16 +-- .../plugin/ISCSTrendCurves/CHisDataManage.cpp | 14 +-- .../plugin/ISCSTrendCurves/CHisDataManage.h | 38 +++--- .../ISCSTrendCurves/CHisEventManage.cpp | 2 +- .../plugin/ISCSTrendCurves/CHisEventManage.h | 2 +- .../plugin/ISCSTrendCurves/CPlotWidget.cpp | 22 ++-- .../gui/plugin/ISCSTrendCurves/CPlotWidget.h | 30 ++--- .../ISCSTrendCurves/CRealTimeDataCollect.cpp | 22 ++-- .../ISCSTrendCurves/CRealTimeDataCollect.h | 2 +- .../ISCSTrendCurves/CTrendEditDialog.cpp | 2 +- .../ISCSTrendCurves/CTrendFavTreeWidget.cpp | 8 +- .../ISCSTrendCurves/CTrendInfoManage.cpp | 30 ++--- .../plugin/ISCSTrendCurves/CTrendInfoManage.h | 4 +- .../plugin/ISCSTrendCurves/CTrendWindow.cpp | 4 +- .../src/gui/plugin/ISCSTrendCurves/main.cpp | 14 +-- .../InverseTimeLimit/inversetimelimit.cpp | 2 +- .../plugin/IpcPlusWidget/CRdbAccessUtilty.cpp | 16 +-- .../plugin/IpcPlusWidget/CRdbAccessUtilty.h | 2 +- .../plugin/IpcPlusWidget/IpcPlusWidget.cpp | 6 +- .../gui/plugin/IpcPlusWidget/IpcPlusWidget.h | 2 +- product/src/gui/plugin/IpcPlusWidget/main.cpp | 8 +- .../IpcViewerWidget/cipcviewermsgbusmng.cpp | 2 +- .../IpcViewerWidget/cipcviewermsgbusmng.h | 2 +- .../IpcViewerWidget/crdbaccessutilty.cpp | 16 +-- .../plugin/IpcViewerWidget/crdbaccessutilty.h | 2 +- .../IpcViewerWidget/ipcviewerwidget.cpp | 4 +- .../src/gui/plugin/IpcViewerWidget/main.cpp | 4 +- .../gui/plugin/IpcWallWidget/VideoWall.cpp | 6 +- .../src/gui/plugin/IpcWallWidget/VideoWall.h | 2 +- product/src/gui/plugin/IpcWallWidget/main.cpp | 8 +- .../plugin/LimitOptWidget/CLimitOptWidget.cpp | 24 ++-- .../plugin/LimitOptWidget/CLimitOptWidget.h | 6 +- .../plugin/LimitOptWidget/CLimitOptWork.cpp | 18 +-- .../gui/plugin/LimitOptWidget/CLimitOptWork.h | 8 +- .../LinkCtrlWidget/CLinkCtrlDataManage.cpp | 30 ++--- .../LinkCtrlWidget/CLinkCtrlDataManage.h | 16 +-- .../LinkCtrlWidget/CLinkCtrlMessageHandle.cpp | 8 +- .../LinkCtrlWidget/CLinkCtrlMessageHandle.h | 14 +-- .../LinkCtrlWidget/CLinkCtrlStateManage.cpp | 42 +++---- .../LinkCtrlWidget/CLinkCtrlStateManage.h | 2 +- .../plugin/LinkCtrlWidget/CLinkCtrlWidget.cpp | 52 ++++---- .../plugin/LinkCtrlWidget/CLinkCtrlWidget.h | 8 +- .../LinkCtrlWidget/CLinkDBInterface.cpp | 64 +++++----- .../plugin/LinkCtrlWidget/CLinkDBInterface.h | 6 +- .../LinkCtrlWidget/CLinkageForHmiApi.cpp | 2 +- .../LinkCtrlWidget/CLinkageForHmiApiImpl.cpp | 18 +-- .../LinkCtrlWidget/CLinkageForHmiApiImpl.h | 16 +-- .../src/gui/plugin/LinkCtrlWidget/main.cpp | 8 +- .../gui/plugin/MediaWidget/CMediaWidget.cpp | 4 +- product/src/gui/plugin/MediaWidget/main.cpp | 4 +- .../CNavigationConfigDialog.cpp | 4 +- .../NavigationWidget/CNavigationWidget.cpp | 10 +- .../OrderManageWidget/COperationOrderForm.cpp | 2 +- .../OrderManageWidget/COrderManageWidget.cpp | 6 +- .../plugin/OrderManageWidget/CSqlDbCtrl.cpp | 6 +- .../gui/plugin/OrderManageWidget/CSqlDbCtrl.h | 2 +- .../plugin/OrderManageWidget/Mainwindow.cpp | 4 +- .../src/gui/plugin/OrderManageWidget/main.cpp | 10 +- .../PointLockWidget/CDbInterfaceMng.cpp | 14 +-- .../plugin/PointLockWidget/CDbInterfaceMng.h | 4 +- .../PointLockWidget/CPointLockWidget.cpp | 4 +- .../PointRealDataWidget/CDbInterface.cpp | 8 +- .../plugin/PointRealDataWidget/CDbInterface.h | 6 +- .../CPointRealDataWidget.cpp | 2 +- .../CPointRealDataWidget.h | 2 +- .../PointRealDataWidget/CRealDataCollect.cpp | 20 ++-- .../PointRealDataWidget/CRealDataCollect.h | 4 +- .../gui/plugin/PointRealDataWidget/main.cpp | 4 +- .../PointsLockWidget/CDbInterfaceMng.cpp | 14 +-- .../plugin/PointsLockWidget/CDbInterfaceMng.h | 4 +- .../PointsLockWidget/PointsLockWidget.cpp | 4 +- .../gui/plugin/RelaySettingWidget/CDbMng.cpp | 10 +- .../gui/plugin/RelaySettingWidget/CDbMng.h | 4 +- .../CRelaySettingMsgMng.cpp | 8 +- .../RelaySettingWidget/CRelaySettingMsgMng.h | 8 +- .../CRelaySettingWidget.cpp | 6 +- .../RelaySettingWidget/CRelaySettingWidget.h | 8 +- .../gui/plugin/RelaySettingWidget/main.cpp | 10 +- .../src/gui/plugin/ReportApp/CReportWidget.h | 4 +- product/src/gui/plugin/ReportApp/main.cpp | 2 +- .../gui/plugin/ReportWidget/CReportWidget.cpp | 44 +++---- .../gui/plugin/ReportWidget/CReportWidget.h | 8 +- .../RobotCtrlWidget/CRobotCtrlWidget.cpp | 16 +-- .../plugin/RobotCtrlWidget/CRobotCtrlWidget.h | 12 +- .../RobotCtrlWidget/CRobotFileCollect.cpp | 4 +- .../plugin/RobotCtrlWidget/CRobotWidget.cpp | 4 +- .../RobotCtrlWidget/OnTimeQueryThread.cpp | 2 +- .../RobotCtrlWidget/OnTimeQueryThread.h | 2 +- .../plugin/RobotCtrlWidget/SWitchButton.cpp | 6 +- .../gui/plugin/RobotCtrlWidget/SWitchButton.h | 4 +- .../src/gui/plugin/RobotCtrlWidget/main.cpp | 8 +- .../plugin/RobotWidget/CRobotCtrlWidget.cpp | 16 +-- .../gui/plugin/RobotWidget/CRobotCtrlWidget.h | 12 +- .../plugin/RobotWidget/CRobotFileCollect.cpp | 4 +- .../gui/plugin/RobotWidget/CRobotWidget.cpp | 4 +- .../plugin/RobotWidget/OnTimeQueryThread.cpp | 2 +- .../plugin/RobotWidget/OnTimeQueryThread.h | 2 +- .../plugin/RobotWidget/OnTimeRecvThread.cpp | 22 ++-- .../gui/plugin/RobotWidget/OnTimeRecvThread.h | 4 +- product/src/gui/plugin/RobotWidget/main.cpp | 8 +- .../ScheduleWidget/CDutyDefineDialog.cpp | 10 +- .../plugin/ScheduleWidget/CDutySetting.cpp | 18 +-- .../gui/plugin/ScheduleWidget/CDutySetting.h | 6 +- .../src/gui/plugin/ScheduleWidget/main.cpp | 8 +- .../CSequenceDBInterface.cpp | 64 +++++----- .../CSequenceDBInterface.h | 8 +- .../CSequenceManageWidget.cpp | 8 +- .../CSequenceManageWidget.h | 2 +- .../gui/plugin/SequenceManageWidget/main.cpp | 8 +- .../plugin/SequenceWidget/CSeqForHmiApi.cpp | 4 +- .../SequenceWidget/CSeqForHmiApiImpl.cpp | 18 +-- .../plugin/SequenceWidget/CSeqForHmiApiImpl.h | 16 +-- .../plugin/SequenceWidget/CSeqPermDialog.cpp | 2 +- .../plugin/SequenceWidget/CSeqPermDialog.h | 2 +- .../SequenceWidget/CSequenceDataManage.cpp | 38 +++--- .../SequenceWidget/CSequenceDataManage.h | 14 +-- .../SequenceWidget/CSequenceMsgHandle.cpp | 6 +- .../SequenceWidget/CSequenceMsgHandle.h | 12 +- .../SequenceWidget/CSequenceStateManage.cpp | 40 +++---- .../SequenceWidget/CSequenceStateManage.h | 10 +- .../plugin/SequenceWidget/CSequenceWidget.cpp | 98 +++++++-------- .../plugin/SequenceWidget/CSequenceWidget.h | 10 +- .../src/gui/plugin/SequenceWidget/main.cpp | 10 +- .../SerialDevStatusWidget/CDataManage.cpp | 16 +-- .../SerialDevStatusWidget/CDataManage.h | 10 +- .../CRealDataCollect.cpp | 42 +++---- .../SerialDevStatusWidget/CRealDataCollect.h | 4 +- .../CSerialDevStatusWidget.cpp | 6 +- .../CSerialDevStatusWidget.h | 2 +- .../gui/plugin/SerialDevStatusWidget/main.cpp | 12 +- .../gui/plugin/ShiftWidget/CRecordWidget.cpp | 2 +- .../gui/plugin/ShiftWidget/CRecordWidget.h | 6 +- .../gui/plugin/ShiftWidget/CShiftWidget.cpp | 10 +- .../src/gui/plugin/ShiftWidget/CShiftWidget.h | 4 +- .../gui/plugin/ShiftWidget/HandoverWidget.cpp | 8 +- .../gui/plugin/ShiftWidget/HandoverWidget.h | 8 +- .../gui/plugin/ShiftWidget/QueryThread.cpp | 4 +- .../src/gui/plugin/ShiftWidget/QueryThread.h | 2 +- .../plugin/ShiftWidget/SelectGroupWidget.cpp | 2 +- .../plugin/ShiftWidget/SelectGroupWidget.h | 6 +- .../gui/plugin/SimOptWidget/CSimOptWidget.cpp | 16 +-- product/src/gui/plugin/SimOptWidget/main.cpp | 10 +- .../TelBookWidget/CRelaySettingMsgMng.cpp | 8 +- .../TelBookWidget/CRelaySettingMsgMng.h | 8 +- .../plugin/TelBookWidget/CTelBookWidget.cpp | 4 +- .../gui/plugin/TelBookWidget/CTelBookWidget.h | 4 +- product/src/gui/plugin/TelBookWidget/main.cpp | 10 +- .../gui/plugin/TrendCurves/CHisDataManage.cpp | 18 +-- .../gui/plugin/TrendCurves/CHisDataManage.h | 46 +++---- .../gui/plugin/TrendCurves/CHisEventManage.h | 2 +- .../gui/plugin/TrendCurves/CPlotWidget.cpp | 44 +++---- .../src/gui/plugin/TrendCurves/CPlotWidget.h | 46 +++---- .../TrendCurves/CRealTimeDataCollect.cpp | 22 ++-- .../plugin/TrendCurves/CRealTimeDataCollect.h | 2 +- .../plugin/TrendCurves/CTrendEditDialog.cpp | 2 +- .../TrendCurves/CTrendFavTreeWidget.cpp | 8 +- .../plugin/TrendCurves/CTrendInfoManage.cpp | 38 +++--- .../gui/plugin/TrendCurves/CTrendInfoManage.h | 10 +- .../gui/plugin/TrendCurves/CTrendWindow.cpp | 6 +- product/src/gui/plugin/TrendCurves/main.cpp | 14 +-- .../UserManageWidget/UserManageWidget.cpp | 6 +- .../UserManageWidget/UserManageWidget.h | 2 +- .../src/gui/plugin/UserManageWidget/main.cpp | 10 +- .../WaveAnalyzeWidget/CFileTableWidget.cpp | 4 +- .../WaveAnalyzeWidget/CWaveAnalyzeWidget.cpp | 4 +- .../WebBrowserWidget/CBiCookieManage.cpp | 24 ++-- .../plugin/WebBrowserWidget/CBiCookieManage.h | 4 +- .../plugin/WebBrowserWidget/CBiTabWidget.cpp | 2 +- .../WebBrowserWidget/CBrowserWidget.cpp | 4 +- .../WebBrowserWidget/CEnergyTabWidget.cpp | 2 +- .../src/gui/plugin/WebBrowserWidget/main.cpp | 10 +- .../plugin/WorkTicket/CWorkTicketManage.cpp | 6 +- .../plugin/WorkTicket/WorkTicketWidget.cpp | 6 +- .../gui/plugin/WorkTicket/WorkTicketWidget.h | 8 +- .../gui/plugin/iDongOpsWidget/CCfgParser.cpp | 4 +- .../gui/plugin/iDongOpsWidget/CCfgParser.h | 4 +- .../plugin/iDongOpsWidget/CReportWidget.cpp | 42 +++---- .../gui/plugin/iDongOpsWidget/CReportWidget.h | 10 +- 350 files changed, 2154 insertions(+), 2154 deletions(-) diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CAlarmStatistics.cpp b/product/src/gui/plugin/AlarmAnalyzeWidget/CAlarmStatistics.cpp index e68cc996..8de243bf 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CAlarmStatistics.cpp +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CAlarmStatistics.cpp @@ -3,8 +3,8 @@ #include "pub_utility_api/I18N.h" #include "pub_utility_api/FileStyle.h" -using namespace kbd_public; -using namespace kbd_dbms; +using namespace iot_public; +using namespace iot_dbms; //#ff0000 255,0,0 //#ff7414 255,116,20 @@ -24,7 +24,7 @@ CAlarmStatistics::CAlarmStatistics(QWidget *parent,bool editMode) : ui->comboBox_location->setView(new QListView()); // 加载qss文件 QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -38,7 +38,7 @@ CAlarmStatistics::CAlarmStatistics(QWidget *parent,bool editMode) : qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm_statistics.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm_statistics.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.cpp b/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.cpp index 2dadb1f9..b0c46cae 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.cpp +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.cpp @@ -1,7 +1,7 @@ #include "CCompareQueryThread.h" -using namespace kbd_public; -using namespace kbd_dbms; +using namespace iot_public; +using namespace iot_dbms; CCompareQueryThread::CCompareQueryThread() { diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.h b/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.h index fec33c2c..e53b7898 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.h +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CCompareQueryThread.h @@ -46,7 +46,7 @@ public: int getAlarmLevelIndexById( int nId, SAlarmLevel* &pAlarmLevel ); public: - kbd_dbms::CDbApi* m_pDb; // 数据库接口 + iot_dbms::CDbApi* m_pDb; // 数据库接口 CAlarmModel* m_pAlarmModel; // 详细告警信息显示窗的model QList m_listAlarmLevelColor; // 告警优先级的颜色集合 QList m_listAlarmLevel; // 告警级别列表 diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.cpp b/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.cpp index fd4a1c3d..1de844d5 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.cpp +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.cpp @@ -1,7 +1,7 @@ #include "CStatisticsQueryThread.h" -using namespace kbd_public; -using namespace kbd_dbms; +using namespace iot_public; +using namespace iot_dbms; CStatisticsQueryThread::CStatisticsQueryThread() { diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.h b/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.h index f9d0250f..ec65f259 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.h +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CStatisticsQueryThread.h @@ -37,7 +37,7 @@ public: void getWavePath( QString sAppTagName, QString& sPath, QString& sErrorMsg ); public: - kbd_dbms::CDbApi* m_pDb; // 数据库接口 + iot_dbms::CDbApi* m_pDb; // 数据库接口 CAlarmModel* m_pAlarmModel; // 详细告警信息显示窗的model QList m_listAlarmLevelColor; // 告警优先级的颜色集合 QList m_listAlarmLevel; // 告警级别列表 diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/CWaveListDialog.cpp b/product/src/gui/plugin/AlarmAnalyzeWidget/CWaveListDialog.cpp index 14d8c868..58bfe6b2 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/CWaveListDialog.cpp +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/CWaveListDialog.cpp @@ -33,8 +33,8 @@ void CWaveListDialog::addFileNameList( QString sPath, QStringList listName ) void CWaveListDialog::slotShowWave( QListWidgetItem* pItem ) { - const std::string strPath = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strPath = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strPath.empty()) { LOGERROR("未找到可执行文件WaveAnalyze"); diff --git a/product/src/gui/plugin/AlarmAnalyzeWidget/main.cpp b/product/src/gui/plugin/AlarmAnalyzeWidget/main.cpp index 15c6adb3..608529fb 100644 --- a/product/src/gui/plugin/AlarmAnalyzeWidget/main.cpp +++ b/product/src/gui/plugin/AlarmAnalyzeWidget/main.cpp @@ -6,12 +6,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem( "BASE", "alarm_statistics" ); + iot_public::StartLogSystem( "BASE", "alarm_statistics" ); CAlarmStatistics w( 0, false ); w.show(); int nRet = a.exec(); - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); return nRet; } diff --git a/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.cpp b/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.cpp index 47bc84ad..532ac516 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.cpp +++ b/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.cpp @@ -98,7 +98,7 @@ void AddObjAlarmDialog::initMember() { if(m_pWriteDb == NULL) { - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); } if(m_model == NULL) diff --git a/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.h b/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.h index 984bfc85..73f060f7 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.h +++ b/product/src/gui/plugin/AlarmManageWidget/AddObjAlarmDialog.h @@ -69,7 +69,7 @@ private slots: private: Ui::AddObjAlarmDialog *ui; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pWriteDb; QMap m_alarmActionCheckMap;//选中的告警动作 diff --git a/product/src/gui/plugin/AlarmManageWidget/AlarmManageForm.cpp b/product/src/gui/plugin/AlarmManageWidget/AlarmManageForm.cpp index d5d832af..e45883d7 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AlarmManageForm.cpp +++ b/product/src/gui/plugin/AlarmManageWidget/AlarmManageForm.cpp @@ -16,7 +16,7 @@ AlarmManageForm::AlarmManageForm(QWidget *parent,bool edit) : ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -30,7 +30,7 @@ AlarmManageForm::AlarmManageForm(QWidget *parent,bool edit) : qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarmmng.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarmmng.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.cpp b/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.cpp index b7312e86..e94d8892 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.cpp +++ b/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.cpp @@ -52,7 +52,7 @@ AlarmManageWidget::AlarmManageWidget(QWidget *parent, bool editMode) : initView(); m_pThread->start(); } - QDir dir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir dir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); dir.cdUp(); dir.cdUp(); dir.cd("data"); @@ -86,8 +86,8 @@ void AlarmManageWidget::initMember() } AlarmMng::instance()->moveToThread(m_pThread); - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pWriteDb->open()) { LOGERROR("打开数据库失败,error:%s",m_pWriteDb->getLastErrorString().toStdString().c_str()); @@ -202,7 +202,7 @@ bool AlarmManageWidget::initCurUser() { m_userId = -1; m_usergId = -1; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); diff --git a/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.h b/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.h index f53dd394..4d16b937 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.h +++ b/product/src/gui/plugin/AlarmManageWidget/AlarmManageWidget.h @@ -126,8 +126,8 @@ private: QMap m_alarmLevelIndexMap; - kbd_dbms::CDbApi *m_pReadDb; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pWriteDb; int m_userId; int m_usergId; diff --git a/product/src/gui/plugin/AlarmManageWidget/AlarmMng.cpp b/product/src/gui/plugin/AlarmManageWidget/AlarmMng.cpp index ea15bc3d..a1ed277d 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AlarmMng.cpp +++ b/product/src/gui/plugin/AlarmManageWidget/AlarmMng.cpp @@ -6,8 +6,8 @@ #include #include -using namespace kbd_dbms; -using namespace kbd_public; +using namespace iot_dbms; +using namespace iot_public; using namespace std; AlarmMng *AlarmMng::pInstance = NULL; @@ -249,7 +249,7 @@ QList AlarmMng::getDiText() bool AlarmMng::getNomRptEditPerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -278,12 +278,12 @@ AlarmMng::AlarmMng() { mutex = new QMutex; - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { LOGERROR("打开数据库失败,error:%s",m_pReadDb->getLastErrorString().toStdString().c_str()); } - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); loadLocInfo(); loadDevgInfo(); loadDevInfo(); @@ -298,7 +298,7 @@ AlarmMng::AlarmMng() void AlarmMng::loadLocInfo() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -320,8 +320,8 @@ void AlarmMng::loadLocInfo() id_value.second = "description"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back(id_value.first); columns.push_back(id_value.second); @@ -332,8 +332,8 @@ void AlarmMng::loadLocInfo() m_locMap.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); diff --git a/product/src/gui/plugin/AlarmManageWidget/AlarmMng.h b/product/src/gui/plugin/AlarmManageWidget/AlarmMng.h index 208ff2fa..cf7e8e11 100644 --- a/product/src/gui/plugin/AlarmManageWidget/AlarmMng.h +++ b/product/src/gui/plugin/AlarmManageWidget/AlarmMng.h @@ -119,9 +119,9 @@ private: static AlarmMng * pInstance; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_locMap; //<车站ID,车站描述> QMap m_devgMap; //<设备组标签,设备组描述> QMap m_devMap; //<设备标签,设备描述> diff --git a/product/src/gui/plugin/AlarmManageWidget/main.cpp b/product/src/gui/plugin/AlarmManageWidget/main.cpp index 25a22048..51043f01 100644 --- a/product/src/gui/plugin/AlarmManageWidget/main.cpp +++ b/product/src/gui/plugin/AlarmManageWidget/main.cpp @@ -9,12 +9,12 @@ int main(int argc, char *argv[]) std::string name="admin"; std::string password ="kbdct"; - kbd_public::StartLogSystem("HMI", "hmi"); + iot_public::StartLogSystem("HMI", "hmi"); - kbd_net::initMsgBus("HMI", "HMI"); + iot_net::initMsgBus("HMI", "HMI"); int group =1; - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -29,9 +29,9 @@ int main(int argc, char *argv[]) w.show(); a.exec(); } - kbd_net::releaseMsgBus(); + iot_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/AlarmShieldWidget/CAddShieldDialog.cpp b/product/src/gui/plugin/AlarmShieldWidget/CAddShieldDialog.cpp index 889c2aea..3def149c 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/CAddShieldDialog.cpp +++ b/product/src/gui/plugin/AlarmShieldWidget/CAddShieldDialog.cpp @@ -498,7 +498,7 @@ int CAddShieldDialog::getMonthOption() bool CAddShieldDialog::getCurUser(int &userId, int &usergId, QString &hostName, int &locationId) { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -514,9 +514,9 @@ bool CAddShieldDialog::getCurUser(int &userId, int &usergId, QString &hostName, LOGERROR("获取当前登录用户失败!"); return false; } - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return false; diff --git a/product/src/gui/plugin/AlarmShieldWidget/CAlarmShield.cpp b/product/src/gui/plugin/AlarmShieldWidget/CAlarmShield.cpp index 851856de..ada10da3 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/CAlarmShield.cpp +++ b/product/src/gui/plugin/AlarmShieldWidget/CAlarmShield.cpp @@ -21,7 +21,7 @@ CAlarmShield::CAlarmShield(QWidget *parent, bool editMode) : if(!editMode) { QString style = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile file1(QString::fromStdString(strFullPath)); if (file1.open(QIODevice::ReadOnly)) { @@ -31,7 +31,7 @@ CAlarmShield::CAlarmShield(QWidget *parent, bool editMode) : } file1.close(); - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarmShield.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarmShield.qss") ; QFile file2(QString::fromStdString(strFullPath)); if (file2.open(QIODevice::ReadOnly)) { diff --git a/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.cpp b/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.cpp index 2470f8bc..b2557297 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.cpp +++ b/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.cpp @@ -150,7 +150,7 @@ QMap CDbInfoManage::getShieldPropMap() bool CDbInfoManage::loadShieldObj(const int &shieldId, QList &objList) { - kbd_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); bool ret = objReadDb.open(); if(!ret) { @@ -188,7 +188,7 @@ bool CDbInfoManage::loadShieldObj(const int &shieldId, QList &obj bool CDbInfoManage::loadShieldObj(const QStringList &objList, QMap > &objMap) { - kbd_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); bool ret = objReadDb.open(); if(!ret) { @@ -232,7 +232,7 @@ bool CDbInfoManage::loadShieldObj(const QStringList &objList, QMap &objList, QList &infoList) { - kbd_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); bool ret = objReadDb.open(); if(!ret) { @@ -820,13 +820,13 @@ bool CDbInfoManage::checkOptPerm(const std::vector &vecRegionOptId, const s CDbInfoManage::CDbInfoManage() { initPermMng(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_rtdbAccess = new iot_dbms::CRdbAccess(); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); // m_tagInfo.reserve(5000); - kbd_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); bool ret = objReadDb.open(); if(!ret) { @@ -845,7 +845,7 @@ CDbInfoManage::CDbInfoManage() void CDbInfoManage::initPermMng() { - m_ptrPermMng = kbd_service::getPermMngInstance("base"); + m_ptrPermMng = iot_service::getPermMngInstance("base"); if(m_ptrPermMng == NULL || (PERM_NORMAL != m_ptrPermMng->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -892,8 +892,8 @@ void CDbInfoManage::loadRTLocation() std::string strTableName = "sys_model_location_info"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("tag_name"); @@ -906,9 +906,9 @@ void CDbInfoManage::loadRTLocation() m_locationTag.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType location_id; - kbd_dbms::CVarType tag_name; - kbd_dbms::CVarType description; + iot_dbms::CVarType location_id; + iot_dbms::CVarType tag_name; + iot_dbms::CVarType description; result.getColumnValue(nIndex, 0, location_id); result.getColumnValue(nIndex, 1, tag_name); result.getColumnValue(nIndex, 2, description); @@ -930,7 +930,7 @@ void CDbInfoManage::loadRTLocation() m_rtdbAccess->close(); } -void CDbInfoManage::loadDevGroupInfo(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadDevGroupInfo(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; @@ -974,7 +974,7 @@ void CDbInfoManage::loadDevGroupInfo(kbd_dbms::CDbApi &objReadDb) } } -void CDbInfoManage::loadDeviceInfo(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadDeviceInfo(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; @@ -1002,7 +1002,7 @@ void CDbInfoManage::loadDeviceInfo(kbd_dbms::CDbApi &objReadDb) } } -void CDbInfoManage::loadPointInfo(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadPointInfo(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; QStringList listType; @@ -1045,7 +1045,7 @@ void CDbInfoManage::loadPointInfo(kbd_dbms::CDbApi &objReadDb) } } -void CDbInfoManage::loadUserInfo(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadUserInfo(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; QString sql = QString("select perm_id,perm_alias from rm_user_def"); @@ -1059,7 +1059,7 @@ void CDbInfoManage::loadUserInfo(kbd_dbms::CDbApi &objReadDb) } } -void CDbInfoManage::loadShieldDefine(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadShieldDefine(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; QString sql = QString("select shield_id,description,shield_prop from opt_shield_define"); @@ -1074,7 +1074,7 @@ void CDbInfoManage::loadShieldDefine(kbd_dbms::CDbApi &objReadDb) } } -void CDbInfoManage::loadShieldProperty(kbd_dbms::CDbApi &objReadDb) +void CDbInfoManage::loadShieldProperty(iot_dbms::CDbApi &objReadDb) { QSqlQuery query; QString sql = QString("select actual_value,display_value from dict_menu_info where menu_name = '%1' ").arg("屏蔽属性"); @@ -1091,7 +1091,7 @@ void CDbInfoManage::loadShieldProperty(kbd_dbms::CDbApi &objReadDb) bool CDbInfoManage::getMaxId(int &timeId, int &shieldId) { bool ret = false; - kbd_dbms::CDbApi readDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi readDb(DB_CONN_MODEL_READ); if(!readDb.open()) { return false; diff --git a/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.h b/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.h index 108e693b..7112be36 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.h +++ b/product/src/gui/plugin/AlarmShieldWidget/CDbInfoManage.h @@ -57,20 +57,20 @@ private: QString getJoinStr(const QList &list, char c); void loadRTLocation(); - void loadDevGroupInfo(kbd_dbms::CDbApi &objReadDb); - void loadDeviceInfo(kbd_dbms::CDbApi &objReadDb); - void loadPointInfo(kbd_dbms::CDbApi &objReadDb); - void loadUserInfo(kbd_dbms::CDbApi &objReadDb); - void loadShieldDefine(kbd_dbms::CDbApi &objReadDb); - void loadShieldProperty(kbd_dbms::CDbApi &objReadDb); + void loadDevGroupInfo(iot_dbms::CDbApi &objReadDb); + void loadDeviceInfo(iot_dbms::CDbApi &objReadDb); + void loadPointInfo(iot_dbms::CDbApi &objReadDb); + void loadUserInfo(iot_dbms::CDbApi &objReadDb); + void loadShieldDefine(iot_dbms::CDbApi &objReadDb); + void loadShieldProperty(iot_dbms::CDbApi &objReadDb); bool getMaxId(int &timeId, int &shieldId); private: static CDbInfoManage * m_pInstance; - kbd_service::CPermMngApiPtr m_ptrPermMng; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CDbApi *m_pWriteDb; + iot_service::CPermMngApiPtr m_ptrPermMng; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi *m_pWriteDb; QMap m_regionMap; QMap m_locationInfo; QMap m_locationTag; diff --git a/product/src/gui/plugin/AlarmShieldWidget/CHeaderView.cpp b/product/src/gui/plugin/AlarmShieldWidget/CHeaderView.cpp index 477cb075..1483228f 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/CHeaderView.cpp +++ b/product/src/gui/plugin/AlarmShieldWidget/CHeaderView.cpp @@ -8,8 +8,8 @@ CHeaderView::CHeaderView(QWidget *parent, int nAddCheckBoxColumn): QHeaderView(Qt::Horizontal, parent), m_bChecked(false) { - m_indicatorCheck = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/ckb-select.png").c_str(); - m_indicatorUnCheck = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/unchecked.png").c_str(); + m_indicatorCheck = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/ckb-select.png").c_str(); + m_indicatorUnCheck = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/unchecked.png").c_str(); setSectionsClickable(true); connect(this, SIGNAL(sectionClicked(int)), this, SLOT(onHeaderClicked(int))); diff --git a/product/src/gui/plugin/AlarmShieldWidget/main.cpp b/product/src/gui/plugin/AlarmShieldWidget/main.cpp index b29c1705..cdb1110e 100644 --- a/product/src/gui/plugin/AlarmShieldWidget/main.cpp +++ b/product/src/gui/plugin/AlarmShieldWidget/main.cpp @@ -5,9 +5,9 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); + iot_public::StartLogSystem("", "hmi"); - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -25,6 +25,6 @@ int main(int argc, char *argv[]) a.exec(); - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.cpp b/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.cpp index 016baf59..20300e36 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.cpp +++ b/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.cpp @@ -2,18 +2,18 @@ #include "dbms/db_api_ex/CDbApi.h" #include "CStatisCommon.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDataInfoManage *CDataInfoManage::m_pInstance = NULL; CDataInfoManage::CDataInfoManage() { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); - m_rtdbNetAcs = new kbd_dbms::CRdbNetApi(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); + m_rtdbNetAcs = new iot_dbms::CRdbNetApi(); m_nDomain = CN_InvalidDomainId; - if(kbd_public::createSysInfoInstance(m_ptrSysInfo)) + if(iot_public::createSysInfoInstance(m_ptrSysInfo)) { - kbd_public::SNodeInfo sNodeInfo; + iot_public::SNodeInfo sNodeInfo; m_ptrSysInfo->getLocalNodeInfo(sNodeInfo); m_nDomain = sNodeInfo.nDomainId; } @@ -205,8 +205,8 @@ void CDataInfoManage::loadAlarmLevel() std::string strTableName = "alarm_level_define"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_name"); @@ -224,9 +224,9 @@ void CDataInfoManage::loadAlarmLevel() m_alarmOrderMap.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; - kbd_dbms::CVarType order; + iot_dbms::CVarType key; + iot_dbms::CVarType value; + iot_dbms::CVarType order; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); result.getColumnValue(nIndex, 2, order); @@ -245,8 +245,8 @@ void CDataInfoManage::loadLocation() std::string strTableName = "sys_model_location_info"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("description"); @@ -260,10 +260,10 @@ void CDataInfoManage::loadLocation() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType id; - kbd_dbms::CVarType desc; - kbd_dbms::CVarType p_id; - kbd_dbms::CVarType type; + iot_dbms::CVarType id; + iot_dbms::CVarType desc; + iot_dbms::CVarType p_id; + iot_dbms::CVarType type; result.getColumnValue(nIndex, 0, id); result.getColumnValue(nIndex, 1, desc); result.getColumnValue(nIndex, 2, p_id); @@ -300,8 +300,8 @@ void CDataInfoManage::loadDevType() std::string strTableName = "dev_type_def"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -311,8 +311,8 @@ void CDataInfoManage::loadDevType() m_devTypeMap.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); @@ -327,7 +327,7 @@ void CDataInfoManage::loadDevInfo() { std::string strTableName = "dev_info"; m_rtdbNetAcs->connect(m_nDomain, CN_AppId_PSCADA); - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector columns; columns.push_back("tag_name"); columns.push_back("description"); @@ -389,8 +389,8 @@ void CDataInfoManage::loadAlarmStatus() std::string strTableName = "alarm_status_define"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("alarm_type"); columns.push_back("status_value"); @@ -401,9 +401,9 @@ void CDataInfoManage::loadAlarmStatus() m_alarmStatusMap.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType alarm_type; - kbd_dbms::CVarType status_value; - kbd_dbms::CVarType alarm_manner; + iot_dbms::CVarType alarm_type; + iot_dbms::CVarType status_value; + iot_dbms::CVarType alarm_manner; result.getColumnValue(nIndex, 0, alarm_type); result.getColumnValue(nIndex, 1, status_value); result.getColumnValue(nIndex, 2, alarm_manner); @@ -424,8 +424,8 @@ void CDataInfoManage::loadAlarmManner() std::string strTableName = "alarm_manner_define"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("manner_id"); columns.push_back("alarm_priority"); @@ -435,8 +435,8 @@ void CDataInfoManage::loadAlarmManner() m_alarmMannerMap.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); @@ -460,7 +460,7 @@ void CDataInfoManage::loadDevPoint() for(int nIndex=0; nIndexconnect(m_nDomain, CN_AppId_PSCADA); - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector columns; columns.push_back("tag_name"); columns.push_back("device"); diff --git a/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.h b/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.h index 736628a0..c1ffcd3d 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.h +++ b/product/src/gui/plugin/AlarmStatisWidget/CDataInfoManage.h @@ -43,9 +43,9 @@ private: void loadDevPoint(); private: - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CRdbNetApi * m_rtdbNetAcs; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbNetApi * m_rtdbNetAcs; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; int m_nDomain; QMap m_alarmLevelMap; //< alarm_level_define PRIORITY_ID - PRIORITY_NAME QMap m_alarmOrderMap; //< alarm_level_define PRIORITY_ID - PRIORITY_ORDER diff --git a/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.cpp b/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.cpp index 1e53a114..0d87b0c2 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.cpp +++ b/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.cpp @@ -17,7 +17,7 @@ void CHisEventManage::queryHisEventStatis(int location, int devType, qint64 star { QTime time; time.start(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(!getValidTsdbConnPtr(tsdbConnPtr)) { LOGERROR("CTsdbQuery: 未获取到有效的TSDB连接!"); @@ -40,7 +40,7 @@ void CHisEventManage::queryHisEventContrast(QList selectedList, qint64 star { QTime time; time.start(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(!getValidTsdbConnPtr(tsdbConnPtr)) { LOGERROR("CTsdbQuery: 未获取到有效的TSDB连接!"); @@ -69,7 +69,7 @@ void CHisEventManage::queryHisEventContrast(QList selectedList, qint64 star emit updateHisEventContrast(record); } -bool CHisEventManage::getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr) +bool CHisEventManage::getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr) { if(m_tsdbConnPtr != NULL) { diff --git a/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.h b/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.h index a1c9795f..c05e3592 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.h +++ b/product/src/gui/plugin/AlarmStatisWidget/CHisEventManage.h @@ -19,7 +19,7 @@ public slots: void queryHisEventContrast(QList selectedList, qint64 startTime, qint64 endTime, EN_STATIS_STYLE style); private: - bool getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr); + bool getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr); signals: void updateHisEventStatis(const QMap > &event); @@ -27,7 +27,7 @@ signals: void updateHisEventContrast(const QMap > &event); private: - kbd_dbms::CTsdbConnPtr m_tsdbConnPtr; + iot_dbms::CTsdbConnPtr m_tsdbConnPtr; }; #endif // CHISEVENTMANAGE_H diff --git a/product/src/gui/plugin/AlarmStatisWidget/CMainWidget.cpp b/product/src/gui/plugin/AlarmStatisWidget/CMainWidget.cpp index fe25fcaf..c5e396b5 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CMainWidget.cpp +++ b/product/src/gui/plugin/AlarmStatisWidget/CMainWidget.cpp @@ -28,7 +28,7 @@ CMainWidget::~CMainWidget() { if(!m_editMode) { - kbd_dbms::releaseTsdbApi(); + iot_dbms::releaseTsdbApi(); } if(m_pHisEventManage) @@ -76,7 +76,7 @@ void CMainWidget::initialize() if(!m_editMode) { - kbd_dbms::initTsdbApi(); + iot_dbms::initTsdbApi(); loadAlarmColor(); @@ -87,7 +87,7 @@ void CMainWidget::initialize() void CMainWidget::initStyleSheet() { QString style = QString(); - std::string strFullPath = kbd_public::CFileStyle + std::string strFullPath = iot_public::CFileStyle ::getPathOfStyleFile("public.qss") ; QFile file1(QString::fromStdString(strFullPath)); if (file1.open(QIODevice::ReadOnly)) @@ -98,7 +98,7 @@ void CMainWidget::initStyleSheet() } file1.close(); - strFullPath = kbd_public::CFileStyle + strFullPath = iot_public::CFileStyle ::getPathOfStyleFile("AlarmStatisWidget.qss") ; QFile file2(QString::fromStdString(strFullPath)); if (file2.open(QIODevice::ReadOnly)) @@ -116,7 +116,7 @@ void CMainWidget::initStyleSheet() void CMainWidget::loadAlarmColor() { - QString filePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString filePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); QDomDocument document; diff --git a/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.cpp b/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.cpp index 06ff62ec..d1a8c017 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.cpp +++ b/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.cpp @@ -32,7 +32,7 @@ CTsdbQuery::~CTsdbQuery() { int64 resultSize = 0; //< 释放结果集 - std::vector *>::iterator res = m_pVecResult->begin(); + std::vector *>::iterator res = m_pVecResult->begin(); while(res != m_pVecResult->end()) { resultSize += (*res)->size(); @@ -98,8 +98,8 @@ bool CTsdbQuery::queryEventByUnit(qint64 startTime, qint64 endTime, QMapsize(); nIndex++) { - std::vector *evetVector = m_pVecResult->at(nIndex); - std::vector::iterator iter = evetVector->begin(); + std::vector *evetVector = m_pVecResult->at(nIndex); + std::vector::iterator iter = evetVector->begin(); for(; iter != evetVector->end(); iter++) { int priority = getAlarmLevel(m_pVecMpKey->at(nIndex).m_pszTagName, @@ -189,8 +189,8 @@ void CTsdbQuery::parseResult(qint64 startTime, qint64 endTime, EN_STATIS_MODE mo { for(size_t nIndex(0); nIndex < m_pVecResult->size(); nIndex++) { - std::vector *evetVector = m_pVecResult->at(nIndex); - std::vector::iterator iter = evetVector->begin(); + std::vector *evetVector = m_pVecResult->at(nIndex); + std::vector::iterator iter = evetVector->begin(); qint64 time = startTime; qint64 addTime = getAddMsecByMode(time, mode); for(; iter != evetVector->end(); iter++) diff --git a/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.h b/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.h index 5a821502..2816e64c 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.h +++ b/product/src/gui/plugin/AlarmStatisWidget/CTsdbQuery.h @@ -5,7 +5,7 @@ #include "tsdb_api/TsdbApi.h" #include "db_his_query_api/DbHisQueryBase.h" -using namespace kbd_dbms; +using namespace iot_dbms; class CTsdbQuery { public: @@ -28,7 +28,7 @@ private: std::vector *> *m_pVecResult; private: - kbd_dbms::CTsdbConnPtr m_tsdbConnPtr; + iot_dbms::CTsdbConnPtr m_tsdbConnPtr; QString m_strDevice; }; diff --git a/product/src/gui/plugin/AlarmStatisWidget/main.cpp b/product/src/gui/plugin/AlarmStatisWidget/main.cpp index cb0aa7c7..ba852749 100644 --- a/product/src/gui/plugin/AlarmStatisWidget/main.cpp +++ b/product/src/gui/plugin/AlarmStatisWidget/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("HMI", "AlarmStatisWidget"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "AlarmStatisWidget"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) return -1; } -// kbd_service::CDpcdaForApp::initGlobalThread(); +// iot_service::CDpcdaForApp::initGlobalThread(); { LOGINFO("=========================== AlarmStatisWidget ==========================="); @@ -35,10 +35,10 @@ int main(int argc, char *argv[]) app.exec(); } -// kbd_service::CDpcdaForApp::releaseGlobalThread(); +// iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/AlarmWidget/CAccidentReviewDialog.cpp b/product/src/gui/plugin/AlarmWidget/CAccidentReviewDialog.cpp index 493f740a..8b22972a 100644 --- a/product/src/gui/plugin/AlarmWidget/CAccidentReviewDialog.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAccidentReviewDialog.cpp @@ -58,7 +58,7 @@ void CAccidentReviewDialog::initView() void CAccidentReviewDialog::initTree() { QMap>> m_mapNav; - readNavJson(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + readNavJson(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/NavigationWidget.json"), m_mapNav); QList> nodeList = m_mapNav.value(-1); for(int nIndex=0; nIndex #include "CAlarmDataCollect.h" -using namespace kbd_service; +using namespace iot_service; CAiAlarmDataCollect * CAiAlarmDataCollect::m_pInstance = NULL; CAiAlarmDataCollect::CAiAlarmDataCollect() : CIntelliAlmApi4Clt(), @@ -12,7 +12,7 @@ CAiAlarmDataCollect::CAiAlarmDataCollect() m_pAlternateTimer(Q_NULLPTR) { m_rtdbMutex = new QMutex(); - m_rtdbPriorityOrderAccess = new kbd_dbms::CRdbAccess(); + m_rtdbPriorityOrderAccess = new iot_dbms::CRdbAccess(); m_rtdbPriorityOrderAccess->open("base", "alarm_level_define"); } @@ -68,25 +68,25 @@ bool CAiAlarmDataCollect::isFaultRecallState() return m_bFaultRecallState; } -bool CAiAlarmDataCollect::requestDelAlm(kbd_idlfile::SIntelliAlmDel &objDelAlm) +bool CAiAlarmDataCollect::requestDelAlm(iot_idl::SIntelliAlmDel &objDelAlm) { LOGDEBUG("请求删除!"); - return kbd_service::CIntelliAlmApi4Clt::requestDelAlm(objDelAlm); + return iot_service::CIntelliAlmApi4Clt::requestDelAlm(objDelAlm); } -bool CAiAlarmDataCollect::requestSeprAlm(kbd_idlfile::SIntelliAlmSepr &objSeprAlm) +bool CAiAlarmDataCollect::requestSeprAlm(iot_idl::SIntelliAlmSepr &objSeprAlm) { LOGDEBUG("请求分离!"); - return kbd_service::CIntelliAlmApi4Clt::requestSeprAlm(objSeprAlm); + return iot_service::CIntelliAlmApi4Clt::requestSeprAlm(objSeprAlm); } -bool CAiAlarmDataCollect::requestMergeAlm(kbd_idlfile::SIntelliAlmMerge &objMergeAlm) +bool CAiAlarmDataCollect::requestMergeAlm(iot_idl::SIntelliAlmMerge &objMergeAlm) { LOGDEBUG("请求合并!"); - return kbd_service::CIntelliAlmApi4Clt::requestMergeAlm(objMergeAlm); + return iot_service::CIntelliAlmApi4Clt::requestMergeAlm(objMergeAlm); } -void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAlmAdd &objAllAlm) +void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, iot_idl::SIntelliAlmAdd &objAllAlm) { LOGINFO("========== AiAlarmDataCollect handleAllAlmMsg =========="); @@ -98,7 +98,7 @@ void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAl QList almList; for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SIntelliAlmInfo msg = objAllAlm.alm_info(nAddMsgIndex); + iot_idl::SIntelliAlmInfo msg = objAllAlm.alm_info(nAddMsgIndex); AiAlarmMsgPtr alm(new CAiAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -109,7 +109,7 @@ void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAl emit sigMsgRefresh(); } -void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm) +void CAiAlarmDataCollect::handleAddAlmMsg(iot_idl::SIntelliAlmAdd &objAddAlm) { LOGINFO("========== AiAlarmDataCollect handleAddAlmMsg =========="); QMutexLocker locker(m_rtdbMutex); @@ -118,7 +118,7 @@ void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm QList almList; for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SIntelliAlmInfo msg = objAddAlm.alm_info(nAddMsgIndex); + iot_idl::SIntelliAlmInfo msg = objAddAlm.alm_info(nAddMsgIndex); AiAlarmMsgPtr alm(new CAiAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -128,7 +128,7 @@ void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm LOGDEBUG("AiAlarmDataCollect handleAddAlmMsg():count[%d]",nAlarmCount); } -void CAiAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm) +void CAiAlarmDataCollect::handleDelAlmMsg(iot_idl::SIntelliAlmDel &objDelAlm) { LOGINFO("========== AiAlarmDataCollect handleDelAlmMsg =========="); QMutexLocker locker(m_rtdbMutex); @@ -144,7 +144,7 @@ void CAiAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm LOGDEBUG("AiAlarmDataCollect handleDelAlmMsg():count[%d]",nAlarmCount); } -void CAiAlarmDataCollect::handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &objBrokenAlm) +void CAiAlarmDataCollect::handleBrokenAlmMsg(iot_idl::SIntelliAlmBroken &objBrokenAlm) { //先保证能够编译通过 LOGINFO("========== AiAlarmDataCollect handleBrokenAlmMsg =========="); @@ -160,7 +160,7 @@ void CAiAlarmDataCollect::handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &obj LOGDEBUG("AiAlarmDataCollect handleBrokenAlmMsg():count[%d]",nAlarmCount); } -void CAiAlarmDataCollect::handleReleaseAlmMsg(kbd_idlfile::SIntelliAlmRelease &objReleaseAlm) +void CAiAlarmDataCollect::handleReleaseAlmMsg(iot_idl::SIntelliAlmRelease &objReleaseAlm) { //先保证能够编译通过 LOGINFO("========== AiAlarmDataCollect handleReleaseAlmMsg =========="); @@ -226,8 +226,8 @@ void CAiAlarmDataCollect::slotSwitchFaultRecallState(bool bFaultRecallState) int CAiAlarmDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value = -1000; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value = -1000; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } diff --git a/product/src/gui/plugin/AlarmWidget/CAiAlarmDataCollect.h b/product/src/gui/plugin/AlarmWidget/CAiAlarmDataCollect.h index 4b142cdd..634e3bee 100644 --- a/product/src/gui/plugin/AlarmWidget/CAiAlarmDataCollect.h +++ b/product/src/gui/plugin/AlarmWidget/CAiAlarmDataCollect.h @@ -11,7 +11,7 @@ #include "net_msg_bus_api/MsgBusApi.h" #include "dbms/rdb_api/CRdbAccess.h" -class CAiAlarmDataCollect : public QObject, public kbd_service::CIntelliAlmApi4Clt +class CAiAlarmDataCollect : public QObject, public iot_service::CIntelliAlmApi4Clt { Q_OBJECT public: @@ -25,21 +25,21 @@ public: bool isFaultRecallState(); - virtual bool requestDelAlm(kbd_idlfile::SIntelliAlmDel &objDelAlm); + virtual bool requestDelAlm(iot_idl::SIntelliAlmDel &objDelAlm); - virtual bool requestSeprAlm(kbd_idlfile::SIntelliAlmSepr &objSeprAlm); + virtual bool requestSeprAlm(iot_idl::SIntelliAlmSepr &objSeprAlm); - virtual bool requestMergeAlm(kbd_idlfile::SIntelliAlmMerge &objMergeAlm); + virtual bool requestMergeAlm(iot_idl::SIntelliAlmMerge &objMergeAlm); - virtual void handleAllAlmMsg(int nDomainId,kbd_idlfile::SIntelliAlmAdd &objAllAlm); + virtual void handleAllAlmMsg(int nDomainId,iot_idl::SIntelliAlmAdd &objAllAlm); - virtual void handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm); + virtual void handleAddAlmMsg(iot_idl::SIntelliAlmAdd &objAddAlm); - virtual void handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm); + virtual void handleDelAlmMsg(iot_idl::SIntelliAlmDel &objDelAlm); - virtual void handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &objBrokenAlm); + virtual void handleBrokenAlmMsg(iot_idl::SIntelliAlmBroken &objBrokenAlm); - virtual void handleReleaseAlmMsg(kbd_idlfile::SIntelliAlmRelease &objReleaseAlm); + virtual void handleReleaseAlmMsg(iot_idl::SIntelliAlmRelease &objReleaseAlm); signals: //< 启停定时器 void sigTimerShot(const bool bStop); @@ -77,7 +77,7 @@ private: bool m_bFaultRecallState; QMutex *m_rtdbMutex; QTimer * m_pAlternateTimer; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; static CAiAlarmDataCollect * m_pInstance; }; diff --git a/product/src/gui/plugin/AlarmWidget/CAiAlarmDelegate.cpp b/product/src/gui/plugin/AlarmWidget/CAiAlarmDelegate.cpp index cf45ced8..207e3572 100644 --- a/product/src/gui/plugin/AlarmWidget/CAiAlarmDelegate.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAiAlarmDelegate.cpp @@ -380,8 +380,8 @@ bool CAiAlarmDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, con wave = QString("%1%2%3").arg("\"").arg(wave).arg("\""); LOGINFO("录波文件为:%s",wave.toStdString().c_str()); - const std::string strProc = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strProc = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strProc.empty()) LOGERROR("未找到可执行文件WaveAnalyze"); else @@ -401,8 +401,8 @@ void CAiAlarmDelegate::slotLoadConfig() CAlarmSetMng::instance()->getEmptyInfo(m_emptyBackgroundColor,m_emptyTipColor,m_emptyTip); //CAlarmColorMng::instance()->getActAndFunc(m_act,m_func); - std::string style = kbd_public::CFileStyle::getCurStyle(); - m_strTrendPath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/trend_"+style+".png").c_str(); - m_strVideoPath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video_"+style+".png").c_str(); - m_strWavePath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + m_strTrendPath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/trend_"+style+".png").c_str(); + m_strVideoPath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video_"+style+".png").c_str(); + m_strWavePath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); } diff --git a/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.cpp b/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.cpp index 1d7e14ec..b8a14e3b 100644 --- a/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.cpp @@ -51,7 +51,7 @@ CAiAlarmMsgInfo::CAiAlarmMsgInfo(const CAiAlarmMsgInfo &other): priority(0) m_tagname_type = other.m_tagname_type; } -void CAiAlarmMsgInfo::initialize(const kbd_idlfile::SIntelliAlmInfo &alarmInfo) +void CAiAlarmMsgInfo::initialize(const iot_idl::SIntelliAlmInfo &alarmInfo) { logic_state = (E_AiALARM_LOGICSTATE)alarmInfo.logic_state(); diff --git a/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h b/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h index 3ce35b9f..7a229efd 100644 --- a/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h +++ b/product/src/gui/plugin/AlarmWidget/CAiAlarmMsgInfo.h @@ -21,7 +21,7 @@ class CAiAlarmMsgInfo public: CAiAlarmMsgInfo(); CAiAlarmMsgInfo(const CAiAlarmMsgInfo &other); - void initialize(const kbd_idlfile::SIntelliAlmInfo &alarmInfo); + void initialize(const iot_idl::SIntelliAlmInfo &alarmInfo); //< [优先级越小表示越大]-智能告警窗调用 bool ailessThan(const AlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.cpp index ca90b3de..934cde75 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.cpp @@ -8,7 +8,7 @@ #include "pub_utility_api/FileUtil.h" #include "pub_utility_api/CharUtil.h" -using namespace kbd_public; +using namespace iot_public; using namespace std; CAlarmBaseData *CAlarmBaseData::pInstance = NULL; @@ -88,8 +88,8 @@ CAlarmBaseData::CAlarmBaseData(QObject *parent) : QObject(parent), m_rtdbAccess(Q_NULLPTR) { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_rtdbAccess = new iot_dbms::CRdbAccess(); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); createSysInfoInstance(m_ptrSysInfo); initData(); @@ -97,7 +97,7 @@ CAlarmBaseData::CAlarmBaseData(QObject *parent) : void CAlarmBaseData::loadPermInfo() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); m_listPermLocationId.clear(); m_listPermRegionId.clear(); if(permMngPtr != NULL) @@ -159,7 +159,7 @@ bool CAlarmBaseData::queryAllPointDevGroup(int nDomainId, int nSubsystemId, cons LOGERROR("queryAllPointDevGroup 获取应用ID失败"); return false; } - kbd_dbms::CRdbNetApi rdbNetApi; + iot_dbms::CRdbNetApi rdbNetApi; rdbNetApi.connect(nDomainId, stAppInfo.nId); //< 查询所有设备 @@ -259,8 +259,8 @@ void CAlarmBaseData::loadPriorityDescription() m_priorityDescriptionMap.clear(); m_priorityOrderDescriptionMap.clear(); m_priorityPermDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_order"); @@ -270,9 +270,9 @@ void CAlarmBaseData::loadPriorityDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType order; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType order; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, order); result.getColumnValue(nIndex, 2, value); @@ -296,8 +296,8 @@ void CAlarmBaseData::loadLocationDescription() m_locationDescriptionMap.clear(); m_locationPermDescriptionMap.clear(); m_listPermLocationOrder.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("description"); @@ -310,11 +310,11 @@ void CAlarmBaseData::loadLocationDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType id; - kbd_dbms::CVarType desc; - kbd_dbms::CVarType tag; - kbd_dbms::CVarType type; - kbd_dbms::CVarType pid; + iot_dbms::CVarType id; + iot_dbms::CVarType desc; + iot_dbms::CVarType tag; + iot_dbms::CVarType type; + iot_dbms::CVarType pid; result.getColumnValue(nIndex, 0, id); result.getColumnValue(nIndex, 1, desc); result.getColumnValue(nIndex, 2, tag); @@ -389,8 +389,8 @@ void CAlarmBaseData::loadRegionDescription() { m_regionDescriptionMap.clear(); m_regionPermDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("region_id"); columns.push_back("description"); @@ -399,8 +399,8 @@ void CAlarmBaseData::loadRegionDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermRegionId.contains(key.toInt())) @@ -420,8 +420,8 @@ void CAlarmBaseData::loadAlarmTypeDescription() if(m_rtdbAccess->open("base", "alarm_type_define")) { m_alarmTypeDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("type_id"); columns.push_back("type_name"); @@ -430,8 +430,8 @@ void CAlarmBaseData::loadAlarmTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -445,8 +445,8 @@ void CAlarmBaseData::loadAlarmStatusDescription() if(m_rtdbAccess->open("base", "alarm_status_define")) { m_alarmStatusDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("status_value"); columns.push_back("display_name"); @@ -455,8 +455,8 @@ void CAlarmBaseData::loadAlarmStatusDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -470,8 +470,8 @@ void CAlarmBaseData::loadDeviceTypeDescription() if(m_rtdbAccess->open("base", "dev_type_def")) { m_deviceTypeDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -480,8 +480,8 @@ void CAlarmBaseData::loadDeviceTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -495,8 +495,8 @@ void CAlarmBaseData::loadDeviceGroupDescription() if(m_rtdbAccess->open("base", "dev_group")) { m_deviceGroupDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("tag_name"); columns.push_back("description"); @@ -505,8 +505,8 @@ void CAlarmBaseData::loadDeviceGroupDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceGroupDescriptionMap[QString::fromStdString(key.toStdString())] = QString::fromStdString(value.toStdString()); @@ -517,7 +517,7 @@ void CAlarmBaseData::loadDeviceGroupDescription() void CAlarmBaseData::loadAlarmShowStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; m_alarmShowStatusDescriptionMap.clear(); @@ -553,7 +553,7 @@ void CAlarmBaseData::loadAlarmShowStatusDescription() void CAlarmBaseData::loadAlarmOtherStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; m_alarmOtherStatusDescriptionMap.clear(); @@ -581,21 +581,21 @@ void CAlarmBaseData::loadAlarmOtherStatusDescription() } } -bool CAlarmBaseData::queryAllDeviceDevGroup(kbd_dbms::CRdbNetApi &rdbNetApi, const QString &devg, QList &devList) +bool CAlarmBaseData::queryAllDeviceDevGroup(iot_dbms::CRdbNetApi &rdbNetApi, const QString &devg, QList &devList) { //< 查询设备组所有设备 - kbd_idlfile::RdbQuery msgQuery; + iot_idl::RdbQuery msgQuery; msgQuery.set_strtablename("dev_info"); msgQuery.add_strselectcolnamearr("tag_name"); - kbd_idlfile::RdbCondition *pCondtion = msgQuery.add_msgcondition(); - pCondtion->set_enlogic(kbd_idlfile::ENConditionLogic::enumCondAnd); - pCondtion->set_enrelation(kbd_idlfile::ENConditionRelation::enumCondEqual); + iot_idl::RdbCondition *pCondtion = msgQuery.add_msgcondition(); + pCondtion->set_enlogic(iot_idl::ENConditionLogic::enumCondAnd); + pCondtion->set_enrelation(iot_idl::ENConditionRelation::enumCondEqual); pCondtion->set_strcolumnname("group_tag_name"); - kbd_idlfile::SVariable *pCondValue = pCondtion->mutable_msgvalue(); - pCondValue->set_edatatype(kbd_idlfile::DataType::CN_DATATYPE_STRING); + iot_idl::SVariable *pCondValue = pCondtion->mutable_msgvalue(); + pCondValue->set_edatatype(iot_idl::DataType::CN_DATATYPE_STRING); pCondValue->set_strvalue(devg.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; bool bRet; bRet = rdbNetApi.query(msgQuery, retMsg); if (false == bRet) @@ -619,20 +619,20 @@ bool CAlarmBaseData::queryAllDeviceDevGroup(kbd_dbms::CRdbNetApi &rdbNetApi, con return true; } -bool CAlarmBaseData::queryAllPointDevice(kbd_dbms::CRdbNetApi &rdbNetApi, const QString &device, const QString &table, QList &pointList) +bool CAlarmBaseData::queryAllPointDevice(iot_dbms::CRdbNetApi &rdbNetApi, const QString &device, const QString &table, QList &pointList) { - kbd_idlfile::RdbQuery msgQuery; + iot_idl::RdbQuery msgQuery; msgQuery.set_strtablename(table.toStdString().c_str()); msgQuery.add_strselectcolnamearr("tag_name"); - kbd_idlfile::RdbCondition *pCondtion = msgQuery.add_msgcondition(); - pCondtion->set_enlogic(kbd_idlfile::ENConditionLogic::enumCondAnd); - pCondtion->set_enrelation(kbd_idlfile::ENConditionRelation::enumCondEqual); + iot_idl::RdbCondition *pCondtion = msgQuery.add_msgcondition(); + pCondtion->set_enlogic(iot_idl::ENConditionLogic::enumCondAnd); + pCondtion->set_enrelation(iot_idl::ENConditionRelation::enumCondEqual); pCondtion->set_strcolumnname("device"); - kbd_idlfile::SVariable *pCondValue = pCondtion->mutable_msgvalue(); - pCondValue->set_edatatype(kbd_idlfile::DataType::CN_DATATYPE_STRING); + iot_idl::SVariable *pCondValue = pCondtion->mutable_msgvalue(); + pCondValue->set_edatatype(iot_idl::DataType::CN_DATATYPE_STRING); pCondValue->set_strvalue(device.toStdString().c_str()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; bool bRet; bRet = rdbNetApi.query(msgQuery, retMsg); if (false == bRet) diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.h b/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.h index 39bcc5dd..1be2353e 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmBaseData.h @@ -154,7 +154,7 @@ private: * @param rdbNetApi * @param devg */ - bool queryAllDeviceDevGroup(kbd_dbms::CRdbNetApi &rdbNetApi, const QString &devg, QList &devList); + bool queryAllDeviceDevGroup(iot_dbms::CRdbNetApi &rdbNetApi, const QString &devg, QList &devList); /** * @brief queryAllPointDevice 查询表中设备下所有测点 * @param rdbNetApi @@ -163,13 +163,13 @@ private: * @param pointList "digital.station.G01_dlq.r.value" * @return */ - bool queryAllPointDevice(kbd_dbms::CRdbNetApi &rdbNetApi, const QString &device, const QString &table, QList &pointList); + bool queryAllPointDevice(iot_dbms::CRdbNetApi &rdbNetApi, const QString &device, const QString &table, QList &pointList); private: static CAlarmBaseData * pInstance; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CDbApi *m_pWriteDb; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi *m_pWriteDb; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; QList m_listPermLocationId; //< 原始告警车站权限 QList m_listPermRegionId; //< 原始告警责任区权限 QList m_listPermLocationOrder; //< 有权限的loaction_id: 按location_no排序 diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.cpp index 0267401d..4e973bc0 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.cpp @@ -6,8 +6,8 @@ #include "CAiAlarmDataCollect.h" #include "alarm_server_api/AlarmCommonDef.h" -using namespace kbd_service; -using namespace kbd_dbms; +using namespace iot_service; +using namespace iot_dbms; CAlarmDataCollect * CAlarmDataCollect::m_pInstance = NULL; CAlarmDataCollect::CAlarmDataCollect() @@ -20,7 +20,7 @@ CAlarmDataCollect::CAlarmDataCollect() m_removeNum(0) { m_rtdbMutex = new QMutex(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_rtdbAccess->open("base", "alarm_level_define"); } @@ -138,17 +138,17 @@ void CAlarmDataCollect::slotSwitchFaultRecallState(bool bFaultRecallState) emit sigAlarmOperateEnable(!m_bFaultRecallState); } -bool CAlarmDataCollect::requestCfmAlm(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) +bool CAlarmDataCollect::requestCfmAlm(iot_idl::SAlmCltCfmAlm &objCfmAlm) { - return kbd_service::CAlmApiForAlmClt::requestCfmAlm(objCfmAlm); + return iot_service::CAlmApiForAlmClt::requestCfmAlm(objCfmAlm); } -bool CAlarmDataCollect::requestDelAlm(kbd_idlfile::SAlmCltDelAlm &objDelAlm) +bool CAlarmDataCollect::requestDelAlm(iot_idl::SAlmCltDelAlm &objDelAlm) { - return kbd_service::CAlmApiForAlmClt::requestDelAlm(objDelAlm); + return iot_service::CAlmApiForAlmClt::requestDelAlm(objDelAlm); } -void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm &objAllAlm) +void CAlarmDataCollect::handleAllAlmMsg(int domainId, iot_idl::SAlmCltAddAlm &objAllAlm) { if(!m_referenceCount) { @@ -165,7 +165,7 @@ void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm QList almList; for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SAlmInfoToAlmClt msg = objAllAlm.alm_info(nAddMsgIndex); + iot_idl::SAlmInfoToAlmClt msg = objAllAlm.alm_info(nAddMsgIndex); AlarmMsgPtr alm(new CAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -194,7 +194,7 @@ void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm } } -void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) +void CAlarmDataCollect::handleAddAlmMsg(iot_idl::SAlmCltAddAlm &objAddAlm) { if(!m_referenceCount) { @@ -207,7 +207,7 @@ void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) QList almList; for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SAlmInfoToAlmClt msg = objAddAlm.alm_info(nAddMsgIndex); + iot_idl::SAlmInfoToAlmClt msg = objAddAlm.alm_info(nAddMsgIndex); AlarmMsgPtr alm(new CAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -227,7 +227,7 @@ void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) LOGINFO("handleAddAlmMsg END[%d] ",nAlarmCount); } -void CAlarmDataCollect::handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) +void CAlarmDataCollect::handleCfmAlmMsg(iot_idl::SAlmCltCfmAlm &objCfmAlm) { if(!m_referenceCount) { @@ -247,7 +247,7 @@ void CAlarmDataCollect::handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) LOGINFO("handleCfmAlmMsg END[%d] ",nAlarmCount); } -void CAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm) +void CAlarmDataCollect::handleDelAlmMsg(iot_idl::SAlmCltDelAlm &objDelAlm) { if(!m_referenceCount) { @@ -269,7 +269,7 @@ void CAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm) LOGINFO("handleDelAlmMsg END[%d] ",nAlarmCount); } -void CAlarmDataCollect::handleReleaseAlmMsg(kbd_idlfile::SAlmCltReleaseAlm &objRelAlm) +void CAlarmDataCollect::handleReleaseAlmMsg(iot_idl::SAlmCltReleaseAlm &objRelAlm) { if(!m_referenceCount) { @@ -291,7 +291,7 @@ void CAlarmDataCollect::handleReleaseAlmMsg(kbd_idlfile::SAlmCltReleaseAlm &objR LOGINFO("handleReleaseAlmMsg END[%d] ",nAlarmCount); } -void CAlarmDataCollect::handleLinkWave2AlmMsg(kbd_idlfile::SAlmCltLinkWave2Alm &objWave2Alm) +void CAlarmDataCollect::handleLinkWave2AlmMsg(iot_idl::SAlmCltLinkWave2Alm &objWave2Alm) { if(!m_referenceCount) { @@ -341,16 +341,16 @@ void CAlarmDataCollect::slotAlarmStateChanged() int CAlarmDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CVarType value = -1000; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CVarType value = -1000; m_rtdbAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } int CAlarmDataCollect::queryAlarmAction(const int &priority) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CVarType value; m_rtdbAccess->getColumnValueByKey((void*)&priority, "alarm_actions",value); return value.toInt(); } diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.h b/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.h index ccfda0d7..fdbbadbf 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmDataCollect.h @@ -11,7 +11,7 @@ #include "net_msg_bus_api/MsgBusApi.h" #include "dbms/rdb_api/CRdbAccess.h" -class CAlarmDataCollect : public QObject, public kbd_service::CAlmApiForAlmClt +class CAlarmDataCollect : public QObject, public iot_service::CAlmApiForAlmClt { Q_OBJECT public: @@ -25,21 +25,21 @@ public: bool isFaultRecallState(); - virtual bool requestCfmAlm(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm); + virtual bool requestCfmAlm(iot_idl::SAlmCltCfmAlm &objCfmAlm); - virtual bool requestDelAlm(kbd_idlfile::SAlmCltDelAlm &objDelAlm); + virtual bool requestDelAlm(iot_idl::SAlmCltDelAlm &objDelAlm); - virtual void handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm &objAllAlm); + virtual void handleAllAlmMsg(int domainId, iot_idl::SAlmCltAddAlm &objAllAlm); - virtual void handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm); + virtual void handleAddAlmMsg(iot_idl::SAlmCltAddAlm &objAddAlm); - virtual void handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm); + virtual void handleCfmAlmMsg(iot_idl::SAlmCltCfmAlm &objCfmAlm); - virtual void handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm); + virtual void handleDelAlmMsg(iot_idl::SAlmCltDelAlm &objDelAlm); - virtual void handleReleaseAlmMsg(kbd_idlfile::SAlmCltReleaseAlm &objDelAlm); + virtual void handleReleaseAlmMsg(iot_idl::SAlmCltReleaseAlm &objDelAlm); - virtual void handleLinkWave2AlmMsg(kbd_idlfile::SAlmCltLinkWave2Alm &objWave2Alm); + virtual void handleLinkWave2AlmMsg(iot_idl::SAlmCltLinkWave2Alm &objWave2Alm); void refresh(); signals: @@ -95,9 +95,9 @@ private: bool m_bFaultRecallState; //是否处于事故追忆 QMutex * m_rtdbMutex; QTimer * m_pAlternateTimer; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CRdbAccess * m_rtdbAlmLvlDefTab; // 告警等级定义表 - kbd_dbms::CRdbAccess * m_rtdbAlmActDefTab; // 告警动作定义表 + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAlmLvlDefTab; // 告警等级定义表 + iot_dbms::CRdbAccess * m_rtdbAlmActDefTab; // 告警动作定义表 bool m_bIsNeedUpdate; //< 是否消息确认(每秒更新) bool m_bIsNeedRemove; //< 是否需要删除(每秒更新) bool m_bIsNeedRelease; //< 是否需要释放(每秒更新)- diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmDelegate.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmDelegate.cpp index 1812bab7..843361b7 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmDelegate.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmDelegate.cpp @@ -269,8 +269,8 @@ bool CAlarmDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const wave = QString("%1%2%3").arg("\"").arg(wave).arg("\""); LOGINFO("录波文件为:%s",wave.toStdString().c_str()); - const std::string strProc = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strProc = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strProc.empty()) LOGERROR("未找到可执行文件WaveAnalyze"); else @@ -300,8 +300,8 @@ void CAlarmDelegate::slotLoadConfig() m_isFlash = false; } - std::string style = kbd_public::CFileStyle::getCurStyle(); - m_strTrendPath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/trend_"+style+".png").c_str(); - m_strVideoPath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video_"+style+".png").c_str(); - m_strWavePath = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + m_strTrendPath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/trend_"+style+".png").c_str(); + m_strVideoPath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video_"+style+".png").c_str(); + m_strWavePath = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); } diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.cpp index d14357dd..392a8c85 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.cpp @@ -41,7 +41,7 @@ CAlarmFilterDialog::CAlarmFilterDialog(QWidget *parent) : ui->setupUi(this); setObjectName("alarm_dialog"); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -49,7 +49,7 @@ CAlarmFilterDialog::CAlarmFilterDialog(QWidget *parent) : qss += QLatin1String(qssfile1.readAll()); qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -84,7 +84,7 @@ CAlarmFilterDialog::~CAlarmFilterDialog() void CAlarmFilterDialog::initialize() { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); ui->level->setSelectionMode(QAbstractItemView::MultiSelection); //ui->location->setSelectionMode(QAbstractItemView::MultiSelection); @@ -161,12 +161,12 @@ void CAlarmFilterDialog::initialize() ui->status->addItem(value); } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(info.nId <= CN_AppId_COMAPP) { @@ -717,12 +717,12 @@ void CAlarmFilterDialog::slot_updateCheckStatusState() void CAlarmFilterDialog::slot_updateDevice(const QString &subSystem) { int nSubSystemId = -1; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(subSystem.toStdString() == info.strDesc) { @@ -733,34 +733,34 @@ void CAlarmFilterDialog::slot_updateDevice(const QString &subSystem) ui->deviceType->clear(); - QList values; + QList values; if(nSubSystemId != -1) { - kbd_dbms::CVarType subSystemId = nSubSystemId; + iot_dbms::CVarType subSystemId = nSubSystemId; if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CONDINFO condition; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CONDINFO condition; condition.relationop = ATTRCOND_EQU; memcpy(condition.name, "sub_system", strlen("sub_system") ); condition.conditionval = subSystemId; std::vector columns; columns.push_back("description"); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; if(m_rtdbAccess->select(condition, result, columns)) { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType value; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, value); values.append(value); } } } } - foreach (kbd_dbms::CVarType value, values) + foreach (iot_dbms::CVarType value, values) { ui->deviceType->addItem(value.c_str()); } diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.h b/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.h index 90d42e3c..03dd1173 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmFilterDialog.h @@ -102,7 +102,7 @@ private: private: Ui::CAlarmFilterDialog *ui; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_priorityMap; QMap m_locationMap; QMap m_regionMap; diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmForm.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmForm.cpp index e40845c1..ae7e1c04 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmForm.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmForm.cpp @@ -53,7 +53,7 @@ CAlarmForm::CAlarmForm(QWidget *parent) : m_isNeedAccidentReview(true), m_strAccidenPath(QString()) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); qRegisterMetaType("QItemSelection"); qRegisterMetaType< QList > >("QList >"); qRegisterMetaType >("QVector"); @@ -176,13 +176,13 @@ CAlarmForm::~CAlarmForm() void CAlarmForm::initialize() { - if (!kbd_public::createSysInfoInstance(m_ptrSysInfo)) + if (!iot_public::createSysInfoInstance(m_ptrSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); } if(m_pReadDb == NULL) { - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { LOGERROR("数据库打开失败,%s",m_pReadDb->getLastErrorString().toStdString().c_str()); @@ -255,7 +255,7 @@ void CAlarmForm::updateAlarmOperatePerm() m_listLocationOptId.clear(); m_listRegionDelId.clear(); m_listLocationDelId.clear(); - kbd_public::SNodeInfo stNodeInfo; + iot_public::SNodeInfo stNodeInfo; if (!m_ptrSysInfo) { if(!createSysInfoInstance(m_ptrSysInfo)) @@ -268,7 +268,7 @@ void CAlarmForm::updateAlarmOperatePerm() m_nodeName = stNodeInfo.strName; m_nDomainId = stNodeInfo.nDomainId; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -1638,7 +1638,7 @@ void CAlarmForm::removeAlarm0() } QList listInfo = m_pModel->getListShowAlarmInfo(); //声明告警删除package - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 int unConfirmSkip = -1; //< 未确认告警是否跳过: 0-单步跳过、1-全部跳过 @@ -1734,17 +1734,17 @@ void CAlarmForm::removeAlarm0() } //构建告警删除package - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; } pkgMap.value(info->domain_id)->add_uuid_base64(info->uuid_base64.toStdString()); } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestDelAlm(*pkg)!= true) { @@ -1771,8 +1771,8 @@ void CAlarmForm::removeAlarm1() QList aimsgList; //选中的智能告警 QList msgList; //选中的原始告警 //声明智能告警删除package - QMap aipkgMap; //Domain-DelPkg; ai - QMap pkgMap; //Domain-DelPkg; alarm + QMap aipkgMap; //Domain-DelPkg; ai + QMap pkgMap; //Domain-DelPkg; alarm int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 int unConfirmSkip = -1; //< 未确认告警是否跳过: 0-单步跳过、1-全部跳过 QModelIndexList::iterator modelIndexIter = modelIndexList.begin(); @@ -1895,10 +1895,10 @@ void CAlarmForm::removeAlarm1() } } //构建告警删除package - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; } @@ -1991,17 +1991,17 @@ void CAlarmForm::removeAlarm1() } int domain_id = aimsgList.at(aialarm)->domain_id; QString aiuuid = aimsgList.at(aialarm)->uuid_base64; - QMap::iterator it = aipkgMap.find(domain_id); + QMap::iterator it = aipkgMap.find(domain_id); if(it == aipkgMap.end()) { - kbd_idlfile::SIntelliAlmDel * pkg = new kbd_idlfile::SIntelliAlmDel(); + iot_idl::SIntelliAlmDel * pkg = new iot_idl::SIntelliAlmDel(); pkg->set_domain_id(domain_id); aipkgMap[domain_id] = pkg; } aipkgMap.value(domain_id)->add_uuid_base64(aiuuid.toStdString()); } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestDelAlm(*pkg)!= true) { @@ -2011,7 +2011,7 @@ void CAlarmForm::removeAlarm1() qDeleteAll(pkgMap); pkgMap.clear(); //请求删除 - foreach (kbd_idlfile::SIntelliAlmDel * pkg, aipkgMap) + foreach (iot_idl::SIntelliAlmDel * pkg, aipkgMap) { if(CAiAlarmDataCollect::instance()->requestDelAlm(*pkg) != true) { @@ -2040,7 +2040,7 @@ void CAlarmForm::confirmAlarm0() //构建告警确认package QMap msgMap; //要确认的告警 - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 QModelIndexList::iterator modelIndexIter = modelIndexList.begin(); @@ -2100,10 +2100,10 @@ void CAlarmForm::confirmAlarm0() } QString key = QString("%1_%2_%3").arg(almIter.value()->domain_id).arg(almIter.value()->alm_type).arg(almIter.value()->app_id); - QMap::iterator it = pkgMap.find(key); + QMap::iterator it = pkgMap.find(key); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -2118,7 +2118,7 @@ void CAlarmForm::confirmAlarm0() } //请求确认 - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestCfmAlm(*pkg) != true) { @@ -2146,7 +2146,7 @@ void CAlarmForm::confirmAlarm1() QMap msgMap; //要确认的告警 msgMap.clear(); //构建告警确认package - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 QModelIndexList::iterator modelIndexIter = modelIndexList.begin(); for(;modelIndexIter != modelIndexList.end();modelIndexIter++) @@ -2231,10 +2231,10 @@ void CAlarmForm::confirmAlarm1() } } QString key = QString("%1_%2_%3").arg(almIter.value()->domain_id).arg(almIter.value()->alm_type).arg(almIter.value()->app_id); - QMap::iterator it = pkgMap.find(key); + QMap::iterator it = pkgMap.find(key); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -2247,7 +2247,7 @@ void CAlarmForm::confirmAlarm1() pkgMap.value(key)->add_time_stamp(almIter.value()->time_stamp); pkgMap.value(key)->add_uuid_base64(almIter.value()->uuid_base64.toStdString()); } - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestCfmAlm(*pkg) != true) { @@ -2312,7 +2312,7 @@ void CAlarmForm::rightMerge1() } } } - QMap pkgMap; + QMap pkgMap; QList listPtr; listPtr.clear(); int permSkip = -1; @@ -2399,7 +2399,7 @@ void CAlarmForm::rightMerge1() int32 domain_id = listPtr.at(x)->domain_id; if(!pkgMap.keys().contains(domain_id)) { - kbd_idlfile::SIntelliAlmMerge *pkg =new kbd_idlfile::SIntelliAlmMerge(); + iot_idl::SIntelliAlmMerge *pkg =new iot_idl::SIntelliAlmMerge(); pkg->set_domain_id(domain_id); pkgMap[domain_id] = pkg; } @@ -2419,7 +2419,7 @@ void CAlarmForm::rightMerge1() pkgMap.clear(); return ; } - foreach (kbd_idlfile::SIntelliAlmMerge * pkg, pkgMap) + foreach (iot_idl::SIntelliAlmMerge * pkg, pkgMap) { if(CAiAlarmDataCollect::instance()->requestMergeAlm(*pkg) != true) { @@ -2540,7 +2540,7 @@ void CAlarmForm::rightSepr1() } //拼包 int domain_id = msgList.at(0)->domain_id; - kbd_idlfile::SIntelliAlmSepr *pkg = new kbd_idlfile::SIntelliAlmSepr(); + iot_idl::SIntelliAlmSepr *pkg = new iot_idl::SIntelliAlmSepr(); pkg->set_domain_id(domain_id); for(int index(0);indexsub_system, CH_HMI_TO_OPT_OPTCMD_DOWN); SOptTagSet sOptTagSet; SOptTagQueue optTagQueue; @@ -2945,7 +2945,7 @@ void CAlarmForm::inhibitAlm(const AlarmMsgPtr &alm) bool CAlarmForm::permCheck(int location, int region) { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -3008,7 +3008,7 @@ int CAlarmForm::createReqHead(SOptReqHead &head, const AlarmMsgPtr &alm) int loginSec; std::string instanceName; - kbd_service::CPermMngApiPtr permMng = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMng = iot_service::getPermMngInstance("base"); if(permMng != NULL) { if(permMng->PermDllInit() != PERM_NORMAL) @@ -3030,7 +3030,7 @@ int CAlarmForm::createReqHead(SOptReqHead &head, const AlarmMsgPtr &alm) if(m_ptrSysInfo != Q_NULLPTR) { - kbd_public::SAppInfo stAppInfo; + iot_public::SAppInfo stAppInfo; m_ptrSysInfo->getAppInfoBySubsystemId(alm->sub_system,stAppInfo); head.nAppID = stAppInfo.nId; }else diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmForm.h b/product/src/gui/plugin/AlarmWidget/CAlarmForm.h index 25530d2e..46f3c301 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmForm.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmForm.h @@ -214,8 +214,8 @@ private: int createReqHead(SOptReqHead &head, const AlarmMsgPtr &alm); private: - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; - kbd_dbms::CDbApi *m_pReadDb; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_dbms::CDbApi *m_pReadDb; QLineEdit * m_pSearchTextEdit; QPushButton * m_pSearchButton; @@ -231,7 +231,7 @@ private: CAiAlarmDelegate * m_aiDelegate; CAlarmDeviceTreeModel * m_pDeviceModel; CAiAlarmTreeModel *m_treeModel; - kbd_net::CMbCommunicator *m_communicator; + iot_net::CMbCommunicator *m_communicator; int m_userId; std::string m_nodeName; int m_nDomainId; diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmInhibitDialog.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmInhibitDialog.cpp index ecd71d67..be4a878f 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmInhibitDialog.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmInhibitDialog.cpp @@ -17,7 +17,7 @@ CAlarmInhibitDialog::CAlarmInhibitDialog(QWidget *parent) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -25,7 +25,7 @@ CAlarmInhibitDialog::CAlarmInhibitDialog(QWidget *parent) : qss += QLatin1String(qssfile1.readAll()); qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmItemModel.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmItemModel.cpp index ca31a217..856daaf9 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmItemModel.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmItemModel.cpp @@ -22,7 +22,7 @@ ///////////////////////////////////////////////////////////////////////////// -using namespace kbd_public; +using namespace iot_public; using namespace std; const int DOCK_ROW_COUNT = 3; const int MAX_ROW_COUNT = 15000; diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmMediaPlayer.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmMediaPlayer.cpp index ceb5b378..9712bc7a 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmMediaPlayer.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmMediaPlayer.cpp @@ -22,7 +22,7 @@ #include #include -using namespace kbd_public; +using namespace iot_public; CAlarmMediaPlayer * CAlarmMediaPlayer::m_pInstance = NULL; CAlarmMediaPlayer *CAlarmMediaPlayer::instance() { @@ -37,7 +37,7 @@ CAlarmMediaPlayer::CAlarmMediaPlayer() :m_bHaveValidAudioDev(true),m_pMediaPlayer(Q_NULLPTR),m_pTextToSpeech(Q_NULLPTR),m_pTimerCheckAudioDev(Q_NULLPTR),m_voice(100) { m_readFlag = true; - QDir dir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir dir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); dir.cdUp(); dir.cdUp(); dir.cd("data"); @@ -184,7 +184,7 @@ void CAlarmMediaPlayer::initSpeech() } } //添加语音转文本处理条件 - QFile file(kbd_public::CFileUtil::getPathOfCfgFile("alarmSpeechTextTrans.xml" , CN_DIR_PRODUCT).c_str()); + QFile file(iot_public::CFileUtil::getPathOfCfgFile("alarmSpeechTextTrans.xml" , CN_DIR_PRODUCT).c_str()); if (!file.open(QFile::ReadWrite)) { LOGERROR("打开语音文本转换文件失败,默认不进行语音转换"); diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.cpp index e66b6752..b8a1352e 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.cpp @@ -76,7 +76,7 @@ CAlarmMsgInfo::CAlarmMsgInfo(const CAlarmMsgInfo &other): m_alarmAction(0) wave_file = other.wave_file; } -void CAlarmMsgInfo::initialize(const kbd_idlfile::SAlmInfoToAlmClt &alarmInfo) +void CAlarmMsgInfo::initialize(const iot_idl::SAlmInfoToAlmClt &alarmInfo) { alm_type = alarmInfo.alm_type(); alm_status = alarmInfo.alm_status(); diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.h b/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.h index ebe9100e..7be0efd9 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmMsgInfo.h @@ -30,7 +30,7 @@ class CAlarmMsgInfo public: CAlarmMsgInfo(); CAlarmMsgInfo(const CAlarmMsgInfo &other); - void initialize(const kbd_idlfile::SAlmInfoToAlmClt &alarmInfo); + void initialize(const iot_idl::SAlmInfoToAlmClt &alarmInfo); int getCameraInfoByTag(const QString &tag); //< [优先级越小表示越大]-原始告警窗调用 diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.cpp index 603c52bd..210a087e 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.cpp @@ -17,7 +17,7 @@ #include "pub_logger_api/logger.h" #include "CAlarmBaseData.h" -using namespace kbd_public; +using namespace iot_public; using namespace std; CAlarmMsgManage *CAlarmMsgManage::pInstance = NULL; @@ -37,7 +37,7 @@ CAlarmMsgManage::CAlarmMsgManage() m_nAlmTotal(0) { mutex = new QMutex(); - QDir dir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir dir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); dir.cdUp(); dir.cdUp(); dir.cd("data"); @@ -60,13 +60,13 @@ CAlarmMsgManage::CAlarmMsgManage() m_all.clear(); m_aiall.clear(); - m_rtdbAlarmActionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAlarmActionAccess = new iot_dbms::CRdbAccess(); m_rtdbAlarmActionAccess->open("base", "alarm_level_define"); - m_rtdbLocationDescriptionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbLocationDescriptionAccess = new iot_dbms::CRdbAccess(); m_rtdbLocationDescriptionAccess->open("base", "sys_model_location_info"); - m_rtdbAppDescriptionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAppDescriptionAccess = new iot_dbms::CRdbAccess(); m_rtdbAppDescriptionAccess->open("base", "sys_model_app_info"); loadPermInfo(); @@ -1868,24 +1868,24 @@ void CAlarmMsgManage::dealDelayAi() int CAlarmMsgManage::queryAlarmAction(const int &priority) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAlarmActionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbAlarmActionAccess); + iot_dbms::CVarType value; m_rtdbAlarmActionAccess->getColumnValueByKey((void*)&priority, "alarm_actions",value); return value.toInt(); } QString CAlarmMsgManage::queryLocationDescription(int id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbLocationDescriptionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbLocationDescriptionAccess); + iot_dbms::CVarType value; m_rtdbLocationDescriptionAccess->getColumnValueByKey((void*)&id, "description", value); return value.c_str(); } QString CAlarmMsgManage::queryAppDescription(int id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAppDescriptionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbAppDescriptionAccess); + iot_dbms::CVarType value; m_rtdbAppDescriptionAccess->getColumnValueByKey((void*)&id, "description", value); return value.c_str(); } diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.h b/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.h index 1cd27591..281e016a 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmMsgManage.h @@ -372,9 +372,9 @@ private: QMutex * mutex; - kbd_dbms::CRdbAccess * m_rtdbAlarmActionAccess; - kbd_dbms::CRdbAccess * m_rtdbLocationDescriptionAccess; - kbd_dbms::CRdbAccess * m_rtdbAppDescriptionAccess; + iot_dbms::CRdbAccess * m_rtdbAlarmActionAccess; + iot_dbms::CRdbAccess * m_rtdbLocationDescriptionAccess; + iot_dbms::CRdbAccess * m_rtdbAppDescriptionAccess; int m_nNDelComAlarmCount; //< 未删除未确认数量 N--not Del--delete Com--confirm QHash m_infos; diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmPlugin.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmPlugin.cpp index 5eee59ca..8327995e 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmPlugin.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmPlugin.cpp @@ -41,7 +41,7 @@ CAlarmPlugin::CAlarmPlugin(QWidget *parent, bool editMode) #ifdef OS_LINUX QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins"); #endif - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -49,7 +49,7 @@ CAlarmPlugin::CAlarmPlugin(QWidget *parent, bool editMode) qss += QLatin1String(qssfile1.readAll()); qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -242,7 +242,7 @@ void CAlarmPlugin::initialize(int mode) void CAlarmPlugin::loadConfig() { - QFile file(kbd_public::CFileUtil::getPathOfCfgFile("intelli_alm_cfg.xml",CN_DIR_PLATFORM).c_str()); + QFile file(iot_public::CFileUtil::getPathOfCfgFile("intelli_alm_cfg.xml",CN_DIR_PLATFORM).c_str()); if (!file.open(QFile::ReadWrite)) { LOGERROR("打开智能告警配置文件失败,默认不启动"); @@ -332,7 +332,7 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) return cofirmNum; } //< 可能有部分告警没有确认权限 - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; for(int nIndex(0); nIndex < msgs.size(); nIndex++) { AlarmMsgPtr info = msgs.at(nIndex); @@ -362,10 +362,10 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) if(regionEnable && locationEnable) { QString key = QString("%1_%2_%3").arg(info->domain_id).arg(info->alm_type).arg(info->app_id); - QMap::iterator it = pkgMap.find(key); + QMap::iterator it = pkgMap.find(key); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_currentNodeName); pkg->set_user_id(m_currentUsrId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -381,7 +381,7 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) } } //请求确认 - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestCfmAlm(*pkg) != true) { @@ -406,7 +406,7 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) return -1; } //< 可能有部分告警没有删除权限 - QMap pkgMap; + QMap pkgMap; for(int nIndex(0); nIndex < msgs.size(); nIndex++) { AlarmMsgPtr info = msgs.at(nIndex); @@ -432,10 +432,10 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) } if(regionEnable && locationEnable) { - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; } @@ -443,7 +443,7 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) } } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestDelAlm(*pkg) != true) { @@ -1355,9 +1355,9 @@ void CAlarmPlugin::updateAlarmOperatePerm() m_vecRegionDelId.clear(); m_vecLocationDelId.clear(); - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return; @@ -1365,7 +1365,7 @@ void CAlarmPlugin::updateAlarmOperatePerm() spSysInfo->getLocalNodeInfo(stNodeInfo); m_currentNodeName = stNodeInfo.strName; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmSetDlg.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmSetDlg.cpp index 2a5413b0..8cbe1a34 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmSetDlg.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmSetDlg.cpp @@ -25,7 +25,7 @@ CAlarmSetDlg::CAlarmSetDlg(QWidget *parent) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -33,7 +33,7 @@ CAlarmSetDlg::CAlarmSetDlg(QWidget *parent) : qss += QLatin1String(qssfile1.readAll()); qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.cpp index 870aa9f6..4e76ee52 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.cpp @@ -5,7 +5,7 @@ #include "pub_utility_api/FileUtil.h" #include "CAlarmBaseData.h" -using namespace kbd_public; +using namespace iot_public; using namespace std; CAlarmSetMng *CAlarmSetMng::pInstance = NULL; @@ -41,7 +41,7 @@ CAlarmSetMng::CAlarmSetMng() void CAlarmSetMng::loadXMLCfg() { m_colorMap.clear(); - QString filePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); + QString filePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); QDomDocument document; QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.h b/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.h index 5b3a485a..41c78362 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.h +++ b/product/src/gui/plugin/AlarmWidget/CAlarmSetMng.h @@ -66,7 +66,7 @@ private: static CAlarmSetMng * pInstance; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_priorityOrderDescriptionMap; diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmShiledDialog.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmShiledDialog.cpp index a5425a1d..78556db5 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmShiledDialog.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmShiledDialog.cpp @@ -15,7 +15,7 @@ CAlarmShiledDialog::CAlarmShiledDialog(QWidget *parent) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -23,7 +23,7 @@ CAlarmShiledDialog::CAlarmShiledDialog(QWidget *parent) : qss += QLatin1String(qssfile1.readAll()); qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -80,7 +80,7 @@ QWidget *CAlarmShiledDialog::createCustomWidget(const QString &name) } fileName += ".so"; #endif - std::string filePath = kbd_public::CFileUtil::getPathOfBinFile(fileName.toStdString()); + std::string filePath = iot_public::CFileUtil::getPathOfBinFile(fileName.toStdString()); path = QString::fromStdString(filePath); QPluginLoader loader(path); QObject *plugin = loader.instance(); diff --git a/product/src/gui/plugin/AlarmWidget/CAlarmWidget.cpp b/product/src/gui/plugin/AlarmWidget/CAlarmWidget.cpp index e9bda3bf..118c0d8e 100644 --- a/product/src/gui/plugin/AlarmWidget/CAlarmWidget.cpp +++ b/product/src/gui/plugin/AlarmWidget/CAlarmWidget.cpp @@ -305,7 +305,7 @@ void CAlarmWidget::confirmAlarm(const int &row) return; } - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -355,9 +355,9 @@ void CAlarmWidget::setEnableLevel(bool isNeed) bool CAlarmWidget::updateAlarmOperatePerm() { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return false; @@ -368,7 +368,7 @@ bool CAlarmWidget::updateAlarmOperatePerm() m_listRegionOptId.clear(); m_listLocationDelId.clear(); m_listRegionDelId.clear(); - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/AlarmWidget/main.cpp b/product/src/gui/plugin/AlarmWidget/main.cpp index cd3812e2..8012dc9f 100644 --- a/product/src/gui/plugin/AlarmWidget/main.cpp +++ b/product/src/gui/plugin/AlarmWidget/main.cpp @@ -41,12 +41,12 @@ int main(int argc, char *argv[]) } } } - kbd_public::StartLogSystem("HMI", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -67,8 +67,8 @@ int main(int argc, char *argv[]) } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/AssetWidget/CAssetDataMng.cpp b/product/src/gui/plugin/AssetWidget/CAssetDataMng.cpp index 61ae03a8..37046214 100644 --- a/product/src/gui/plugin/AssetWidget/CAssetDataMng.cpp +++ b/product/src/gui/plugin/AssetWidget/CAssetDataMng.cpp @@ -4,7 +4,7 @@ #include #include "CAssetUuid.h" -using namespace kbd_dbms; +using namespace iot_dbms; CAssetDataMng *CAssetDataMng::m_pInstance = NULL; @@ -653,7 +653,7 @@ QString CAssetDataMng::getRandomId() CAssetDataMng::CAssetDataMng(): m_referenceCount(0) { - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); } diff --git a/product/src/gui/plugin/AssetWidget/CAssetDataMng.h b/product/src/gui/plugin/AssetWidget/CAssetDataMng.h index 2a9e438f..180f3331 100644 --- a/product/src/gui/plugin/AssetWidget/CAssetDataMng.h +++ b/product/src/gui/plugin/AssetWidget/CAssetDataMng.h @@ -68,7 +68,7 @@ private: private: static CAssetDataMng * m_pInstance; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pWriteDb; int m_referenceCount; diff --git a/product/src/gui/plugin/AssetWidget/CAssetDelegate.cpp b/product/src/gui/plugin/AssetWidget/CAssetDelegate.cpp index 677d962f..39e1e6b8 100644 --- a/product/src/gui/plugin/AssetWidget/CAssetDelegate.cpp +++ b/product/src/gui/plugin/AssetWidget/CAssetDelegate.cpp @@ -11,7 +11,7 @@ CAssetDelegate::CAssetDelegate(CAssetTableModel *model, QObject *parent) m_pModel(model), style(QString()) { - style = QString::fromStdString(kbd_public::CFileStyle::getCurStyle()) ; + style = QString::fromStdString(iot_public::CFileStyle::getCurStyle()) ; } void CAssetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const @@ -44,7 +44,7 @@ void CAssetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option button.rect.adjust(option.rect.width() - 40, option.rect.height()/2-10, -12, -(option.rect.height()/2-10)); //QString file = "../../common/resource/zh/gui/icon/asset/record.png"; - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/asset/record.png").c_str(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/asset/record.png").c_str(); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); button.icon = QIcon(file); button.features = QStyleOptionButton::Flat; diff --git a/product/src/gui/plugin/AssetWidget/CAssetWidget.cpp b/product/src/gui/plugin/AssetWidget/CAssetWidget.cpp index 8a3307cc..b19990da 100644 --- a/product/src/gui/plugin/AssetWidget/CAssetWidget.cpp +++ b/product/src/gui/plugin/AssetWidget/CAssetWidget.cpp @@ -24,7 +24,7 @@ CAssetWidget::CAssetWidget(QWidget *parent, bool editMode) { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -38,7 +38,7 @@ CAssetWidget::CAssetWidget(QWidget *parent, bool editMode) qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("asset.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("asset.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AssetWidget/CPropertyDialog.cpp b/product/src/gui/plugin/AssetWidget/CPropertyDialog.cpp index 3dcf879c..0e76b495 100644 --- a/product/src/gui/plugin/AssetWidget/CPropertyDialog.cpp +++ b/product/src/gui/plugin/AssetWidget/CPropertyDialog.cpp @@ -16,7 +16,7 @@ CPropertyDialog::CPropertyDialog(int mode, int loc, QString devg, QWidget *paren ui->setupUi(this); this->setWindowTitle(tr("添加")); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -30,7 +30,7 @@ CPropertyDialog::CPropertyDialog(int mode, int loc, QString devg, QWidget *paren qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("asset.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("asset.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AssetWidget/CRecordDialog.cpp b/product/src/gui/plugin/AssetWidget/CRecordDialog.cpp index 64a7ec10..8a11be02 100644 --- a/product/src/gui/plugin/AssetWidget/CRecordDialog.cpp +++ b/product/src/gui/plugin/AssetWidget/CRecordDialog.cpp @@ -18,7 +18,7 @@ CRecordDialog::CRecordDialog(int mode, AssetInfo info, QWidget *parent) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -32,7 +32,7 @@ CRecordDialog::CRecordDialog(int mode, AssetInfo info, QWidget *parent) : qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("asset.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("asset.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/AssetWidget/CRecordPropertyDialog.cpp b/product/src/gui/plugin/AssetWidget/CRecordPropertyDialog.cpp index 229346c3..c3db2850 100644 --- a/product/src/gui/plugin/AssetWidget/CRecordPropertyDialog.cpp +++ b/product/src/gui/plugin/AssetWidget/CRecordPropertyDialog.cpp @@ -12,7 +12,7 @@ CRecordPropertyDialog::CRecordPropertyDialog(int mode, const AssetInfo &assetInf { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -26,7 +26,7 @@ CRecordPropertyDialog::CRecordPropertyDialog(int mode, const AssetInfo &assetInf qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("asset.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("asset.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/BIWidget/CBIWidget.cpp b/product/src/gui/plugin/BIWidget/CBIWidget.cpp index c3b7e7c2..15a09c70 100644 --- a/product/src/gui/plugin/BIWidget/CBIWidget.cpp +++ b/product/src/gui/plugin/BIWidget/CBIWidget.cpp @@ -38,8 +38,8 @@ void CBIWidget::initWidget(bool editMode) QGridLayout *layout = new QGridLayout(this); m_imageLabel = new QLabel(this); m_imageLabel->setScaledContents(true); - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); m_imageLabel->setPixmap(QPixmap(file)); layout->addWidget(m_imageLabel); setLayout(layout); @@ -64,8 +64,8 @@ bool CBIWidget::slotBIdentify() { return true; } - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); m_imageLabel->setPixmap(QPixmap(file)); if(!m_permMng) { @@ -82,8 +82,8 @@ void CBIWidget::slotCancelBIdentify() { m_isRecognizing = false; m_permMng->cancelBioIdentify(); - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); m_imageLabel->setPixmap(QPixmap(file)); } } @@ -210,8 +210,8 @@ void CBIWidget::slotRecvBioResult() delete[] img; if(pixmap.isNull()) { - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/bi/face_"+style+".png").c_str(); m_imageLabel->setPixmap(QPixmap(file)); } else diff --git a/product/src/gui/plugin/BIWidget/CBIWidget.h b/product/src/gui/plugin/BIWidget/CBIWidget.h index fcdcbc63..afe952f6 100644 --- a/product/src/gui/plugin/BIWidget/CBIWidget.h +++ b/product/src/gui/plugin/BIWidget/CBIWidget.h @@ -6,7 +6,7 @@ #include #include "perm_mng_api/PermMngApi.h" -using namespace kbd_service; +using namespace iot_service; class CBIWidget : public QWidget { diff --git a/product/src/gui/plugin/BreadcrumbNavWidget/CBreadcrumbNavWidget.cpp b/product/src/gui/plugin/BreadcrumbNavWidget/CBreadcrumbNavWidget.cpp index c2383331..9498d262 100644 --- a/product/src/gui/plugin/BreadcrumbNavWidget/CBreadcrumbNavWidget.cpp +++ b/product/src/gui/plugin/BreadcrumbNavWidget/CBreadcrumbNavWidget.cpp @@ -55,7 +55,7 @@ void CBreadcrumbNavWidget::initialize() void CBreadcrumbNavWidget::initStyleSheet() { - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("breadcrumbNav.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("breadcrumbNav.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -67,7 +67,7 @@ void CBreadcrumbNavWidget::initStyleSheet() void CBreadcrumbNavWidget::setCurrentGraph(const QString &data, const QString &name) { - std::string currentPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string currentPath = iot_public::CFileUtil::getCurModuleDir(); QDir dir(QString::fromStdString(currentPath)); dir.cdUp(); dir.cdUp(); diff --git a/product/src/gui/plugin/BreadcrumbNavWidget/CNavInfoManage.cpp b/product/src/gui/plugin/BreadcrumbNavWidget/CNavInfoManage.cpp index bf607cf5..5f3d75a8 100644 --- a/product/src/gui/plugin/BreadcrumbNavWidget/CNavInfoManage.cpp +++ b/product/src/gui/plugin/BreadcrumbNavWidget/CNavInfoManage.cpp @@ -10,7 +10,7 @@ CNavInfoManage::CNavInfoManage(QObject *parent) : QObject(parent) { - std::string currentPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string currentPath = iot_public::CFileUtil::getCurModuleDir(); QDir dir(QString::fromStdString(currentPath)); dir.cdUp(); dir.cdUp(); diff --git a/product/src/gui/plugin/BriefReportWidget/BriefReportWidget.cpp b/product/src/gui/plugin/BriefReportWidget/BriefReportWidget.cpp index 99f45885..950694f3 100644 --- a/product/src/gui/plugin/BriefReportWidget/BriefReportWidget.cpp +++ b/product/src/gui/plugin/BriefReportWidget/BriefReportWidget.cpp @@ -21,7 +21,7 @@ BriefReportWidget::BriefReportWidget(QWidget *parent, bool editMode) : ui->setupUi(this); QString qss; - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssFile1(QString::fromStdString(strFullPath)); qssFile1.open(QFile::ReadOnly); if (qssFile1.isOpen()) @@ -34,7 +34,7 @@ BriefReportWidget::BriefReportWidget(QWidget *parent, bool editMode) : { qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("BriefReport.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("BriefReport.qss") ; QFile qssFile2(QString::fromStdString(strFullPath)); qssFile2.open(QFile::ReadOnly); if (qssFile2.isOpen()) @@ -63,12 +63,12 @@ BriefReportWidget::~BriefReportWidget() { delete ui; -// kbd_public::StopLogSystem(); +// iot_public::StopLogSystem(); } void BriefReportWidget::Init() { -// kbd_public::StartLogSystem("HMI", "BriefReportWidget" ); +// iot_public::StartLogSystem("HMI", "BriefReportWidget" ); ui->PushButton3->setVisible(false); ui->PushButton4->setVisible(false); @@ -171,7 +171,7 @@ void BriefReportWidget::Init() void BriefReportWidget::InitData() { - kbd_dbms::CDbApi *m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi *m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { LOGERROR("打开数据库连接失败! %s", m_pReadDb->getLastErrorString().toStdString().c_str()); diff --git a/product/src/gui/plugin/BriefReportWidget/QueryThread.cpp b/product/src/gui/plugin/BriefReportWidget/QueryThread.cpp index 582b51e8..c850b045 100644 --- a/product/src/gui/plugin/BriefReportWidget/QueryThread.cpp +++ b/product/src/gui/plugin/BriefReportWidget/QueryThread.cpp @@ -6,7 +6,7 @@ QueryThread::QueryThread(): location_id(0) isStop = false; islocation = false; - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_HIS_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_HIS_READ); if (!m_pReadDb->open()) { LOGERROR("打开数据库连接失败! %s", m_pReadDb->getLastErrorString().toStdString().c_str()); diff --git a/product/src/gui/plugin/BriefReportWidget/QueryThread.h b/product/src/gui/plugin/BriefReportWidget/QueryThread.h index 79e4cf24..e23a4406 100644 --- a/product/src/gui/plugin/BriefReportWidget/QueryThread.h +++ b/product/src/gui/plugin/BriefReportWidget/QueryThread.h @@ -32,7 +32,7 @@ private: std::vector Events_Operates; //QVector Events_Operates; - kbd_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pReadDb; }; #endif // QUERYTHREAD_H diff --git a/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.cpp b/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.cpp index 59dfb42e..d19e1cf9 100644 --- a/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.cpp +++ b/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.cpp @@ -49,7 +49,7 @@ void BTRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("BusbarTemperatureWidget"); + m_pMbComm = new iot_net::CMbCommunicator("BusbarTemperatureWidget"); } } @@ -66,7 +66,7 @@ void BTRealDataCollect::clearMsg() { if(m_pMbComm) { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; while(m_pMbComm->recvMsg(objMsg, 0)) {} } @@ -107,14 +107,14 @@ void BTRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) { if(objMsg.isValid()) { - if(objMsg.getMsgType() != kbd_idlfile::MT_DP_CHANGE_DATA) + if(objMsg.getMsgType() != iot_idl::MT_DP_CHANGE_DATA) { continue; } @@ -160,16 +160,16 @@ void BTRealDataCollect::processChangeData() } } -int BTRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int BTRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -190,7 +190,7 @@ int BTRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -207,7 +207,7 @@ int BTRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -224,7 +224,7 @@ int BTRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; diff --git a/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.h b/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.h index 6ddd3d39..5ff99f2b 100644 --- a/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.h +++ b/product/src/gui/plugin/BusbarTemperatureWidget/BTRealDataCollect.h @@ -39,9 +39,9 @@ private: bool addSub(); bool delSub(); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; QMap> m_aiMap; diff --git a/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.cpp b/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.cpp index e5edd50e..26661ae1 100644 --- a/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.cpp +++ b/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.cpp @@ -215,8 +215,8 @@ void BusbarTemperatureWidget::initializeChart() initStyle(); - kbd_service::CDpcdaForApp::initGlobalThread(); - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + iot_service::CDpcdaForApp::initGlobalThread(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); //接收实时数据信号槽 connect(BTRealDataCollect::instance(), &BTRealDataCollect::signal_updateAi, this, &BusbarTemperatureWidget::slotUpdateAi); @@ -232,7 +232,7 @@ void BusbarTemperatureWidget::initializeChart() void BusbarTemperatureWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -242,7 +242,7 @@ void BusbarTemperatureWidget::initStyle() } qssfile1.close(); - std::string style = kbd_public::CFileStyle::getPathOfStyleFile("busbarTemperature.qss") ; + std::string style = iot_public::CFileStyle::getPathOfStyleFile("busbarTemperature.qss") ; QFile file(QString::fromStdString(style)); file.open(QFile::ReadOnly); if (file.isOpen()) @@ -509,7 +509,7 @@ void BusbarTemperatureWidget::onTreeClicked(QTreeWidgetItem *item, int column) chart->update(); //订阅实时数据 - kbd_dbms::CDbApi objReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReader(DB_CONN_MODEL_READ); if(!objReader.open()) { return;// tr("数据库连接打开失败!"); @@ -579,7 +579,7 @@ void BusbarTemperatureWidget::slotShowChange(bool checked) } -QString BusbarTemperatureWidget::QueryDevinfoTagName(const QString& groupTagName, kbd_dbms::CDbApi& objReader) const +QString BusbarTemperatureWidget::QueryDevinfoTagName(const QString& groupTagName, iot_dbms::CDbApi& objReader) const { if(!objReader.isOpen()) { @@ -588,11 +588,11 @@ QString BusbarTemperatureWidget::QueryDevinfoTagName(const QString& groupTagName QList listColName; listColName.append("DESCRIPTION"); - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "TAG_NAME"; objCondition.m_value = groupTagName; - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; QSqlQuery objQuery; if(objReader.select("dev_info", listColName, objCondition, objQuery)) @@ -605,7 +605,7 @@ QString BusbarTemperatureWidget::QueryDevinfoTagName(const QString& groupTagName return QString(); } -QMap BusbarTemperatureWidget::QueryAnalogTagName(const QString& device, kbd_dbms::CDbApi& objReader) +QMap BusbarTemperatureWidget::QueryAnalogTagName(const QString& device, iot_dbms::CDbApi& objReader) { if(!objReader.isOpen()) { @@ -616,11 +616,11 @@ QMap BusbarTemperatureWidget::QueryAnalogTagName(const QString listColName.append("TAG_NAME"); listColName.append("DESCRIPTION"); - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "DEVICE"; objCondition.m_value = device; - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; QSqlQuery objQuery; QMap analogTagName; diff --git a/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.h b/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.h index 509c3758..7fdb5951 100644 --- a/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.h +++ b/product/src/gui/plugin/BusbarTemperatureWidget/BusbarTemperatureWidget.h @@ -114,7 +114,7 @@ private: void initializeChart(); void initStyle(); bool m_isEditMode; - kbd_service::CDpcdaForApp* m_pDpcdaForApp; + iot_service::CDpcdaForApp* m_pDpcdaForApp; void subscribe(); void unsubscribeAll(); void updateChart(); @@ -142,8 +142,8 @@ private: QMap> m_barYValueMap; - QMap QueryAnalogTagName(const QString& device, kbd_dbms::CDbApi& objReader) ; - QString QueryDevinfoTagName(const QString& groupTagName, kbd_dbms::CDbApi& objReader) const; + QMap QueryAnalogTagName(const QString& device, iot_dbms::CDbApi& objReader) ; + QString QueryDevinfoTagName(const QString& groupTagName, iot_dbms::CDbApi& objReader) const; QString setDeviceTitle(); ShowInfoWidget* m_pPopupWidget; diff --git a/product/src/gui/plugin/BusbarTemperatureWidget/main.cpp b/product/src/gui/plugin/BusbarTemperatureWidget/main.cpp index f4d3ef98..b13f824c 100644 --- a/product/src/gui/plugin/BusbarTemperatureWidget/main.cpp +++ b/product/src/gui/plugin/BusbarTemperatureWidget/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem( "BASE", "alarm_statistics" ); + iot_public::StartLogSystem( "BASE", "alarm_statistics" ); BusbarTemperatureWidget w( 0, false ); w.show(); int nRet = a.exec(); - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); return nRet; } diff --git a/product/src/gui/plugin/ButtonGroupWidget/CButtonGroupWidget.cpp b/product/src/gui/plugin/ButtonGroupWidget/CButtonGroupWidget.cpp index e0a5d404..d3c04546 100644 --- a/product/src/gui/plugin/ButtonGroupWidget/CButtonGroupWidget.cpp +++ b/product/src/gui/plugin/ButtonGroupWidget/CButtonGroupWidget.cpp @@ -106,7 +106,7 @@ void CButtonGroupWidget::initView() return; } - std::string currentPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string currentPath = iot_public::CFileUtil::getCurModuleDir(); QDir dir(QString::fromStdString(currentPath)); dir.cdUp(); dir.cdUp(); diff --git a/product/src/gui/plugin/ButtonGroupWidget/CJsonReader.cpp b/product/src/gui/plugin/ButtonGroupWidget/CJsonReader.cpp index 756d98e0..6782bda5 100644 --- a/product/src/gui/plugin/ButtonGroupWidget/CJsonReader.cpp +++ b/product/src/gui/plugin/ButtonGroupWidget/CJsonReader.cpp @@ -9,7 +9,7 @@ CJsonReader::CJsonReader(QObject *parent) : QObject(parent) { - std::string currentPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string currentPath = iot_public::CFileUtil::getCurModuleDir(); QDir dir(QString::fromStdString(currentPath)); dir.cdUp(); dir.cdUp(); diff --git a/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.cpp b/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.cpp index d522b457..e396f988 100644 --- a/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.cpp +++ b/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.cpp @@ -48,7 +48,7 @@ void CRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("ChanStatusWidget"); + m_pMbComm = new iot_net::CMbCommunicator("ChanStatusWidget"); } } @@ -65,7 +65,7 @@ void CRealDataCollect::clearMsg() { if(m_pMbComm) { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; while(m_pMbComm->recvMsg(objMsg, 0)) {} } @@ -106,14 +106,14 @@ void CRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) { if(objMsg.isValid()) { - if(objMsg.getMsgType() != kbd_idlfile::MT_DP_CHANGE_DATA) + if(objMsg.getMsgType() != iot_idl::MT_DP_CHANGE_DATA) { continue; } @@ -165,16 +165,16 @@ void CRealDataCollect::processChangeData() } } -int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int CRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -191,7 +191,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -208,7 +208,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -225,7 +225,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; @@ -242,44 +242,44 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int utSize = changeDataPackage.sttblrtd_size(); if(utSize > 0) { - kbd_idlfile::STableRealTimeData uiStu; + iot_idl::STableRealTimeData uiStu; QString tagName; QVariant value; for(int i = 0;i < utSize; i++) { uiStu = changeDataPackage.sttblrtd(i); tagName = QString::fromStdString(uiStu.strtagname()); - kbd_idlfile::SVariable temp = uiStu.varvalue(); - if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_BOOL) + iot_idl::SVariable temp = uiStu.varvalue(); + if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_BOOL) { value = QVariant::fromValue(temp.bvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_UINT32) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_UINT32) { value = QVariant::fromValue(temp.uvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_INT32) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_INT32) { value = QVariant::fromValue(temp.nvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_UINT64) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_UINT64) { value = QVariant::fromValue(temp.ulvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_INT64) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_INT64) { value = QVariant::fromValue(temp.lvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_FLOAT) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_FLOAT) { value = QVariant::fromValue(temp.fvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_DOUBLE) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_DOUBLE) { value = QVariant::fromValue(temp.dvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_STRING || - temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_BYTES) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_STRING || + temp.edatatype() == iot_idl::DataType::CN_DATATYPE_BYTES) { QString str = QString::fromStdString(temp.strvalue()); value = QVariant::fromValue(str); diff --git a/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.h b/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.h index d8f1bea9..00e67155 100644 --- a/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.h +++ b/product/src/gui/plugin/ChanStatusWidget/CRealDataCollect.h @@ -26,7 +26,7 @@ private: bool addSub(); bool delSub(); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); private slots: void recvMessage(); @@ -40,7 +40,7 @@ signals: void signal_updateUi(QMap uiMap); private: - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; QMap> m_aiMap; diff --git a/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.cpp b/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.cpp index 83119d0e..56212972 100644 --- a/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.cpp +++ b/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.cpp @@ -84,7 +84,7 @@ void ChanStatusWidget::setColumnWidth(int column, int width) void ChanStatusWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -93,7 +93,7 @@ void ChanStatusWidget::initStyle() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("chanStatus.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("chanStatus.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -140,7 +140,7 @@ void ChanStatusWidget::initView() void ChanStatusWidget::initData() { - kbd_dbms::CDbApi objDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objDbApi(DB_CONN_MODEL_READ); if(!objDbApi.open()) { LOGERROR("关系库打开失败 %s", objDbApi.getLastErrorString().toStdString().c_str()); @@ -154,8 +154,8 @@ void ChanStatusWidget::initData() listColName << "LOCATION_ID"; listColName << "TAG_NAME"; listColName << "DESCRIPTION"; - QList listOrderBy; - listOrderBy << kbd_dbms::CDbOrder("LOCATION_ID", kbd_dbms::CDbOrder::ORDER_ASC); + QList listOrderBy; + listOrderBy << iot_dbms::CDbOrder("LOCATION_ID", iot_dbms::CDbOrder::ORDER_ASC); if(!objDbApi.select("sys_model_location_info", listColName, listOrderBy, objQuery)) { LOGERROR("查询位置信息失败 %s", objDbApi.getLastErrorString().toStdString().c_str()); @@ -205,8 +205,8 @@ void ChanStatusWidget::initData() listColName << "NET_DESC3"; listColName << "NET_DESC4"; listColName << "COMM_PROPERTY"; - QList listOrderBy; - listOrderBy << kbd_dbms::CDbOrder("CHAN_NO", kbd_dbms::CDbOrder::ORDER_ASC); + QList listOrderBy; + listOrderBy << iot_dbms::CDbOrder("CHAN_NO", iot_dbms::CDbOrder::ORDER_ASC); if(!objDbApi.select("fes_channel_para", listColName, listOrderBy, objQuery)) { LOGERROR("查询通道信息失败 %s", objDbApi.getLastErrorString().toStdString().c_str()); @@ -295,7 +295,7 @@ void ChanStatusWidget::initData() void ChanStatusWidget::initConnect() { - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); connect(m_pTreeWidget, &QTreeWidget::itemClicked, this, &ChanStatusWidget::slotItemClicked); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateUi, this, &ChanStatusWidget::slotUpdateUi); diff --git a/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.h b/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.h index e6ae2b06..5c555d85 100644 --- a/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.h +++ b/product/src/gui/plugin/ChanStatusWidget/ChanStatusWidget.h @@ -42,7 +42,7 @@ private: QTableView * m_pTableView; QPushButton * m_btnExport; ChanTableModel * m_pChanModel; - kbd_service::CDpcdaForApp *m_pDpcdaForApp; + iot_service::CDpcdaForApp *m_pDpcdaForApp; QMap > m_locMap; //< ID, QMap> m_dataMap; //< LOC_TAG - Chan }; diff --git a/product/src/gui/plugin/ChanStatusWidget/main.cpp b/product/src/gui/plugin/ChanStatusWidget/main.cpp index 4cfcb9f1..199906d8 100644 --- a/product/src/gui/plugin/ChanStatusWidget/main.cpp +++ b/product/src/gui/plugin/ChanStatusWidget/main.cpp @@ -6,13 +6,13 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { QApplication a(argc, argv); @@ -22,10 +22,10 @@ int main(int argc, char *argv[]) a.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ConstCurves/CConstCurves.cpp b/product/src/gui/plugin/ConstCurves/CConstCurves.cpp index 33ac160b..4fcffc5d 100644 --- a/product/src/gui/plugin/ConstCurves/CConstCurves.cpp +++ b/product/src/gui/plugin/ConstCurves/CConstCurves.cpp @@ -16,7 +16,7 @@ CConstCurves::CConstCurves(bool editMode, QVector ptrVec, QWidget *paren initView(); QString style = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("constCurves.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("constCurves.qss") ; QFile file1(QString::fromStdString(strFullPath)); if (file1.open(QIODevice::ReadOnly)) { @@ -26,7 +26,7 @@ CConstCurves::CConstCurves(bool editMode, QVector ptrVec, QWidget *paren } file1.close(); - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("constCurves.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("constCurves.qss") ; QFile file2(QString::fromStdString(strFullPath)); if (file2.open(QIODevice::ReadOnly)) { diff --git a/product/src/gui/plugin/ConstCurves/CDbInterface.cpp b/product/src/gui/plugin/ConstCurves/CDbInterface.cpp index 0c134832..98c282aa 100644 --- a/product/src/gui/plugin/ConstCurves/CDbInterface.cpp +++ b/product/src/gui/plugin/ConstCurves/CDbInterface.cpp @@ -1,6 +1,6 @@ #include "CDbInterface.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbInterface::CDbInterface() : m_pReadDb(NULL) diff --git a/product/src/gui/plugin/ConstCurves/CDbInterface.h b/product/src/gui/plugin/ConstCurves/CDbInterface.h index 6a3d2e4c..84c7c6ea 100644 --- a/product/src/gui/plugin/ConstCurves/CDbInterface.h +++ b/product/src/gui/plugin/ConstCurves/CDbInterface.h @@ -34,7 +34,7 @@ private: void readFesConst(); private: - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; QMultiMap m_fesConstMap; }; diff --git a/product/src/gui/plugin/ConstCurves/CMessageManage.cpp b/product/src/gui/plugin/ConstCurves/CMessageManage.cpp index a5e2d83b..bdb63201 100644 --- a/product/src/gui/plugin/ConstCurves/CMessageManage.cpp +++ b/product/src/gui/plugin/ConstCurves/CMessageManage.cpp @@ -31,7 +31,7 @@ CMessageManage::~CMessageManage() bool CMessageManage::sendMessage(const SReadQueue& queueList, int nDstDomainId) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; msg.setMsgType(MT_OPT_COMMON_DOWN); msg.setSubject(E_PSCADA_APPID, CH_HMI_TO_OPT_OPTCMD_DOWN); COptCustCtrlRequest cOptCustCtrlRequest; @@ -63,7 +63,7 @@ bool CMessageManage::sendMessage(const SReadQueue& queueList, int nDstDomainId) void CMessageManage::recvMessage() { // test(); - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; if(m_communicator->recvMsg(msg, 50)) { if(msg.getMsgType() != MT_OPT_COMMON_UP) @@ -111,7 +111,7 @@ void CMessageManage::initMsg() { if(m_communicator == NULL) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } diff --git a/product/src/gui/plugin/ConstCurves/CMessageManage.h b/product/src/gui/plugin/ConstCurves/CMessageManage.h index bd99137a..1af05921 100644 --- a/product/src/gui/plugin/ConstCurves/CMessageManage.h +++ b/product/src/gui/plugin/ConstCurves/CMessageManage.h @@ -30,8 +30,8 @@ struct SReplyQueue QList valueList; }; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_service; class CMessageManage : public QObject { Q_OBJECT @@ -61,7 +61,7 @@ private: void test(); private: - kbd_net::CMbCommunicator *m_communicator; + iot_net::CMbCommunicator *m_communicator; CSysInfoInterfacePtr m_sysInfo; CPermMngApiPtr m_permMng; QTimer *m_timer; diff --git a/product/src/gui/plugin/ConstCurves/main.cpp b/product/src/gui/plugin/ConstCurves/main.cpp index a01ad988..3007447a 100644 --- a/product/src/gui/plugin/ConstCurves/main.cpp +++ b/product/src/gui/plugin/ConstCurves/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { LOGINFO("===========================ConstCurves==========================="); @@ -36,10 +36,10 @@ int main(int argc, char *argv[]) app.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/DataOptWidget/CDataOptWidget.cpp b/product/src/gui/plugin/DataOptWidget/CDataOptWidget.cpp index 7a3f7efe..06d5911e 100644 --- a/product/src/gui/plugin/DataOptWidget/CDataOptWidget.cpp +++ b/product/src/gui/plugin/DataOptWidget/CDataOptWidget.cpp @@ -9,9 +9,9 @@ #include "perm_mng_api/PermMngApi.h" #include "pub_logger_api/logger.h" #include "pub_sysinfo_api/SysInfoApi.h" -using namespace kbd_dbms; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_dbms; +using namespace iot_public; +using namespace iot_service; CDataOptWidget::CDataOptWidget(bool editMode, QWidget *parent) : QWidget(parent), @@ -110,7 +110,7 @@ void CDataOptWidget::setTagType(int actual) void CDataOptWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -119,7 +119,7 @@ void CDataOptWidget::initStyleSheet() qssfile1.close(); } -// strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; +// strFullPath = iot_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; // QFile qssfile2(QString::fromStdString(strFullPath)); // qssfile2.open(QFile::ReadOnly); // if (qssfile2.isOpen()) @@ -382,7 +382,7 @@ void CDataOptWidget::updateCount() bool CDataOptWidget::permCheck(int location, int region) { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); QString mess; if(permMngPtr != NULL) { @@ -437,7 +437,7 @@ void CDataOptWidget::initMsg() { if(m_communicator == Q_NULLPTR) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } @@ -693,7 +693,7 @@ bool CDataOptWidget::cancelItemSetValue(const QString &desc,const QString &tagNa void CDataOptWidget::removeOptTagInfo(const STOptTagInfo &info) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; msg.setMsgType(MT_OPT_COMMON_DOWN); msg.setSubject(info.subSystem, CH_HMI_TO_OPT_OPTCMD_DOWN); SOptTagSet sOptTagSet; diff --git a/product/src/gui/plugin/DataOptWidget/CDataOptWidget.h b/product/src/gui/plugin/DataOptWidget/CDataOptWidget.h index a39fc380..d8c2baf8 100644 --- a/product/src/gui/plugin/DataOptWidget/CDataOptWidget.h +++ b/product/src/gui/plugin/DataOptWidget/CDataOptWidget.h @@ -92,10 +92,10 @@ signals: private: Ui::CDataOptWidget *ui; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; - kbd_net::CMbCommunicator *m_communicator; - kbd_public::CSysInfoInterfacePtr m_pSysInfo; + iot_net::CMbCommunicator *m_communicator; + iot_public::CSysInfoInterfacePtr m_pSysInfo; QMap m_locMap; QList m_locOrder; QMap m_subMap; diff --git a/product/src/gui/plugin/DataOptWidget/CDataOptWork.cpp b/product/src/gui/plugin/DataOptWidget/CDataOptWork.cpp index 391350cc..d3939066 100644 --- a/product/src/gui/plugin/DataOptWidget/CDataOptWork.cpp +++ b/product/src/gui/plugin/DataOptWidget/CDataOptWork.cpp @@ -2,7 +2,7 @@ #include "Common.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDataOptWork::CDataOptWork(QObject *parent) : QObject(parent) { m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); @@ -72,7 +72,7 @@ void CDataOptWork::slotSearch(int domainId, int appid) bool CDataOptWork::readTagInfo() { m_optTagInfoList.clear(); - kbd_idlfile::RdbRet objRdbRet; + iot_idl::RdbRet objRdbRet; bool bRet = false; std::vector vecColumn = {"key_id_tag","tag_type","opt_time","location_id","sub_system","set_value","state_text","host_name","user_name","user_group"}; diff --git a/product/src/gui/plugin/DataOptWidget/CDataOptWork.h b/product/src/gui/plugin/DataOptWidget/CDataOptWork.h index c31a9cae..e5435d91 100644 --- a/product/src/gui/plugin/DataOptWidget/CDataOptWork.h +++ b/product/src/gui/plugin/DataOptWidget/CDataOptWork.h @@ -51,8 +51,8 @@ private: private: - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbNetApi m_objRdbNetApi; //< 网络查询对象 + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbNetApi m_objRdbNetApi; //< 网络查询对象 QList m_optTagInfoList; QMap m_TagInfoMap; diff --git a/product/src/gui/plugin/DataOptWidget/main.cpp b/product/src/gui/plugin/DataOptWidget/main.cpp index 1e1e5b2d..e7125b39 100644 --- a/product/src/gui/plugin/DataOptWidget/main.cpp +++ b/product/src/gui/plugin/DataOptWidget/main.cpp @@ -8,12 +8,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("HMI", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/DevHisDataWidget/CDbInterface.cpp b/product/src/gui/plugin/DevHisDataWidget/CDbInterface.cpp index 95af14eb..c0e20869 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CDbInterface.cpp +++ b/product/src/gui/plugin/DevHisDataWidget/CDbInterface.cpp @@ -2,7 +2,7 @@ #include "public/pub_sysinfo_api/SysInfoApi.h" #include "public/pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbInterface::CDbInterface() : m_pReadDb(NULL), @@ -38,12 +38,12 @@ void CDbInterface::initialize() LOGERROR("打开数据库连接失败! %s", m_pReadDb->getLastErrorString().toStdString().c_str()); } - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); nCurDomain = CN_InvalidDomainId; - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); } diff --git a/product/src/gui/plugin/DevHisDataWidget/CDbInterface.h b/product/src/gui/plugin/DevHisDataWidget/CDbInterface.h index 3f3a3303..f6bd3e22 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CDbInterface.h +++ b/product/src/gui/plugin/DevHisDataWidget/CDbInterface.h @@ -29,8 +29,8 @@ private: void loadDictMenuInfo(); private: - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbAccess; int nCurDomain; QMap > m_dictText; //< state_text_name actual_value,display_value QMap m_dictMenu; //< menu_macro_name,actual_value diff --git a/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.cpp b/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.cpp index 294c4697..02a125a7 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.cpp +++ b/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.cpp @@ -22,7 +22,7 @@ CDevHisDataWidget::CDevHisDataWidget(bool editMode, QVector ptrVec, QWid ui->setupUi(this); QString style = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile file1(QString::fromStdString(strFullPath)); if (file1.open(QIODevice::ReadOnly)) { @@ -32,7 +32,7 @@ CDevHisDataWidget::CDevHisDataWidget(bool editMode, QVector ptrVec, QWid } file1.close(); - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("deviceHisData.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("deviceHisData.qss") ; QFile file2(QString::fromStdString(strFullPath)); if (file2.open(QIODevice::ReadOnly)) { @@ -171,7 +171,7 @@ void CDevHisDataWidget::initView() void CDevHisDataWidget::initData() { - kbd_dbms::initTsdbApi(); + iot_dbms::initTsdbApi(); m_dbInterface = new CDbInterface(); m_hisDataManage = new CHisDataManage(Q_NULLPTR, m_dbInterface); diff --git a/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.h b/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.h index db56f48b..2b686c5b 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.h +++ b/product/src/gui/plugin/DevHisDataWidget/CDevHisDataWidget.h @@ -14,7 +14,7 @@ struct SDevManage { QString tag_name; QString description; - kbd_dbms::EnMeasPiontType pointType; //< MPT_AI ,MPT_DI ,MPT_MIX ,MPT_ACC + iot_dbms::EnMeasPiontType pointType; //< MPT_AI ,MPT_DI ,MPT_MIX ,MPT_ACC }; class CDevHisDataWidget : public QWidget diff --git a/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.cpp b/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.cpp index 5f685d48..bc9fc301 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.cpp +++ b/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.cpp @@ -20,7 +20,7 @@ CHisDataManage::~CHisDataManage() } } -bool CHisDataManage::getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr) +bool CHisDataManage::getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr) { if(m_tsdbConnPtr != NULL) { diff --git a/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.h b/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.h index c3ed0534..89b4b131 100644 --- a/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.h +++ b/product/src/gui/plugin/DevHisDataWidget/CHisDataManage.h @@ -8,7 +8,7 @@ #include "db_his_query_api/DbHisQueryApi.h" #include "CDbInterface.h" -using namespace kbd_dbms; +using namespace iot_dbms; class CHisDataManage : public QObject { Q_OBJECT @@ -24,11 +24,11 @@ signals: std::vector *> *vecResult); private: - bool getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr); + bool getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr); private: CDbInterface *m_dbInterface; - kbd_dbms::CTsdbConnPtr m_tsdbConnPtr; + iot_dbms::CTsdbConnPtr m_tsdbConnPtr; }; #endif // CHISDATAMANAGE_H diff --git a/product/src/gui/plugin/DevHisDataWidget/main.cpp b/product/src/gui/plugin/DevHisDataWidget/main.cpp index 6e696473..2ddedafc 100644 --- a/product/src/gui/plugin/DevHisDataWidget/main.cpp +++ b/product/src/gui/plugin/DevHisDataWidget/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { LOGINFO("=========================== CDevHisDataWidget ==========================="); @@ -35,10 +35,10 @@ int main(int argc, char *argv[]) app.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/DevRealDataWidget/CDbInterface.cpp b/product/src/gui/plugin/DevRealDataWidget/CDbInterface.cpp index 2321ed8a..e33e5384 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CDbInterface.cpp +++ b/product/src/gui/plugin/DevRealDataWidget/CDbInterface.cpp @@ -2,8 +2,8 @@ #include "service/perm_mng_api/PermMngApi.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; -using namespace kbd_public; +using namespace iot_dbms; +using namespace iot_public; CDbInterface *CDbInterface::m_pInstance = NULL; @@ -12,7 +12,7 @@ CDbInterface::CDbInterface() m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); m_pReadDb->open(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); readUnitInfo(); readDiStatus(); @@ -449,7 +449,7 @@ QString CDbInterface::getAiStatusStr(int status) void CDbInterface::loadRTLocation() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -471,8 +471,8 @@ void CDbInterface::loadRTLocation() id_value.second = "description"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back(id_value.first); columns.push_back(id_value.second); @@ -483,8 +483,8 @@ void CDbInterface::loadRTLocation() m_locationInfo.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); diff --git a/product/src/gui/plugin/DevRealDataWidget/CDbInterface.h b/product/src/gui/plugin/DevRealDataWidget/CDbInterface.h index cde8eda8..55e5f113 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CDbInterface.h +++ b/product/src/gui/plugin/DevRealDataWidget/CDbInterface.h @@ -62,8 +62,8 @@ private: private: static CDbInterface * m_pInstance; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_mapUnit; QMap m_mapDiStatus; QMap m_mapAiStatus; diff --git a/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.cpp b/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.cpp index d507c45d..acac7897 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.cpp +++ b/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.cpp @@ -9,9 +9,9 @@ #include #include "SetValueInputDialog.h" -using namespace kbd_dbms; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_dbms; +using namespace iot_public; +using namespace iot_service; CDevRealDataWidget::CDevRealDataWidget(bool editMode, QVector ptrVec, QWidget *parent) : QWidget(parent), ui(new Ui::CDevRealDataWidget), @@ -36,7 +36,7 @@ CDevRealDataWidget::CDevRealDataWidget(bool editMode, QVector ptrVec, QW qRegisterMetaType>>("QMap>"); qRegisterMetaType>>("QMap>"); - if(!kbd_public::createSysInfoInstance(m_sysInfoPtr)) + if(!iot_public::createSysInfoInstance(m_sysInfoPtr)) { LOGERROR("创建系统信息访问库实例失败!"); return; @@ -84,7 +84,7 @@ void CDevRealDataWidget::initMsg() { if(m_communicator == NULL) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } @@ -161,7 +161,7 @@ void CDevRealDataWidget::setShowSubSystem(bool isShow) void CDevRealDataWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -171,7 +171,7 @@ void CDevRealDataWidget::initStyleSheet() } qssfile1.close(); - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("deviceRealData.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("deviceRealData.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -224,7 +224,7 @@ void CDevRealDataWidget::initialize() } //< 初始化订阅线程 - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); m_realDataCollect = new CRealDataCollect; m_pCollectThread = new QThread(this); m_realDataCollect->moveToThread(m_pCollectThread); @@ -1075,7 +1075,7 @@ void CDevRealDataWidget::slotDisableCtrlBtnClick() bool CDevRealDataWidget::OptTagInfo(const STOptTagInfo &info) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; msg.setMsgType(MT_OPT_COMMON_DOWN); msg.setSubject(info.subSystem, CH_HMI_TO_OPT_OPTCMD_DOWN); SOptTagSet sOptTagSet; diff --git a/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.h b/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.h index 9ce55d54..5c7499ab 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.h +++ b/product/src/gui/plugin/DevRealDataWidget/CDevRealDataWidget.h @@ -102,7 +102,7 @@ private slots: void slotDisableCtrlBtnClick();//禁止控制 private: Ui::CDevRealDataWidget *ui; - kbd_service::CDpcdaForApp *m_pDpcdaForApp; + iot_service::CDpcdaForApp *m_pDpcdaForApp; CRealDataCollect *m_realDataCollect; QThread *m_pCollectThread; CRealTableModel *m_realModel; @@ -111,13 +111,13 @@ private: QString m_devg;//search QList m_devList; //search - kbd_net::CMbCommunicator *m_communicator; + iot_net::CMbCommunicator *m_communicator; int m_curUserId; int m_curUsergId; - kbd_public::CSysInfoInterfacePtr m_sysInfoPtr; - kbd_public::SNodeInfo m_nodeInfo; + iot_public::CSysInfoInterfacePtr m_sysInfoPtr; + iot_public::SNodeInfo m_nodeInfo; QMap> m_aiMap; //模拟量序号和设备标签 QMap> m_diMap; //数字量序号和设备标签 diff --git a/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.cpp b/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.cpp index f5f42068..ae8a7b98 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.cpp +++ b/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.cpp @@ -40,7 +40,7 @@ void CRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("DevRealDataWidget"); + m_pMbComm = new iot_net::CMbCommunicator("DevRealDataWidget"); } } @@ -88,7 +88,7 @@ void CRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) @@ -96,7 +96,7 @@ void CRealDataCollect::recvMessage() if(objMsg.isValid()) { if(objMsg.getChannelID() == CH_SCADA_TO_HMI_DATA_CHANGE - && objMsg.getMsgType() == kbd_idlfile::MT_DP_CHANGE_DATA) + && objMsg.getMsgType() == iot_idl::MT_DP_CHANGE_DATA) { parserMsg(objMsg); } @@ -137,16 +137,16 @@ void CRealDataCollect::processChangeData() } } -int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int CRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -164,7 +164,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -182,7 +182,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -200,7 +200,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; diff --git a/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.h b/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.h index a6724d94..e65bbe30 100644 --- a/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.h +++ b/product/src/gui/plugin/DevRealDataWidget/CRealDataCollect.h @@ -24,7 +24,7 @@ private: bool addSub(int appID, int channel); bool delSub(int appID, int channel); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); private slots: void recvMessage(); @@ -37,7 +37,7 @@ signals: void signal_updateMi(QMap> miMap); private: - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; QMap> m_aiMap; diff --git a/product/src/gui/plugin/DevRealDataWidget/main.cpp b/product/src/gui/plugin/DevRealDataWidget/main.cpp index e2cdcd24..5e48a37f 100644 --- a/product/src/gui/plugin/DevRealDataWidget/main.cpp +++ b/product/src/gui/plugin/DevRealDataWidget/main.cpp @@ -6,12 +6,12 @@ int main(int argc, char *argv[]) { - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { QVector ptrVec; @@ -33,9 +33,9 @@ int main(int argc, char *argv[]) a.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); + iot_net::releaseMsgBus(); return 0; } diff --git a/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.cpp b/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.cpp index a6aba3f2..e3707f0f 100644 --- a/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.cpp +++ b/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.cpp @@ -54,7 +54,7 @@ QString CDevSpePointWidget::addRow(const QString &pointTag) return tr("测点标签为空!"); } - kbd_dbms::CDbApi objReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReader(DB_CONN_MODEL_READ); if(!objReader.open()) { return tr("数据库连接打开失败!"); @@ -210,7 +210,7 @@ QString CDevSpePointWidget::addRow(const QString &pointTag) QString valueType = list[5]; device = queryGetDevInfoTagName(valueType, device, objReader); - kbd_dbms::CDbApi descriptionReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi descriptionReader(DB_CONN_MODEL_READ); if(!descriptionReader.open()) { return tr("数据库连接打开失败!"); @@ -334,7 +334,7 @@ QString CDevSpePointWidget::addRowName(const QString &pointTag, const QString &D return str; } - kbd_dbms::CDbApi objReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReader(DB_CONN_MODEL_READ); if(!objReader.open()) { return tr("数据库连接打开失败!"); @@ -472,7 +472,7 @@ QString CDevSpePointWidget::addRowName(const QString &pointTag, const QString &D QString valueType = list[5]; device = queryGetDevInfoTagName(valueType, device, objReader); - kbd_dbms::CDbApi descriptionReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi descriptionReader(DB_CONN_MODEL_READ); if(!descriptionReader.open()) { return tr("数据库连接打开失败!"); @@ -521,7 +521,7 @@ QString CDevSpePointWidget::addColumn(const QString &title, const QString &point { return tr("测点标签为空!"); } - kbd_dbms::CDbApi objReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReader(DB_CONN_MODEL_READ); if(!objReader.open()) { return tr("数据库连接打开失败!"); @@ -906,7 +906,7 @@ void CDevSpePointWidget::initialize() qRegisterMetaType>>("QMap>"); qRegisterMetaType>>("QMap>"); - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateAi, this, &CDevSpePointWidget::slotUpdateAi); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateDi, this, &CDevSpePointWidget::slotUpdateDi); @@ -917,7 +917,7 @@ void CDevSpePointWidget::initialize() void CDevSpePointWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss"); + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss"); qDebug() << "strFullPath-->" << QString::fromStdString(strFullPath); QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); @@ -929,7 +929,7 @@ void CDevSpePointWidget::initStyle() } qssfile1.close(); - std::string style = kbd_public::CFileStyle::getPathOfStyleFile("devSpePoint.qss") ; + std::string style = iot_public::CFileStyle::getPathOfStyleFile("devSpePoint.qss") ; qDebug() << "Style Path-->" << QString::fromStdString(style); QFile file(QString::fromStdString(style)); file.open(QFile::ReadOnly); @@ -941,7 +941,7 @@ void CDevSpePointWidget::initStyle() } } -QString CDevSpePointWidget::queryDeviceDesc(const QString &devTag, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryDeviceDesc(const QString &devTag, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -950,11 +950,11 @@ QString CDevSpePointWidget::queryDeviceDesc(const QString &devTag, kbd_dbms::CDb QList listColName; listColName.append("DESCRIPTION"); - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "TAG_NAME"; objCondition.m_value = devTag; - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; QSqlQuery objQuery; if(objReader.select("dev_info", listColName, objCondition, objQuery)) @@ -967,7 +967,7 @@ QString CDevSpePointWidget::queryDeviceDesc(const QString &devTag, kbd_dbms::CDb return QString(); } -QString CDevSpePointWidget::queryDigitalStateText(const QString &point, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryDigitalStateText(const QString &point, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -975,11 +975,11 @@ QString CDevSpePointWidget::queryDigitalStateText(const QString &point, kbd_dbms } QList listColName; listColName.append("STATE_TEXT_NAME"); - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "TAG_NAME"; objCondition.m_value = point; - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; QSqlQuery objQuery; if(objReader.select("digital", listColName, objCondition, objQuery)) @@ -993,7 +993,7 @@ QString CDevSpePointWidget::queryDigitalStateText(const QString &point, kbd_dbms } //获取设备组名,仅deviceOrGroupType==1时使用 -QString CDevSpePointWidget::queryGetGroupDescription(const QString &tagName, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryGetGroupDescription(const QString &tagName, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -1002,11 +1002,11 @@ QString CDevSpePointWidget::queryGetGroupDescription(const QString &tagName, kbd QList listColName; listColName.append("DESCRIPTION"); //需要取的值 - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "TAG_NAME"; //比较的组名 objCondition.m_value = tagName; // 比较的值 - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; // 比较条件 - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; // 两个比较条件之间的关系 + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; // 比较条件 + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; // 两个比较条件之间的关系 QSqlQuery objQuery; if(objReader.select("dev_group", listColName, objCondition, objQuery)) @@ -1020,7 +1020,7 @@ QString CDevSpePointWidget::queryGetGroupDescription(const QString &tagName, kbd } //获取设备组里第1个存在的列标题值的设备名,仅deviceOrGroupType==1时使用 -QString CDevSpePointWidget::queryGetCollumnDevInfoTagName(const QString &measureType, const QString &valueType, const QString &groupName, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryGetCollumnDevInfoTagName(const QString &measureType, const QString &valueType, const QString &groupName, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -1047,7 +1047,7 @@ QString CDevSpePointWidget::queryGetCollumnDevInfoTagName(const QString &measu } //以第1个存在VA值的设备名为列标题时,仅deviceOrGroupType==2时使用 -QString CDevSpePointWidget::queryGetDevInfoTagName(const QString &valueType, const QString &groupTagName, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryGetDevInfoTagName(const QString &valueType, const QString &groupTagName, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -1072,7 +1072,7 @@ QString CDevSpePointWidget::queryGetDevInfoTagName(const QString &valueType, con } //获取某组设备里的设备名,仅deviceOrGroupType==2时使用 -QString CDevSpePointWidget::queryGetDevInfoDescription(const QString &deviceTagName, kbd_dbms::CDbApi &objReader) const +QString CDevSpePointWidget::queryGetDevInfoDescription(const QString &deviceTagName, iot_dbms::CDbApi &objReader) const { if(!objReader.isOpen()) { @@ -1081,11 +1081,11 @@ QString CDevSpePointWidget::queryGetDevInfoDescription(const QString &deviceTagN QList listColName; listColName.append("DESCRIPTION"); //是objCondition.m_value的组名 - kbd_dbms::CDbCondition objCondition; + iot_dbms::CDbCondition objCondition; objCondition.m_sColName = "TAG_NAME"; //比较的字段名 objCondition.m_value = deviceTagName; //比较的值 - objCondition.m_eCompare = kbd_dbms::CDbCondition::COMPARE_EQ; //比较条件 - objCondition.m_eLogic = kbd_dbms::CDbCondition::LOGIC_AND; //两个比较条件之间的关系 + objCondition.m_eCompare = iot_dbms::CDbCondition::COMPARE_EQ; //比较条件 + objCondition.m_eLogic = iot_dbms::CDbCondition::LOGIC_AND; //两个比较条件之间的关系 QSqlQuery objQuery; if(objReader.select("dev_info", listColName, objCondition, objQuery)) diff --git a/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.h b/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.h index ca96033d..231728bb 100644 --- a/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.h +++ b/product/src/gui/plugin/DevSpePointWidget/CDevSpePointWidget.h @@ -102,17 +102,17 @@ private: void initialize(); void initStyle(); - QString queryDeviceDesc(const QString &devTag, kbd_dbms::CDbApi &objReader) const; - QString queryDigitalStateText(const QString &point, kbd_dbms::CDbApi &objReader) const; - QString queryGetGroupDescription(const QString &tagName, kbd_dbms::CDbApi &objReader) const; + QString queryDeviceDesc(const QString &devTag, iot_dbms::CDbApi &objReader) const; + QString queryDigitalStateText(const QString &point, iot_dbms::CDbApi &objReader) const; + QString queryGetGroupDescription(const QString &tagName, iot_dbms::CDbApi &objReader) const; QString queryGetCollumnDevInfoTagName(const QString &measureType, const QString &valueType, - const QString &groupTagName, kbd_dbms::CDbApi &objReader) const; - QString queryGetDevInfoTagName(const QString &valueType, const QString &groupTagName, kbd_dbms::CDbApi &objReader) const; - QString queryGetAnalogTagName(const QString &valueType, const QString &deviceName, kbd_dbms::CDbApi &objReader) const; - QString queryGetDevInfoDescription(const QString &deviceTagName, kbd_dbms::CDbApi &objReader) const; + const QString &groupTagName, iot_dbms::CDbApi &objReader) const; + QString queryGetDevInfoTagName(const QString &valueType, const QString &groupTagName, iot_dbms::CDbApi &objReader) const; + QString queryGetAnalogTagName(const QString &valueType, const QString &deviceName, iot_dbms::CDbApi &objReader) const; + QString queryGetDevInfoDescription(const QString &deviceTagName, iot_dbms::CDbApi &objReader) const; private: - kbd_service::CDpcdaForApp *m_pDpcdaForApp; + iot_service::CDpcdaForApp *m_pDpcdaForApp; QTableView * m_pTableView; CRealTableModel * m_pTableModel; bool m_isEditMode; diff --git a/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.cpp b/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.cpp index d8c82787..a0ff896e 100644 --- a/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.cpp +++ b/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.cpp @@ -47,7 +47,7 @@ void CRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("DevSpePointWidget"); + m_pMbComm = new iot_net::CMbCommunicator("DevSpePointWidget"); } } @@ -64,7 +64,7 @@ void CRealDataCollect::clearMsg() { if(m_pMbComm) { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; while(m_pMbComm->recvMsg(objMsg, 0)) {} } @@ -105,14 +105,14 @@ void CRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) { if(objMsg.isValid()) { - if(objMsg.getMsgType() != kbd_idlfile::MT_DP_CHANGE_DATA) + if(objMsg.getMsgType() != iot_idl::MT_DP_CHANGE_DATA) { continue; } @@ -158,16 +158,16 @@ void CRealDataCollect::processChangeData() } } -int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int CRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -184,7 +184,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -201,7 +201,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -218,7 +218,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; diff --git a/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.h b/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.h index 43d497b3..60f533d3 100644 --- a/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.h +++ b/product/src/gui/plugin/DevSpePointWidget/CRealDataCollect.h @@ -25,7 +25,7 @@ private: bool addSub(); bool delSub(); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); private slots: void recvMessage(); @@ -38,7 +38,7 @@ signals: void signal_updateMi(QMap> miMap); private: - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; QMap> m_aiMap; diff --git a/product/src/gui/plugin/DevSpePointWidget/CRealTableModel.cpp b/product/src/gui/plugin/DevSpePointWidget/CRealTableModel.cpp index abfa4e6a..c04e52c0 100644 --- a/product/src/gui/plugin/DevSpePointWidget/CRealTableModel.cpp +++ b/product/src/gui/plugin/DevSpePointWidget/CRealTableModel.cpp @@ -143,34 +143,34 @@ QVariant CRealTableModel::data(const QModelIndex &index, int role) const QString CRealTableModel::getStateTextNameByValue(const QString &textName, const int &value) const { - kbd_dbms::CRdbAccess objRtdbAccss; + iot_dbms::CRdbAccess objRtdbAccss; QString ret = QString::number(value); if(objRtdbAccss.open("base", "dict_state_text_info")) { - kbd_dbms::CONDINFO condition1; + iot_dbms::CONDINFO condition1; memcpy(condition1.name, "state_text_name", strlen("state_text_name")); condition1.logicalop = ATTRCOND_AND; condition1.relationop = ATTRCOND_EQU; condition1.conditionval = textName.toStdString().c_str(); - kbd_dbms::CONDINFO condition2; + iot_dbms::CONDINFO condition2; memcpy(condition2.name, "actual_value", strlen("actual_value")); condition2.logicalop = ATTRCOND_AND; condition2.relationop = ATTRCOND_EQU; condition2.conditionval = value; - std::vector vecCondInfo; + std::vector vecCondInfo; vecCondInfo.push_back(condition1); vecCondInfo.push_back(condition2); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("display_value"); if(objRtdbAccss.select(vecCondInfo, result, columns)) { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType value; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, value); ret = QString::fromStdString(value.toStdString()); } diff --git a/product/src/gui/plugin/DocumentManageWidget/CDocComManage.h b/product/src/gui/plugin/DocumentManageWidget/CDocComManage.h index a54eb1aa..2d69429e 100644 --- a/product/src/gui/plugin/DocumentManageWidget/CDocComManage.h +++ b/product/src/gui/plugin/DocumentManageWidget/CDocComManage.h @@ -9,14 +9,14 @@ static QString getRootPath() { - std::string strCurModuleDir = kbd_public::CFileUtil::getCurModuleDir(); + std::string strCurModuleDir = iot_public::CFileUtil::getCurModuleDir(); strCurModuleDir += "../../data/PcpmsDocManage"; return QString::fromStdString(strCurModuleDir); } static bool checkDeletePerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { return false; diff --git a/product/src/gui/plugin/DocumentManageWidget/CDocumentManageWidget.cpp b/product/src/gui/plugin/DocumentManageWidget/CDocumentManageWidget.cpp index 1780db62..9e58b520 100644 --- a/product/src/gui/plugin/DocumentManageWidget/CDocumentManageWidget.cpp +++ b/product/src/gui/plugin/DocumentManageWidget/CDocumentManageWidget.cpp @@ -36,7 +36,7 @@ CDocumentManageWidget::~CDocumentManageWidget() void CDocumentManageWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -45,7 +45,7 @@ void CDocumentManageWidget::initStyle() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("documentManage.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("documentManage.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp index 493f740a..8b22972a 100644 --- a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp +++ b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp @@ -58,7 +58,7 @@ void CAccidentReviewDialog::initView() void CAccidentReviewDialog::initTree() { QMap>> m_mapNav; - readNavJson(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + readNavJson(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/NavigationWidget.json"), m_mapNav); QList> nodeList = m_mapNav.value(-1); for(int nIndex=0; nIndexopen("base", "alarm_level_define"); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_pTimer = new QTimer(); m_pTimer->setInterval(1000); connect(m_pTimer, &QTimer::timeout, this, &CEventDataCollect::slotUpdateEvent); @@ -45,8 +45,8 @@ CEventDataCollect::CEventDataCollect() int CEventDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } @@ -79,12 +79,12 @@ CEventDataCollect::~CEventDataCollect() bool CEventDataCollect::initialize() { m_pTimer->start(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - kbd_public::SNodeInfo stNodeInfo; + iot_public::SNodeInfo stNodeInfo; spSysInfo->getLocalNodeInfo(stNodeInfo); - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(stNodeInfo.nLocationId, stLocationInfo); m_nLocationID = stNodeInfo.nLocationId; } @@ -258,7 +258,7 @@ QList CEventDataCollect::getDevGroupTagList() void CEventDataCollect::loadPermInfo() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -287,8 +287,8 @@ void CEventDataCollect::loadPriorityDescription() m_priorityDescriptionMap.clear(); if(m_rtdbAccess->open("base", "alarm_level_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_name"); @@ -297,8 +297,8 @@ void CEventDataCollect::loadPriorityDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_priorityDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -313,8 +313,8 @@ void CEventDataCollect::loadSubSystemDescription() if(m_rtdbAccess->open("base", "sys_model_sub_system_info")) { LOGERROR("open sys_model_sub_system_info success"); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("sub_system_id"); columns.push_back("description"); @@ -325,8 +325,8 @@ void CEventDataCollect::loadSubSystemDescription() LOGERROR(QString::number( result.getRecordCount()).toStdString().c_str()); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_subSystemDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -344,8 +344,8 @@ void CEventDataCollect::loadLocationDescription() { m_locationDescriptionMap.clear(); m_locationOrderList.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("tag_name"); @@ -358,11 +358,11 @@ void CEventDataCollect::loadLocationDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType area_id; - kbd_dbms::CVarType tag_name; - kbd_dbms::CVarType description; - kbd_dbms::CVarType area_type; - kbd_dbms::CVarType parea_id; + iot_dbms::CVarType area_id; + iot_dbms::CVarType tag_name; + iot_dbms::CVarType description; + iot_dbms::CVarType area_type; + iot_dbms::CVarType parea_id; result.getColumnValue(nIndex, 0, area_id); result.getColumnValue(nIndex, 1, tag_name); result.getColumnValue(nIndex, 2, description); @@ -431,8 +431,8 @@ void CEventDataCollect::loadRegionInfoDescription() m_regionInfoDescriptionMap.clear(); if(m_rtdbAccess->open("base", "region_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("region_id"); columns.push_back("description"); @@ -441,8 +441,8 @@ void CEventDataCollect::loadRegionInfoDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermRegionId.contains(key.toInt())) @@ -459,8 +459,8 @@ void CEventDataCollect::loadAlarmTypeDescription() m_alarmTypeDescriptionMap.clear(); if(m_rtdbAccess->open("base", "alarm_type_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("type_id"); columns.push_back("type_name"); @@ -469,8 +469,8 @@ void CEventDataCollect::loadAlarmTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -484,8 +484,8 @@ void CEventDataCollect::loadDeviceTypeDescription() m_deviceTypeDescriptionMap.clear(); if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -494,8 +494,8 @@ void CEventDataCollect::loadDeviceTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -509,8 +509,8 @@ void CEventDataCollect::loadAlarmStatusDescription() m_alarmStatusMap.clear(); if(m_rtdbAccess->open("base", "alarm_status_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("status_value"); columns.push_back("display_name"); @@ -519,8 +519,8 @@ void CEventDataCollect::loadAlarmStatusDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -534,8 +534,8 @@ void CEventDataCollect::loadUserName() m_userNameMap.clear(); if(m_rtdbAccess->open("base", "rm_user_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_id"); columns.push_back("perm_name"); @@ -544,8 +544,8 @@ void CEventDataCollect::loadUserName() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_userNameMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -556,7 +556,7 @@ void CEventDataCollect::loadUserName() void CEventDataCollect::loadEventShowStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -592,7 +592,7 @@ void CEventDataCollect::loadEventShowStatusDescription() void CEventDataCollect::loadEventOtherStatusDescription() { m_eventOtherStatusMap.clear(); - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -624,8 +624,8 @@ void CEventDataCollect::loadDeviceGroupDescription() if(m_rtdbAccess->open("base", "dev_group")) { m_deviceGroupDescriptionMap.clear(); - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("tag_name"); columns.push_back("description"); @@ -634,8 +634,8 @@ void CEventDataCollect::loadDeviceGroupDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceGroupDescriptionMap[QString::fromStdString(key.toStdString())] = QString::fromStdString(value.toStdString()); @@ -703,7 +703,7 @@ void CEventDataCollect::slotUpdateEvent() emit sigDevTreeUpdate(); } -void CEventDataCollect::handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEvt &objAllEvt) +void CEventDataCollect::handleAllEvtMsg(int nDomainID, iot_idl::SEvtCltAddEvt &objAllEvt) { QMutexLocker locker(msgMutex); LOGINFO("-------------------------handleAllEvtMsg-------------------------"); @@ -711,7 +711,7 @@ void CEventDataCollect::handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEv removeCache(nDomainID); for(int nAddMsgIndex(0); nAddMsgIndex < objAllEvt.evt_info_size(); nAddMsgIndex++) { - kbd_idlfile::SEvtInfoToEvtClt msg = objAllEvt.evt_info(nAddMsgIndex); + iot_idl::SEvtInfoToEvtClt msg = objAllEvt.evt_info(nAddMsgIndex); EventMsgPtr event(new CEventMsgInfo()); event->initialize(msg); event->priorityOrder = queryPriorityOrder(event->priority); @@ -730,13 +730,13 @@ void CEventDataCollect::handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEv emit sigDevTreeUpdate(); } -void CEventDataCollect::handleAddEvtMsg(kbd_idlfile::SEvtCltAddEvt &objAddEvt) +void CEventDataCollect::handleAddEvtMsg(iot_idl::SEvtCltAddEvt &objAddEvt) { QMutexLocker locker(msgMutex); LOGINFO("-------------------------handleAddEvtMsg-------------------------"); for(int nAddMsgIndex(0); nAddMsgIndex < objAddEvt.evt_info_size(); nAddMsgIndex++) { - kbd_idlfile::SEvtInfoToEvtClt msg = objAddEvt.evt_info(nAddMsgIndex); + iot_idl::SEvtInfoToEvtClt msg = objAddEvt.evt_info(nAddMsgIndex); EventMsgPtr event(new CEventMsgInfo()); event->initialize(msg); event->priorityOrder = queryPriorityOrder(event->priority); @@ -750,7 +750,7 @@ void CEventDataCollect::handleAddEvtMsg(kbd_idlfile::SEvtCltAddEvt &objAddEvt) emit sigEventStateChanged(); } -void CEventDataCollect::handleLinkWave2EvtMsg(kbd_idlfile::SAlmCltLinkWave2Alm &objWave2Evt) +void CEventDataCollect::handleLinkWave2EvtMsg(iot_idl::SAlmCltLinkWave2Alm &objWave2Evt) { QMutexLocker locker(msgMutex); QList uuidList; diff --git a/product/src/gui/plugin/EventWidget/CEventDataCollect.h b/product/src/gui/plugin/EventWidget/CEventDataCollect.h index 95ec9b8e..d558c7bf 100644 --- a/product/src/gui/plugin/EventWidget/CEventDataCollect.h +++ b/product/src/gui/plugin/EventWidget/CEventDataCollect.h @@ -14,7 +14,7 @@ #define FUNC_SPE_EVENT_VIEW ("FUNC_SPE_EVENT_VIEW") const int OTHERSTATUS = 9999; -class CEventDataCollect : public QObject, public kbd_service::CAlmApiForEvtClt +class CEventDataCollect : public QObject, public iot_service::CAlmApiForEvtClt { Q_OBJECT public: @@ -67,11 +67,11 @@ public: QMap eventShowStatusDescriptionMap(); QMap eventOtherStatusDescriptionMap(); - virtual void handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEvt &objAllEvt); + virtual void handleAllEvtMsg(int nDomainID, iot_idl::SEvtCltAddEvt &objAllEvt); - virtual void handleAddEvtMsg(kbd_idlfile::SEvtCltAddEvt &objAddEvt); + virtual void handleAddEvtMsg(iot_idl::SEvtCltAddEvt &objAddEvt); - virtual void handleLinkWave2EvtMsg( kbd_idlfile::SAlmCltLinkWave2Alm &objWave2Evt); + virtual void handleLinkWave2EvtMsg( iot_idl::SAlmCltLinkWave2Alm &objWave2Evt); void handleClearRTEvent(); @@ -124,8 +124,8 @@ private: QTimer * m_pTimer; int m_nLocationID; QList m_listEventCache; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; QList m_listPermLocationId; QList m_listPermRegionId; QMap m_priorityOrderMap; diff --git a/product/src/gui/plugin/EventWidget/CEventDelegate.cpp b/product/src/gui/plugin/EventWidget/CEventDelegate.cpp index afb4456f..36accf81 100644 --- a/product/src/gui/plugin/EventWidget/CEventDelegate.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDelegate.cpp @@ -104,8 +104,8 @@ void CEventDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option button.rect = option.rect; button.rect.adjust(option.rect.width() - 40-40-40, option.rect.height()/2-10, -12-40-40, -(option.rect.height()/2-10)); - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); button.icon = QIcon(file); button.features = QStyleOptionButton::Flat; @@ -169,8 +169,8 @@ void CEventDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option button.rect = option.rect; button.rect.adjust(option.rect.width() - 40-40-40, option.rect.height()/2-10, -12-40-40, -(option.rect.height()/2-10)); - std::string style = kbd_public::CFileStyle::getCurStyle(); - QString file = kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); + std::string style = iot_public::CFileStyle::getCurStyle(); + QString file = iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/wave_"+style+".png").c_str(); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); button.icon = QIcon(file); button.features = QStyleOptionButton::Flat; @@ -211,8 +211,8 @@ bool CEventDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const wave = QString("%1%2%3").arg("\"").arg(wave).arg("\""); LOGINFO("录波文件为:%s",wave.toStdString().c_str()); - const std::string strProc = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strProc = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strProc.empty()) LOGERROR("未找到可执行文件WaveAnalyze"); else @@ -242,8 +242,8 @@ bool CEventDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const wave = QString("%1%2%3").arg("\"").arg(wave).arg("\""); LOGINFO("录波文件为:%s",wave.toStdString().c_str()); - const std::string strProc = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strProc = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strProc.empty()) LOGERROR("未找到可执行文件WaveAnalyze"); else @@ -256,7 +256,7 @@ bool CEventDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const } void CEventDelegate::loadColorConfig() { - QString filePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); + QString filePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); QDomDocument document; QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) diff --git a/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp b/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp index e6b339f9..2b15cdb7 100644 --- a/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp +++ b/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp @@ -52,7 +52,7 @@ CEventFilterDialog::~CEventFilterDialog() void CEventFilterDialog::initialize(E_ALARM_VIEW view) { m_view=view; - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); ui->level->setSelectionMode(QAbstractItemView::MultiSelection); //ui->location->setSelectionMode(QAbstractItemView::MultiSelection); ui->region->setSelectionMode(QAbstractItemView::MultiSelection); @@ -140,12 +140,12 @@ void CEventFilterDialog::initialize(E_ALARM_VIEW view) ui->type->addItem(CEventDataCollect::instance()->eventShowStatusDescription(alarmStatus)); } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(info.nId <= CN_AppId_COMAPP) { @@ -696,12 +696,12 @@ void CEventFilterDialog::slot_updateCheckTypeState() void CEventFilterDialog::slot_updateDevice(const QString &subSystem) { int nSubSystemId = -1; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(subSystem.toStdString() == info.strDesc) { @@ -711,34 +711,34 @@ void CEventFilterDialog::slot_updateDevice(const QString &subSystem) } ui->deviceType->clear(); - QList values; + QList values; if(nSubSystemId != -1) { - kbd_dbms::CVarType subSystemId = nSubSystemId; + iot_dbms::CVarType subSystemId = nSubSystemId; if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CONDINFO condition; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CONDINFO condition; condition.relationop = ATTRCOND_EQU; memcpy(condition.name, "sub_system",strlen("sub_system")); condition.conditionval = subSystemId; std::vector columns; columns.push_back("description"); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; if(m_rtdbAccess->select(condition, result, columns)) { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType value; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, value); values.append(value); } } } } - foreach (kbd_dbms::CVarType value, values) + foreach (iot_dbms::CVarType value, values) { ui->deviceType->addItem(value.c_str()); } diff --git a/product/src/gui/plugin/EventWidget/CEventFilterDialog.h b/product/src/gui/plugin/EventWidget/CEventFilterDialog.h index c8a90beb..ad2a715e 100644 --- a/product/src/gui/plugin/EventWidget/CEventFilterDialog.h +++ b/product/src/gui/plugin/EventWidget/CEventFilterDialog.h @@ -91,7 +91,7 @@ private: private: Ui::CEventFilterDialog *ui; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_areaInfoMap; //区域信息 diff --git a/product/src/gui/plugin/EventWidget/CEventForm.cpp b/product/src/gui/plugin/EventWidget/CEventForm.cpp index abafed2c..cfdf395d 100644 --- a/product/src/gui/plugin/EventWidget/CEventForm.cpp +++ b/product/src/gui/plugin/EventWidget/CEventForm.cpp @@ -77,7 +77,7 @@ CEventForm::CEventForm(QWidget *parent, bool editMode) : connect(ui->closeBtn, &QPushButton::clicked, this, &CEventForm::closeBtnClicked); } QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -87,7 +87,7 @@ CEventForm::CEventForm(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("event.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("event.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -1413,7 +1413,7 @@ void CEventForm::loadDeviceGroupFilterWidget() return; } - kbd_dbms::CDbApi objReader(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReader(DB_CONN_MODEL_READ); if(!objReader.open()) { LOGERROR("load deviceGroup info error, database open failed, %s", objReader.getLastErrorString().toStdString().c_str()); diff --git a/product/src/gui/plugin/EventWidget/CEventHisThread.cpp b/product/src/gui/plugin/EventWidget/CEventHisThread.cpp index 2a5b2dce..df36d237 100644 --- a/product/src/gui/plugin/EventWidget/CEventHisThread.cpp +++ b/product/src/gui/plugin/EventWidget/CEventHisThread.cpp @@ -24,20 +24,20 @@ CEventHisThread::~CEventHisThread() void CEventHisThread::init() { - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_HIS_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_HIS_READ); if(!m_pReadDb->open()) { LOGERROR("打开数据库失败,error:%s",m_pReadDb->getLastErrorString().toStdString().c_str()); } - m_rtdbPriorityOrderAccess = new kbd_dbms::CRdbAccess(); + m_rtdbPriorityOrderAccess = new iot_dbms::CRdbAccess(); m_rtdbPriorityOrderAccess->open("base", "alarm_level_define"); } int CEventHisThread::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } @@ -243,7 +243,7 @@ QString CEventHisThread::buildConditionPartStatus() QString CEventHisThread::buildConditionPartLocation() { QList locationFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -292,7 +292,7 @@ QString CEventHisThread::buildConditionPartLocation() QString CEventHisThread::buildConditionPartRegion() { QList regionFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/EventWidget/CEventHisThread.h b/product/src/gui/plugin/EventWidget/CEventHisThread.h index 44324983..a37afdd7 100644 --- a/product/src/gui/plugin/EventWidget/CEventHisThread.h +++ b/product/src/gui/plugin/EventWidget/CEventHisThread.h @@ -42,8 +42,8 @@ signals: void sigUpdateHisEvent(QList eventSet); private: - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; ST_FILTER m_stFilter; }; diff --git a/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp b/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp index f1e69a77..e81a761c 100644 --- a/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp +++ b/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp @@ -73,7 +73,7 @@ void CEventHistoryModel::initFilter() void CEventHistoryModel::loadEventHistoryData() { //< 权限判断 - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -140,10 +140,10 @@ QString CEventHistoryModel::bulidCondition() //LOGDEBUG("bulidConditionPartStatus():[%s]",status.toStdString().c_str()); //< 车站 - // kbd_public::SNodeInfo stNodeInfo; - // kbd_public::SLocationInfo stLocationInfo; - // kbd_public::CSysInfoInterfacePtr spSysInfo; - // if (kbd_public::createSysInfoInstance(spSysInfo)) + // iot_public::SNodeInfo stNodeInfo; + // iot_public::SLocationInfo stLocationInfo; + // iot_public::CSysInfoInterfacePtr spSysInfo; + // if (iot_public::createSysInfoInstance(spSysInfo)) // { // spSysInfo->getLocalNodeInfo(stNodeInfo); // spSysInfo->getLocationInfoById(stNodeInfo.nLocationId, stLocationInfo); @@ -273,7 +273,7 @@ QString CEventHistoryModel::buildConditionParaReturnStatus() QString CEventHistoryModel::bulidConditionPartLocation() { QList locationFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -324,7 +324,7 @@ QString CEventHistoryModel::bulidConditionPartLocation() QString CEventHistoryModel::bulidConditionPartRegion() { QList regionFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp b/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp index 7eb106ec..c06a5ce7 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp +++ b/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp @@ -47,7 +47,7 @@ CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other): alm_status(0), cfm_use dev_group_tag = other.dev_group_tag; } -void CEventMsgInfo::initialize(const kbd_idlfile::SEvtInfoToEvtClt &eventInfo) +void CEventMsgInfo::initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo) { alm_type = eventInfo.alm_type(); E_ALARM_LOGICSTATE logic = (E_ALARM_LOGICSTATE)eventInfo.logic_state(); diff --git a/product/src/gui/plugin/EventWidget/CEventMsgInfo.h b/product/src/gui/plugin/EventWidget/CEventMsgInfo.h index 0732ba52..41548161 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgInfo.h +++ b/product/src/gui/plugin/EventWidget/CEventMsgInfo.h @@ -134,7 +134,7 @@ class CEventMsgInfo public: CEventMsgInfo(); CEventMsgInfo(const CEventMsgInfo &other); - void initialize(const kbd_idlfile::SEvtInfoToEvtClt &eventInfo); + void initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo); bool lessThan(EventMsgPtr info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); bool moreThan(EventMsgPtr info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); bool operator==(const EventMsgPtr &target); diff --git a/product/src/gui/plugin/EventWidget/main.cpp b/product/src/gui/plugin/EventWidget/main.cpp index 006b335d..c5a7be1f 100644 --- a/product/src/gui/plugin/EventWidget/main.cpp +++ b/product/src/gui/plugin/EventWidget/main.cpp @@ -11,16 +11,16 @@ int main(int argc, char *argv[]) //<初始化消息总线 - //kbd_public::StartLogSystem(NULL, "HMI", "Alarm_Client"); - kbd_public::StartLogSystem(NULL, "HMI"); - kbd_net::initMsgBus("Event_Client", "1", true); + //iot_public::StartLogSystem(NULL, "HMI", "Alarm_Client"); + iot_public::StartLogSystem(NULL, "HMI"); + iot_net::initMsgBus("Event_Client", "1", true); - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); permMngPtr->PermDllInit(); if(permMngPtr->SysLogin("admin", "kbdct", 1, 12*60*60, "hmi") != 0) { - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return -1; } // CEventPlugin p; @@ -35,8 +35,8 @@ int main(int argc, char *argv[]) //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.cpp b/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.cpp index 5945c07e..f8860496 100644 --- a/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.cpp +++ b/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.cpp @@ -11,9 +11,9 @@ #include "pub_sysinfo_api/SysInfoApi.h" #include "dbms/db_api_ex/CDbApi.h" -using namespace kbd_dbms; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_dbms; +using namespace iot_public; +using namespace iot_service; CFaultRecallRecordWidget::CFaultRecallRecordWidget(bool editMode, QWidget *parent) : QWidget(parent), @@ -48,7 +48,7 @@ CFaultRecallRecordWidget::~CFaultRecallRecordWidget() void CFaultRecallRecordWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -57,7 +57,7 @@ void CFaultRecallRecordWidget::initStyleSheet() qssfile1.close(); } -// strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; +// strFullPath = iot_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; // QFile qssfile2(QString::fromStdString(strFullPath)); // qssfile2.open(QFile::ReadOnly); // if (qssfile2.isOpen()) @@ -80,7 +80,7 @@ void CFaultRecallRecordWidget::initView() ui->m_treeWidget->setColumnHidden(4,true); } -void CFaultRecallRecordWidget::refeshTree(kbd_dbms::CDbApi* dbifs) +void CFaultRecallRecordWidget::refeshTree(iot_dbms::CDbApi* dbifs) { mItemDataVec.clear(); QSqlQuery query; @@ -123,7 +123,7 @@ bool CFaultRecallRecordWidget::initViewData() { initDateTimeEdit(); - kbd_dbms::CDbApi * pReadDb = new CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi * pReadDb = new CDbApi(DB_CONN_MODEL_READ); if(! pReadDb->open()) { delete pReadDb; @@ -141,7 +141,7 @@ bool CFaultRecallRecordWidget::initViewData() return true; } -void CFaultRecallRecordWidget::readLocationArray(kbd_dbms::CDbApi* dbifs) +void CFaultRecallRecordWidget::readLocationArray(iot_dbms::CDbApi* dbifs) { ui->locationCkb->clear(); @@ -248,7 +248,7 @@ void CFaultRecallRecordWidget::slotDelBtn() return; } - kbd_dbms::CDbApi * pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); + iot_dbms::CDbApi * pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); if(! pWriteDb->open()) { slotShowMess(tr("打开数据库失败。")); @@ -313,7 +313,7 @@ void CFaultRecallRecordWidget::slotClearBtn() return; } - kbd_dbms::CDbApi * pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); + iot_dbms::CDbApi * pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); if(! pWriteDb->open()) { slotShowMess(tr("打开数据库失败。")); @@ -340,7 +340,7 @@ void CFaultRecallRecordWidget::slotClearBtn() void CFaultRecallRecordWidget::slotRefreshBtn() { - kbd_dbms::CDbApi * pReadDb = new CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi * pReadDb = new CDbApi(DB_CONN_MODEL_READ); if(! pReadDb->open()) { delete pReadDb; diff --git a/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.h b/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.h index 31d19995..14eeff48 100644 --- a/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.h +++ b/product/src/gui/plugin/FaultRecallRecordWidget/CFaultRecallRecordWidget.h @@ -37,11 +37,11 @@ public: private: void initStyleSheet(); void initView(); - void refeshTree(kbd_dbms::CDbApi* dbifs); + void refeshTree(iot_dbms::CDbApi* dbifs); bool checkUserPerm(); bool initViewData(); - void readLocationArray( kbd_dbms::CDbApi* dbifs); + void readLocationArray( iot_dbms::CDbApi* dbifs); void initDateTimeEdit(); QString getLocationDesc(int locationId); diff --git a/product/src/gui/plugin/FaultRecallRecordWidget/main.cpp b/product/src/gui/plugin/FaultRecallRecordWidget/main.cpp index b3f7cff6..4c3abb84 100644 --- a/product/src/gui/plugin/FaultRecallRecordWidget/main.cpp +++ b/product/src/gui/plugin/FaultRecallRecordWidget/main.cpp @@ -8,12 +8,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); -// kbd_public::StartLogSystem("HMI", "hmi"); -// if (!(kbd_net::initMsgBus("HMI", "HMI"))) +// iot_public::StartLogSystem("HMI", "hmi"); +// if (!(iot_net::initMsgBus("HMI", "HMI"))) // { // return -1; // } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 -// kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); +// iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.cpp b/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.cpp index 2d045b97..fb9cd64f 100644 --- a/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.cpp +++ b/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.cpp @@ -16,7 +16,7 @@ #include "db_api_ex/CDbApi.h" -using namespace kbd_dbms; +using namespace iot_dbms; bool timeCompare(const SFaultRecordInfoPtr p1, const SFaultRecordInfoPtr p2) { return p1->time > p2->time; @@ -31,7 +31,7 @@ FaultRecordWidget::FaultRecordWidget(bool editMode, QWidget *parent) : ui(new Ui::FaultRecordWidget) { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -41,7 +41,7 @@ FaultRecordWidget::FaultRecordWidget(bool editMode, QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("faultRecord.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("faultRecord.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -347,9 +347,9 @@ void FaultRecordWidget::initModelUi() void FaultRecordWidget::updateDeleteOperatePerm() { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return; @@ -357,7 +357,7 @@ void FaultRecordWidget::updateDeleteOperatePerm() spSysInfo->getLocalNodeInfo(stNodeInfo); m_nodeName = stNodeInfo.strName; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -457,8 +457,8 @@ void FaultRecordWidget::open() path = QString("%1%2%3").arg("\"").arg(path).arg("\""); LOGINFO("录波文件为:%s",path.toStdString().c_str()); - const std::string strProc = std::move(kbd_public::CFileUtil::getPathOfBinFile( - std::string("WaveAnalyze") + kbd_public::CFileUtil::getProcSuffix())); + const std::string strProc = std::move(iot_public::CFileUtil::getPathOfBinFile( + std::string("WaveAnalyze") + iot_public::CFileUtil::getProcSuffix())); if(strProc.empty()) LOGERROR("未找到可执行文件WaveAnalyze"); else diff --git a/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.h b/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.h index 7975bb7d..e344e3a0 100644 --- a/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.h +++ b/product/src/gui/plugin/FaultRecordWidget/FaultRecordWidget.h @@ -95,7 +95,7 @@ private: std::string m_nodeName; E_Fault_Mode m_mode; bool m_edit; - kbd_sys::FilesyncApi m_fileApi; + iot_sys::FilesyncApi m_fileApi; QList m_locDescList; QList m_devDescList; }; diff --git a/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.cpp b/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.cpp index 9757551f..4e1dc4f8 100644 --- a/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.cpp +++ b/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.cpp @@ -10,9 +10,9 @@ #include "pub_logger_api/logger.h" #include "pub_sysinfo_api/SysInfoApi.h" -using namespace kbd_dbms; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_dbms; +using namespace iot_public; +using namespace iot_service; CHangPanelWidget::CHangPanelWidget(bool editMode, QWidget *parent) : QWidget(parent), @@ -92,7 +92,7 @@ void CHangPanelWidget::setTagType(int actual) void CHangPanelWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -371,7 +371,7 @@ void CHangPanelWidget::updateCount() bool CHangPanelWidget::permCheck(int location, int region) { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); QString mess; if(permMngPtr != NULL) { @@ -424,7 +424,7 @@ void CHangPanelWidget::initMsg() { if(m_communicator == Q_NULLPTR) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } @@ -602,7 +602,7 @@ bool CHangPanelWidget::cancelItemHangePanel(const QString &desc, const QString & void CHangPanelWidget::removeHangInfo(const SHangPanelInfo &info) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; msg.setMsgType(MT_OPT_COMMON_DOWN); msg.setSubject(info.subSystem, CH_HMI_TO_OPT_OPTCMD_DOWN); STokenSet sOptHangSet; diff --git a/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.h b/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.h index a0358c55..1a98e0c4 100644 --- a/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.h +++ b/product/src/gui/plugin/HangPanelWidget/CHangPanelWidget.h @@ -94,10 +94,10 @@ signals: private: Ui::CHangPanelWidget *ui; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; - kbd_net::CMbCommunicator *m_communicator; - kbd_public::CSysInfoInterfacePtr m_pSysInfo; + iot_net::CMbCommunicator *m_communicator; + iot_public::CSysInfoInterfacePtr m_pSysInfo; QMap m_locMap; QList m_locOrder; QMap m_subMap; diff --git a/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.cpp b/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.cpp index 494ec6fa..a877b710 100644 --- a/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.cpp +++ b/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.cpp @@ -2,7 +2,7 @@ #include "Common.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CHangPanelWork::CHangPanelWork(QObject *parent) : QObject(parent) { m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); @@ -74,7 +74,7 @@ void CHangPanelWork::slotSearch(int domainId, int appid) bool CHangPanelWork::readHangPanelInfo() { m_listHangPanel.clear(); - kbd_idlfile::RdbRet objRdbRet; + iot_idl::RdbRet objRdbRet; bool bRet = false; std::vector vecColumn = {"key_id_tag","token_id","opt_time","location_id","sub_system","device","host_name","user_name","user_group","note"}; diff --git a/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.h b/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.h index 4f1b9e0d..73fd7a5c 100644 --- a/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.h +++ b/product/src/gui/plugin/HangPanelWidget/CHangPanelWork.h @@ -51,8 +51,8 @@ private: private: - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbNetApi m_objRdbNetApi; //< 网络查询对象 + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbNetApi m_objRdbNetApi; //< 网络查询对象 QList m_listHangPanel; QMap m_mapDeviceInfo; diff --git a/product/src/gui/plugin/HangPanelWidget/main.cpp b/product/src/gui/plugin/HangPanelWidget/main.cpp index b17f898f..c64c7447 100644 --- a/product/src/gui/plugin/HangPanelWidget/main.cpp +++ b/product/src/gui/plugin/HangPanelWidget/main.cpp @@ -8,12 +8,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("HMI", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/HmiRollWidget/CHmiRollWidget.cpp b/product/src/gui/plugin/HmiRollWidget/CHmiRollWidget.cpp index 7297c580..6c4800ff 100644 --- a/product/src/gui/plugin/HmiRollWidget/CHmiRollWidget.cpp +++ b/product/src/gui/plugin/HmiRollWidget/CHmiRollWidget.cpp @@ -15,7 +15,7 @@ CHmiRollWidget::CHmiRollWidget(bool editMode, QVector ptrVec, QWidget *p { Q_UNUSED(ptrVec) QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -25,7 +25,7 @@ CHmiRollWidget::CHmiRollWidget(bool editMode, QVector ptrVec, QWidget *p qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("hmiRoll.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("hmiRoll.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.cpp b/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.cpp index 7061f792..ea27b250 100644 --- a/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.cpp +++ b/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.cpp @@ -47,7 +47,7 @@ void CBrowserWidget::init() QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_pView = new QWebEngineView(this); m_pView->settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false); m_pView->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); @@ -97,10 +97,10 @@ void CBrowserWidget::setNicAddr(int appId) std::string ipAddr2 = ""; std::string node1 = ""; std::string node2 = ""; - std::vector> vector = getRunRedundancyInfoByAppid(appId); + std::vector> vector = getRunRedundancyInfoByAppid(appId); for(size_t i=0; i vec = vector.at(i); + std::vector vec = vector.at(i); std::string node_name = vec.at(0).toStdString(); int is_active = vec.at(1).toInt(); int is_master = vec.at(2).toInt(); @@ -166,21 +166,21 @@ std::string CBrowserWidget::getAnotherIp(const std::string &node) return ret; } -std::vector> CBrowserWidget::getRunRedundancyInfoByAppid(int appId) +std::vector> CBrowserWidget::getRunRedundancyInfoByAppid(int appId) { - std::vector> vector; + std::vector> vector; if(m_rtdbAccess->open("base", "sys_run_redundancy_info")) { - kbd_dbms::CONDINFO condition; + iot_dbms::CONDINFO condition; memcpy(condition.name, "app_id", strlen("app_id")); condition.logicalop = ATTRCOND_AND; condition.relationop = ATTRCOND_EQU; condition.conditionval = appId; - std::vector vecCondInfo; + std::vector vecCondInfo; vecCondInfo.push_back(condition); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("node_name"); columns.push_back("is_active"); @@ -195,15 +195,15 @@ std::vector> CBrowserWidget::getRunRedundancyInf { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - std::vector temp; - kbd_dbms::CVarType node_name; - kbd_dbms::CVarType is_active; - kbd_dbms::CVarType is_master; - kbd_dbms::CVarType is_slave; - kbd_dbms::CVarType ip1; - kbd_dbms::CVarType ip1_active; - kbd_dbms::CVarType ip2; - kbd_dbms::CVarType ip2_active; + std::vector temp; + iot_dbms::CVarType node_name; + iot_dbms::CVarType is_active; + iot_dbms::CVarType is_master; + iot_dbms::CVarType is_slave; + iot_dbms::CVarType ip1; + iot_dbms::CVarType ip1_active; + iot_dbms::CVarType ip2; + iot_dbms::CVarType ip2_active; result.getColumnValue(nIndex, 0, node_name); result.getColumnValue(nIndex, 1, is_active); result.getColumnValue(nIndex, 2, is_master); @@ -260,7 +260,7 @@ void CBrowserWidget::slotLoadFinish(bool ok) if (!ok) { LOGINFO("slotLoadFinish fail!"); - std::string path = kbd_public::CFileUtil::getCurModuleDir(); + std::string path = iot_public::CFileUtil::getCurModuleDir(); m_pView->load(QUrl::fromLocalFile(QString::fromStdString(path)+"../../data/report/FAIL_PAGE.html")); } else diff --git a/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.h b/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.h index f3704830..563774c1 100644 --- a/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.h +++ b/product/src/gui/plugin/HtmlBrowserWidget/CBrowserWidget.h @@ -15,7 +15,7 @@ #include #include "dbms/rdb_api/CRdbAccess.h" -using namespace kbd_public; +using namespace iot_public; class CBrowserWidget : public QWidget { Q_OBJECT @@ -33,12 +33,12 @@ private: void initSysInfo(); void setNicAddr(int appId); std::string getAnotherIp(const std::string &node); - std::vector > getRunRedundancyInfoByAppid(int appId); + std::vector > getRunRedundancyInfoByAppid(int appId); void slotLoadFinish(bool ok); private: QWebEngineView *m_pView; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; CSysInfoInterfacePtr m_sysInfoPtr; std::string m_ServerNode[2]; std::string m_ServerAddr[2]; diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.cpp index 51bb94f9..6e0ae775 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.cpp @@ -3,7 +3,7 @@ #include "CAlarmMsgManage.h" #include #include "CAlarmDataCollect.h" -using namespace kbd_service; +using namespace iot_service; CAiAlarmDataCollect * CAiAlarmDataCollect::m_pInstance = NULL; CAiAlarmDataCollect::CAiAlarmDataCollect() : CIntelliAlmApi4Clt(), @@ -11,7 +11,7 @@ CAiAlarmDataCollect::CAiAlarmDataCollect() m_pAlternateTimer(Q_NULLPTR) { m_rtdbMutex = new QMutex(); - m_rtdbPriorityOrderAccess = new kbd_dbms::CRdbAccess(); + m_rtdbPriorityOrderAccess = new iot_dbms::CRdbAccess(); m_rtdbPriorityOrderAccess->open("base", "alarm_level_define"); } @@ -58,25 +58,25 @@ bool CAiAlarmDataCollect::isFaultRecallState() return m_bFaultRecallState; } -bool CAiAlarmDataCollect::requestDelAlm(kbd_idlfile::SIntelliAlmDel &objDelAlm) +bool CAiAlarmDataCollect::requestDelAlm(iot_idl::SIntelliAlmDel &objDelAlm) { LOGDEBUG("请求删除!"); - return kbd_service::CIntelliAlmApi4Clt::requestDelAlm(objDelAlm); + return iot_service::CIntelliAlmApi4Clt::requestDelAlm(objDelAlm); } -bool CAiAlarmDataCollect::requestSeprAlm(kbd_idlfile::SIntelliAlmSepr &objSeprAlm) +bool CAiAlarmDataCollect::requestSeprAlm(iot_idl::SIntelliAlmSepr &objSeprAlm) { LOGDEBUG("请求分离!"); - return kbd_service::CIntelliAlmApi4Clt::requestSeprAlm(objSeprAlm); + return iot_service::CIntelliAlmApi4Clt::requestSeprAlm(objSeprAlm); } -bool CAiAlarmDataCollect::requestMergeAlm(kbd_idlfile::SIntelliAlmMerge &objMergeAlm) +bool CAiAlarmDataCollect::requestMergeAlm(iot_idl::SIntelliAlmMerge &objMergeAlm) { LOGDEBUG("请求合并!"); - return kbd_service::CIntelliAlmApi4Clt::requestMergeAlm(objMergeAlm); + return iot_service::CIntelliAlmApi4Clt::requestMergeAlm(objMergeAlm); } -void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAlmAdd &objAllAlm) +void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, iot_idl::SIntelliAlmAdd &objAllAlm) { LOGINFO("========== AiAlarmDataCollect handleAllAlmMsg =========="); @@ -87,7 +87,7 @@ void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAl int nAlarmCount = objAllAlm.alm_info_size(); for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SIntelliAlmInfo msg = objAllAlm.alm_info(nAddMsgIndex); + iot_idl::SIntelliAlmInfo msg = objAllAlm.alm_info(nAddMsgIndex); AiAlarmMsgPtr alm(new CAiAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -97,7 +97,7 @@ void CAiAlarmDataCollect::handleAllAlmMsg(int nDomainId, kbd_idlfile::SIntelliAl emit sigMsgRefresh(); } -void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm) +void CAiAlarmDataCollect::handleAddAlmMsg(iot_idl::SIntelliAlmAdd &objAddAlm) { LOGINFO("========== AiAlarmDataCollect handleAddAlmMsg =========="); QMutexLocker locker(m_rtdbMutex); @@ -105,7 +105,7 @@ void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm int nAlarmCount = objAddAlm.alm_info_size(); for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SIntelliAlmInfo msg = objAddAlm.alm_info(nAddMsgIndex); + iot_idl::SIntelliAlmInfo msg = objAddAlm.alm_info(nAddMsgIndex); AiAlarmMsgPtr alm(new CAiAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -114,7 +114,7 @@ void CAiAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm LOGDEBUG("AiAlarmDataCollect handleAddAlmMsg():count[%d]",nAlarmCount); } -void CAiAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm) +void CAiAlarmDataCollect::handleDelAlmMsg(iot_idl::SIntelliAlmDel &objDelAlm) { LOGINFO("========== AiAlarmDataCollect handleDelAlmMsg =========="); QMutexLocker locker(m_rtdbMutex); @@ -127,7 +127,7 @@ void CAiAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm } } -void CAiAlarmDataCollect::handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &objBrokenAlm) +void CAiAlarmDataCollect::handleBrokenAlmMsg(iot_idl::SIntelliAlmBroken &objBrokenAlm) { //先保证能够编译通过 LOGINFO("========== AiAlarmDataCollect handleBrokenAlmMsg =========="); @@ -140,7 +140,7 @@ void CAiAlarmDataCollect::handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &obj } } -void CAiAlarmDataCollect::handleReleaseAlmMsg(kbd_idlfile::SIntelliAlmRelease &objReleaseAlm) +void CAiAlarmDataCollect::handleReleaseAlmMsg(iot_idl::SIntelliAlmRelease &objReleaseAlm) { //先保证能够编译通过 LOGINFO("========== AiAlarmDataCollect handleReleaseAlmMsg =========="); @@ -205,8 +205,8 @@ void CAiAlarmDataCollect::slotSwitchFaultRecallState(bool bFaultRecallState) int CAiAlarmDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value = -1000; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value = -1000; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.h b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.h index 2ccd046d..dd7dc392 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDataCollect.h @@ -11,7 +11,7 @@ #include "net_msg_bus_api/MsgBusApi.h" #include "dbms/rdb_api/CRdbAccess.h" -class CAiAlarmDataCollect : public QObject, public kbd_service::CIntelliAlmApi4Clt +class CAiAlarmDataCollect : public QObject, public iot_service::CIntelliAlmApi4Clt { Q_OBJECT public: @@ -25,21 +25,21 @@ public: bool isFaultRecallState(); - virtual bool requestDelAlm(kbd_idlfile::SIntelliAlmDel &objDelAlm); + virtual bool requestDelAlm(iot_idl::SIntelliAlmDel &objDelAlm); - virtual bool requestSeprAlm(kbd_idlfile::SIntelliAlmSepr &objSeprAlm); + virtual bool requestSeprAlm(iot_idl::SIntelliAlmSepr &objSeprAlm); - virtual bool requestMergeAlm(kbd_idlfile::SIntelliAlmMerge &objMergeAlm); + virtual bool requestMergeAlm(iot_idl::SIntelliAlmMerge &objMergeAlm); - virtual void handleAllAlmMsg(int nDomainId,kbd_idlfile::SIntelliAlmAdd &objAllAlm); + virtual void handleAllAlmMsg(int nDomainId,iot_idl::SIntelliAlmAdd &objAllAlm); - virtual void handleAddAlmMsg(kbd_idlfile::SIntelliAlmAdd &objAddAlm); + virtual void handleAddAlmMsg(iot_idl::SIntelliAlmAdd &objAddAlm); - virtual void handleDelAlmMsg(kbd_idlfile::SIntelliAlmDel &objDelAlm); + virtual void handleDelAlmMsg(iot_idl::SIntelliAlmDel &objDelAlm); - virtual void handleBrokenAlmMsg(kbd_idlfile::SIntelliAlmBroken &objBrokenAlm); + virtual void handleBrokenAlmMsg(iot_idl::SIntelliAlmBroken &objBrokenAlm); - virtual void handleReleaseAlmMsg(kbd_idlfile::SIntelliAlmRelease &objReleaseAlm); + virtual void handleReleaseAlmMsg(iot_idl::SIntelliAlmRelease &objReleaseAlm); signals: //< 启停定时器 void sigTimerShot(const bool bStop); @@ -71,7 +71,7 @@ private: bool m_bFaultRecallState; QMutex *m_rtdbMutex; QTimer * m_pAlternateTimer; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; static CAiAlarmDataCollect * m_pInstance; }; diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDelegate.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDelegate.cpp index a9d2e7a2..ad34f39d 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDelegate.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmDelegate.cpp @@ -66,7 +66,7 @@ void CAiAlarmDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti button.rect.adjust(option.rect.width() - 40, option.rect.height()/2-10, -12, -(option.rect.height()/2-10)); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); - button.icon = QIcon(kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); + button.icon = QIcon(iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); QApplication::style()->drawControl(QStyle::CE_PushButton,&button,painter); painter->restore(); @@ -121,7 +121,7 @@ void CAiAlarmDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti button.rect.adjust(option.rect.width() - 40, option.rect.height()/2-10, -12, -(option.rect.height()/2-10)); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); - button.icon = QIcon(kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); + button.icon = QIcon(iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); QApplication::style()->drawControl(QStyle::CE_PushButton,&button,painter); painter->restore(); @@ -177,7 +177,7 @@ bool CAiAlarmDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, con void CAiAlarmDelegate::loadColorConfig() { - QString filePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); + QString filePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); QDomDocument document; QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.cpp index 1b6f4b16..9f644f7d 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.cpp @@ -40,7 +40,7 @@ CAiAlarmMsgInfo::CAiAlarmMsgInfo(const CAiAlarmMsgInfo &other) m_needVideoAlm = other.m_needVideoAlm; } -void CAiAlarmMsgInfo::initialize(const kbd_idlfile::SIntelliAlmInfo &alarmInfo) +void CAiAlarmMsgInfo::initialize(const iot_idl::SIntelliAlmInfo &alarmInfo) { logic_state = (E_AiALARM_LOGICSTATE)alarmInfo.logic_state(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.h b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.h index ac504bae..07c33d7e 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAiAlarmMsgInfo.h @@ -21,7 +21,7 @@ class CAiAlarmMsgInfo public: CAiAlarmMsgInfo(); CAiAlarmMsgInfo(const CAiAlarmMsgInfo &other); - void initialize(const kbd_idlfile::SIntelliAlmInfo &alarmInfo); + void initialize(const iot_idl::SIntelliAlmInfo &alarmInfo); //< [优先级越小表示越大]-智能告警窗调用 bool ailessThan(const AlarmMsgPtr &info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.cpp index 184d391b..e2bf0e93 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.cpp @@ -6,8 +6,8 @@ #include "CAiAlarmDataCollect.h" #include "dbms/db_sysinfo_api/CDbSysInfo.h" -using namespace kbd_service; -using namespace kbd_dbms; +using namespace iot_service; +using namespace iot_dbms; CAlarmDataCollect * CAlarmDataCollect::m_pInstance = NULL; CAlarmDataCollect::CAlarmDataCollect() @@ -19,13 +19,13 @@ CAlarmDataCollect::CAlarmDataCollect() m_bIsNeedRemove(false) { m_rtdbMutex = new QMutex(); - m_rtdbPriorityOrderAccess = new kbd_dbms::CRdbAccess(); + m_rtdbPriorityOrderAccess = new iot_dbms::CRdbAccess(); m_rtdbPriorityOrderAccess->open("base", "alarm_level_define"); - m_rtdbAlmLvlDefTab = new kbd_dbms::CRdbAccess(); + m_rtdbAlmLvlDefTab = new iot_dbms::CRdbAccess(); m_rtdbAlmLvlDefTab->open("base","alarm_level_define"); - m_rtdbAlmActDefTab = new kbd_dbms::CRdbAccess(); + m_rtdbAlmActDefTab = new iot_dbms::CRdbAccess(); m_rtdbAlmActDefTab->open("base","alarm_action_define"); } @@ -146,17 +146,17 @@ void CAlarmDataCollect::slotSwitchFaultRecallState(bool bFaultRecallState) m_pInstance->reinit(m_bFaultRecallState); } -bool CAlarmDataCollect::requestCfmAlm(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) +bool CAlarmDataCollect::requestCfmAlm(iot_idl::SAlmCltCfmAlm &objCfmAlm) { - return kbd_service::CAlmApiForAlmClt::requestCfmAlm(objCfmAlm); + return iot_service::CAlmApiForAlmClt::requestCfmAlm(objCfmAlm); } -bool CAlarmDataCollect::requestDelAlm(kbd_idlfile::SAlmCltDelAlm &objDelAlm) +bool CAlarmDataCollect::requestDelAlm(iot_idl::SAlmCltDelAlm &objDelAlm) { - return kbd_service::CAlmApiForAlmClt::requestDelAlm(objDelAlm); + return iot_service::CAlmApiForAlmClt::requestDelAlm(objDelAlm); } -void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm &objAllAlm) +void CAlarmDataCollect::handleAllAlmMsg(int domainId, iot_idl::SAlmCltAddAlm &objAllAlm) { loadAlmAct(); loadAlmLel(); @@ -173,7 +173,7 @@ void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm int nAlarmCount = objAllAlm.alm_info_size(); for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SAlmInfoToAlmClt msg = objAllAlm.alm_info(nAddMsgIndex); + iot_idl::SAlmInfoToAlmClt msg = objAllAlm.alm_info(nAddMsgIndex); AlarmMsgPtr alm(new CAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -193,7 +193,7 @@ void CAlarmDataCollect::handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm LOGDEBUG("handleAllAlmMsg END[%d] ",nAlarmCount); } -void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) +void CAlarmDataCollect::handleAddAlmMsg(iot_idl::SAlmCltAddAlm &objAddAlm) { loadAlmAct(); loadAlmLel(); @@ -207,7 +207,7 @@ void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) int nAlarmCount = objAddAlm.alm_info_size(); for(int nAddMsgIndex(0); nAddMsgIndex < nAlarmCount; nAddMsgIndex++) { - kbd_idlfile::SAlmInfoToAlmClt msg = objAddAlm.alm_info(nAddMsgIndex); + iot_idl::SAlmInfoToAlmClt msg = objAddAlm.alm_info(nAddMsgIndex); AlarmMsgPtr alm(new CAlarmMsgInfo()); alm->initialize(msg); alm->priorityOrder = queryPriorityOrder(alm->priority); @@ -227,7 +227,7 @@ void CAlarmDataCollect::handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm) } } -void CAlarmDataCollect::handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) +void CAlarmDataCollect::handleCfmAlmMsg(iot_idl::SAlmCltCfmAlm &objCfmAlm) { if(!m_referenceCount) { @@ -244,7 +244,7 @@ void CAlarmDataCollect::handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm) m_bIsNeedUpdate = true; } -void CAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm) +void CAlarmDataCollect::handleDelAlmMsg(iot_idl::SAlmCltDelAlm &objDelAlm) { if(!m_referenceCount) { @@ -262,7 +262,7 @@ void CAlarmDataCollect::handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm) m_bIsNeedRemove = true; } -void CAlarmDataCollect::handleReleaseAlmMsg(kbd_idlfile::SAlmCltReleaseAlm &objRelAlm) +void CAlarmDataCollect::handleReleaseAlmMsg(iot_idl::SAlmCltReleaseAlm &objRelAlm) { if(!m_referenceCount) { @@ -301,8 +301,8 @@ void CAlarmDataCollect::slotAlarmStateChanged() int CAlarmDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value = -1000; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value = -1000; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.h b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.h index 0a758313..96ea3a82 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDataCollect.h @@ -11,7 +11,7 @@ #include "net_msg_bus_api/MsgBusApi.h" #include "dbms/rdb_api/CRdbAccess.h" -class CAlarmDataCollect : public QObject, public kbd_service::CAlmApiForAlmClt +class CAlarmDataCollect : public QObject, public iot_service::CAlmApiForAlmClt { Q_OBJECT public: @@ -29,19 +29,19 @@ public: bool isFaultRecallState(); - virtual bool requestCfmAlm(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm); + virtual bool requestCfmAlm(iot_idl::SAlmCltCfmAlm &objCfmAlm); - virtual bool requestDelAlm(kbd_idlfile::SAlmCltDelAlm &objDelAlm); + virtual bool requestDelAlm(iot_idl::SAlmCltDelAlm &objDelAlm); - virtual void handleAllAlmMsg(int domainId, kbd_idlfile::SAlmCltAddAlm &objAllAlm); + virtual void handleAllAlmMsg(int domainId, iot_idl::SAlmCltAddAlm &objAllAlm); - virtual void handleAddAlmMsg(kbd_idlfile::SAlmCltAddAlm &objAddAlm); + virtual void handleAddAlmMsg(iot_idl::SAlmCltAddAlm &objAddAlm); - virtual void handleCfmAlmMsg(kbd_idlfile::SAlmCltCfmAlm &objCfmAlm); + virtual void handleCfmAlmMsg(iot_idl::SAlmCltCfmAlm &objCfmAlm); - virtual void handleDelAlmMsg(kbd_idlfile::SAlmCltDelAlm &objDelAlm); + virtual void handleDelAlmMsg(iot_idl::SAlmCltDelAlm &objDelAlm); - virtual void handleReleaseAlmMsg(kbd_idlfile::SAlmCltReleaseAlm &objDelAlm); + virtual void handleReleaseAlmMsg(iot_idl::SAlmCltReleaseAlm &objDelAlm); signals: //< 启停定时器 @@ -90,9 +90,9 @@ private: bool m_bFaultRecallState; //是否处于事故追忆 QMutex * m_rtdbMutex; QTimer * m_pAlternateTimer; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; - kbd_dbms::CRdbAccess * m_rtdbAlmLvlDefTab; // 告警等级定义表 - kbd_dbms::CRdbAccess * m_rtdbAlmActDefTab; // 告警动作定义表 + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CRdbAccess * m_rtdbAlmLvlDefTab; // 告警等级定义表 + iot_dbms::CRdbAccess * m_rtdbAlmActDefTab; // 告警动作定义表 bool m_bIsNeedUpdate; //< 是否消息确认(每秒更新) bool m_bIsNeedRemove; //< 是否需要删除(每秒更新) bool m_bIsNeedRelease; //< 是否需要释放(每秒更新)- diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDelegate.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDelegate.cpp index df19ef5c..6a47fb24 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDelegate.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmDelegate.cpp @@ -19,7 +19,7 @@ CAlarmDelegate::CAlarmDelegate(CAlarmItemModel * model, QObject *parent) void CAlarmDelegate::loadColorConfig() { - QString filePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); + QString filePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/alarm_color_define.xml"); QDomDocument document; QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) @@ -166,7 +166,7 @@ void CAlarmDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option button.rect.adjust(option.rect.width() - 40, option.rect.height()/2-10, -12, -(option.rect.height()/2-10)); button.iconSize = QSize(button.rect.width()+2,button.rect.height()+2); - button.icon = QIcon(kbd_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); + button.icon = QIcon(iot_public::CFileUtil::getPathOfResFile("gui/icon/alarm/video.png").c_str()); QApplication::style()->drawControl(QStyle::CE_PushButton,&button,painter); painter->restore(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.cpp index 865ba207..73a9eee0 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.cpp @@ -16,7 +16,7 @@ CAlarmFilterDialog::CAlarmFilterDialog(QWidget *parent) : ui->setupUi(this); setObjectName("alarm_dialog"); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -26,7 +26,7 @@ CAlarmFilterDialog::CAlarmFilterDialog(QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -57,7 +57,7 @@ CAlarmFilterDialog::~CAlarmFilterDialog() void CAlarmFilterDialog::initialize() { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); ui->level->setSelectionMode(QAbstractItemView::MultiSelection); ui->location->setSelectionMode(QAbstractItemView::MultiSelection); @@ -84,12 +84,12 @@ void CAlarmFilterDialog::initialize() ui->type->addItem(value); } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(info.nId <= CN_AppId_COMAPP) { @@ -556,12 +556,12 @@ void CAlarmFilterDialog::slot_updateCheckTypeState() void CAlarmFilterDialog::slot_updateDevice(const QString &subSystem) { int nSubSystemId = -1; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(subSystem.toStdString() == info.strDesc) { @@ -572,34 +572,34 @@ void CAlarmFilterDialog::slot_updateDevice(const QString &subSystem) ui->deviceType->clear(); - QList values; + QList values; if(nSubSystemId != -1) { - kbd_dbms::CVarType subSystemId = nSubSystemId; + iot_dbms::CVarType subSystemId = nSubSystemId; if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CONDINFO condition; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CONDINFO condition; condition.relationop = ATTRCOND_EQU; memcpy(condition.name, "sub_system", strlen("sub_system")); condition.conditionval = subSystemId; std::vector columns; columns.push_back("description"); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; if(m_rtdbAccess->select(condition, result, columns)) { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType value; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, value); values.append(value); } } } } - foreach (kbd_dbms::CVarType value, values) + foreach (iot_dbms::CVarType value, values) { ui->deviceType->addItem(value.c_str()); } diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.h b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.h index e9c54713..e650900c 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmFilterDialog.h @@ -96,7 +96,7 @@ private slots: private: Ui::CAlarmFilterDialog *ui; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_priorityMap; QMap m_locationMap; QMap m_regionMap; diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmForm.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmForm.cpp index 02e7b3c6..0336b173 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmForm.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmForm.cpp @@ -178,7 +178,7 @@ void CAlarmForm::initialize() void CAlarmForm::loadConfig() { - QFile file(kbd_public::CFileUtil::getPathOfCfgFile("intelli_alm_cfg.xml",CN_DIR_PLATFORM).c_str()); + QFile file(iot_public::CFileUtil::getPathOfCfgFile("intelli_alm_cfg.xml",CN_DIR_PLATFORM).c_str()); if (!file.open(QFile::ReadWrite)) { LOGERROR("打开智能告警配置文件失败,默认不启动"); @@ -219,9 +219,9 @@ void CAlarmForm::updateAlarmOperatePerm() { m_listRegionId.clear(); m_listLocationId.clear(); - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return; @@ -229,7 +229,7 @@ void CAlarmForm::updateAlarmOperatePerm() spSysInfo->getLocalNodeInfo(stNodeInfo); m_nodeName = stNodeInfo.strName; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -1150,7 +1150,7 @@ void CAlarmForm::contextMenuStack1Event(QContextMenuEvent *event) { QAction * mergeAction = menu.addAction(tr("合并")); connect(mergeAction,&QAction::triggered,[=](){ - QMap pkgMap; + QMap pkgMap; QList listPtr; listPtr.clear(); int permSkip = -1; @@ -1227,10 +1227,10 @@ void CAlarmForm::contextMenuStack1Event(QContextMenuEvent *event) for(int x(0);xdomain_id; - QMap::iterator it = pkgMap.find(domain_id); + QMap::iterator it = pkgMap.find(domain_id); if( it == pkgMap.end()) { - kbd_idlfile::SIntelliAlmMerge *pkg =new kbd_idlfile::SIntelliAlmMerge(); + iot_idl::SIntelliAlmMerge *pkg =new iot_idl::SIntelliAlmMerge(); pkg->set_domain_id(domain_id); pkgMap[domain_id] = pkg; } @@ -1248,7 +1248,7 @@ void CAlarmForm::contextMenuStack1Event(QContextMenuEvent *event) pkgMap.clear(); return ; } - foreach (kbd_idlfile::SIntelliAlmMerge * pkg, pkgMap) + foreach (iot_idl::SIntelliAlmMerge * pkg, pkgMap) { CAiAlarmDataCollect::instance()->requestMergeAlm(*pkg); } @@ -1327,7 +1327,7 @@ void CAlarmForm::contextMenuStack1Event(QContextMenuEvent *event) } //拼包 int domain_id = msgList.at(0)->domain_id; - kbd_idlfile::SIntelliAlmSepr *pkg = new kbd_idlfile::SIntelliAlmSepr(); + iot_idl::SIntelliAlmSepr *pkg = new iot_idl::SIntelliAlmSepr(); pkg->set_domain_id(domain_id); for(int index(0);index > > locationInfos; QMap locationMap = m_pModel->locationDescriptionMap(); - kbd_dbms::CDbApi *m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi *m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(m_pReadDb->open()) { QMap::const_iterator iter = locationMap.constBegin(); @@ -1462,7 +1462,7 @@ void CAlarmForm::removeAlarm0() } QList listInfo = m_pModel->getListShowAlarmInfo(); //声明告警删除package - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 int unConfirmSkip = -1; //< 未确认告警是否跳过: 0-单步跳过、1-全部跳过 foreach (QModelIndex index, modelIndexList) @@ -1544,10 +1544,10 @@ void CAlarmForm::removeAlarm0() } //构建告警删除package - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; LOGINFO("Bulid Alarm Remove MSG: %s", info->key_id_tag.toStdString().c_str()); @@ -1556,7 +1556,7 @@ void CAlarmForm::removeAlarm0() } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestDelAlm(*pkg)!= true) { @@ -1579,8 +1579,8 @@ void CAlarmForm::removeAlarm1() QList aimsgList; //选中的智能告警 QList msgList; //选中的原始告警 //声明智能告警删除package - QMap aipkgMap; //Domain-DelPkg; ai - QMap pkgMap; //Domain-DelPkg; alarm + QMap aipkgMap; //Domain-DelPkg; ai + QMap pkgMap; //Domain-DelPkg; alarm int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 int unConfirmSkip = -1; //< 未确认告警是否跳过: 0-单步跳过、1-全部跳过 foreach (QModelIndex index, modelIndexList) @@ -1691,10 +1691,10 @@ void CAlarmForm::removeAlarm1() } } //构建告警删除package - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; LOGINFO("Bulid Alarm Remove MSG: %s", info->key_id_tag.toStdString().c_str()); @@ -1776,17 +1776,17 @@ void CAlarmForm::removeAlarm1() } int domain_id = aimsgList.at(aialarm)->domain_id; QString aiuuid = aimsgList.at(aialarm)->uuid_base64; - QMap::iterator it = aipkgMap.find(domain_id); + QMap::iterator it = aipkgMap.find(domain_id); if(it == aipkgMap.end()) { - kbd_idlfile::SIntelliAlmDel * pkg = new kbd_idlfile::SIntelliAlmDel(); + iot_idl::SIntelliAlmDel * pkg = new iot_idl::SIntelliAlmDel(); pkg->set_domain_id(domain_id); aipkgMap[domain_id] = pkg; } aipkgMap.value(domain_id)->add_uuid_base64(aiuuid.toStdString()); } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { if(CAlarmDataCollect::instance()->requestDelAlm(*pkg)!= true) { @@ -1796,7 +1796,7 @@ void CAlarmForm::removeAlarm1() qDeleteAll(pkgMap); pkgMap.clear(); //请求删除 - foreach (kbd_idlfile::SIntelliAlmDel * pkg, aipkgMap) + foreach (iot_idl::SIntelliAlmDel * pkg, aipkgMap) { CAiAlarmDataCollect::instance()->requestDelAlm(*pkg); } @@ -1820,7 +1820,7 @@ void CAlarmForm::confirmAlarm0() } //构建告警确认package - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 foreach (QModelIndex index, modelIndexList) @@ -1868,10 +1868,10 @@ void CAlarmForm::confirmAlarm0() if(E_ALS_ALARM == info->logic_state || E_ALS_RETURN == info->logic_state) { QString key = QString::number(info->domain_id); - QMap::iterator it = pkgMap.find(key); + QMap::iterator it = pkgMap.find(key); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -1889,7 +1889,7 @@ void CAlarmForm::confirmAlarm0() } //请求确认 - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { CAlarmDataCollect::instance()->requestCfmAlm(*pkg); } @@ -1910,7 +1910,7 @@ void CAlarmForm::confirmAlarm1() QList msgList; //选中的原始告警 QList uuidList; //构建告警确认package - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; int permSkip = -1; //< 不具备确认权限时是否跳过: 0-单步跳过、1-全部跳过 foreach (QModelIndex index, modelIndexList) { @@ -1986,10 +1986,10 @@ void CAlarmForm::confirmAlarm1() E_ALS_ALARM_DEL == msgList.at(alarmNum)->logic_state || E_ALS_RETURN_DEL == msgList.at(alarmNum)->logic_state) { QString key = QString(msgList.at(alarmNum)->domain_id); - QMap::iterator it= pkgMap.find(key); + QMap::iterator it= pkgMap.find(key); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -2003,7 +2003,7 @@ void CAlarmForm::confirmAlarm1() pkgMap.value(key)->add_uuid_base64(msgList.at(alarmNum)->uuid_base64.toStdString()); } } - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { CAlarmDataCollect::instance()->requestCfmAlm(*pkg); } diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmInhibitDialog.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmInhibitDialog.cpp index ff8ece89..b5b2b98d 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmInhibitDialog.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmInhibitDialog.cpp @@ -16,7 +16,7 @@ CAlarmInhibitDialog::CAlarmInhibitDialog(QWidget *parent) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -26,7 +26,7 @@ CAlarmInhibitDialog::CAlarmInhibitDialog(QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.cpp index 52f3ac95..4fbdccea 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.cpp @@ -18,7 +18,7 @@ ///////////////////////////////////////////////////////////////////////////// -using namespace kbd_public; +using namespace iot_public; using namespace std; const int DOCK_ROW_COUNT = 3; const int MAX_ROW_COUNT = 15000; @@ -33,7 +33,7 @@ CAlarmItemModel::CAlarmItemModel(E_Alarm_Mode mode, QObject *parent) m_rtdbAccess(Q_NULLPTR) { m_nTotalSize = 0; - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_alternateFlag = true; m_header <PermDllInit(); @@ -916,8 +916,8 @@ void CAlarmItemModel::loadPriorityDescription() { if(m_rtdbAccess->open("base", "alarm_level_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_name"); @@ -926,8 +926,8 @@ void CAlarmItemModel::loadPriorityDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_priorityDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -940,8 +940,8 @@ void CAlarmItemModel::loadLocationDescription() { if(m_rtdbAccess->open("base", "sys_model_location_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("description"); @@ -951,8 +951,8 @@ void CAlarmItemModel::loadLocationDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermLocationId.contains(key.toInt())) @@ -968,8 +968,8 @@ void CAlarmItemModel::loadRegionDescription() { if(m_rtdbAccess->open("base", "region_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("region_id"); columns.push_back("description"); @@ -978,8 +978,8 @@ void CAlarmItemModel::loadRegionDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermRegionId.contains(key.toInt())) @@ -996,8 +996,8 @@ void CAlarmItemModel::loadAlarmTypeDescription() { if(m_rtdbAccess->open("base", "alarm_type_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("type_id"); columns.push_back("type_name"); @@ -1006,8 +1006,8 @@ void CAlarmItemModel::loadAlarmTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -1020,8 +1020,8 @@ void CAlarmItemModel::loadAlarmStatusDescription() { if(m_rtdbAccess->open("base", "alarm_status_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("status_value"); columns.push_back("display_name"); @@ -1030,8 +1030,8 @@ void CAlarmItemModel::loadAlarmStatusDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -1045,8 +1045,8 @@ void CAlarmItemModel::loadDeviceTypeDescription() { if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -1055,8 +1055,8 @@ void CAlarmItemModel::loadDeviceTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -1069,8 +1069,8 @@ void CAlarmItemModel::loadDeviceGroupDescription() { if(m_rtdbAccess->open("base", "dev_group")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("tag_name"); columns.push_back("description"); @@ -1079,8 +1079,8 @@ void CAlarmItemModel::loadDeviceGroupDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceGroupDescriptionMap[QString::fromStdString(key.toStdString())] = QString::fromStdString(value.toStdString()); @@ -1091,7 +1091,7 @@ void CAlarmItemModel::loadDeviceGroupDescription() void CAlarmItemModel::loadAlarmShowStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -1126,7 +1126,7 @@ void CAlarmItemModel::loadAlarmShowStatusDescription() void CAlarmItemModel::loadAlarmOtherStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.h b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.h index 01de61ba..a025c8eb 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmItemModel.h @@ -187,7 +187,7 @@ private: QList m_listPermLocationId; QList m_listPermRegionId; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_priorityDescriptionMap; QMap m_locationDescriptionMap; QMap m_regionDescriptionMap; diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMediaPlayer.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMediaPlayer.cpp index eedceb1e..419d836d 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMediaPlayer.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMediaPlayer.cpp @@ -16,7 +16,7 @@ const int MAX_AUDIO_COUNT = 100; -using namespace kbd_public; +using namespace iot_public; CAlarmMediaPlayer *CAlarmMediaPlayer::instance() { static CAlarmMediaPlayer player; @@ -26,7 +26,7 @@ CAlarmMediaPlayer *CAlarmMediaPlayer::instance() CAlarmMediaPlayer::CAlarmMediaPlayer() :m_bHaveValidAudioDev(false),m_pMediaPlayer(Q_NULLPTR),m_pTimerCheckAudioDev(Q_NULLPTR) { - QDir dir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir dir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); dir.cdUp(); dir.cdUp(); dir.cd("data"); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.cpp index 3f817705..ce6dbd48 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.cpp @@ -69,7 +69,7 @@ CAlarmMsgInfo::CAlarmMsgInfo(const CAlarmMsgInfo &other) } -void CAlarmMsgInfo::initialize(const kbd_idlfile::SAlmInfoToAlmClt &alarmInfo) +void CAlarmMsgInfo::initialize(const iot_idl::SAlmInfoToAlmClt &alarmInfo) { alm_type = alarmInfo.alm_type(); alm_status = alarmInfo.alm_status(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.h b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.h index 2f9a69db..b8c78aa8 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgInfo.h @@ -29,7 +29,7 @@ class CAlarmMsgInfo public: CAlarmMsgInfo(); CAlarmMsgInfo(const CAlarmMsgInfo &other); - void initialize(const kbd_idlfile::SAlmInfoToAlmClt &alarmInfo); + void initialize(const iot_idl::SAlmInfoToAlmClt &alarmInfo); int getCameraInfoByTag(const QString &tag); //< [优先级越小表示越大]-原始告警窗调用 diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.cpp index 11f1ee08..af43b652 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.cpp @@ -17,7 +17,7 @@ #include "pub_utility_api/CharUtil.h" #include "pub_logger_api/logger.h" -using namespace kbd_public; +using namespace iot_public; using namespace std; CAlarmMsgManage *CAlarmMsgManage::pInstance = NULL; @@ -60,18 +60,18 @@ CAlarmMsgManage::CAlarmMsgManage() m_regionDescriptionMap.clear(); m_alarmTypeDescriptionMap.clear(); m_alarmStatusDescriptionMap.clear(); - m_rtdbAlarmActionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAlarmActionAccess = new iot_dbms::CRdbAccess(); m_rtdbAlarmActionAccess->open("base", "alarm_level_define"); - m_rtdbLocationDescriptionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbLocationDescriptionAccess = new iot_dbms::CRdbAccess(); m_rtdbLocationDescriptionAccess->open("base", "sys_model_location_info"); - m_rtdbAppDescriptionAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAppDescriptionAccess = new iot_dbms::CRdbAccess(); m_rtdbAppDescriptionAccess->open("base", "sys_model_app_info"); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); - m_dbInterface = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_dbInterface = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); loadPermInfo(); } @@ -612,8 +612,8 @@ void CAlarmMsgManage::loadPriorityDescription() { if(m_rtdbAccess->open("base", "alarm_level_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_name"); @@ -622,8 +622,8 @@ void CAlarmMsgManage::loadPriorityDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_priorityDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -636,8 +636,8 @@ void CAlarmMsgManage::loadLocationDescription() { if(m_rtdbAccess->open("base", "sys_model_location_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("description"); @@ -647,8 +647,8 @@ void CAlarmMsgManage::loadLocationDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); // if(m_listPermLocationId.contains(key.toInt())) @@ -664,8 +664,8 @@ void CAlarmMsgManage::loadRegionDescription() { if(m_rtdbAccess->open("base", "region_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("region_id"); columns.push_back("description"); @@ -674,8 +674,8 @@ void CAlarmMsgManage::loadRegionDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); // if(m_listPermRegionId.contains(key.toInt())) @@ -692,8 +692,8 @@ void CAlarmMsgManage::loadAlarmTypeDescription() { if(m_rtdbAccess->open("base", "alarm_type_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("type_id"); columns.push_back("type_name"); @@ -702,8 +702,8 @@ void CAlarmMsgManage::loadAlarmTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -716,8 +716,8 @@ void CAlarmMsgManage::loadAlarmStatusDescription() { if(m_rtdbAccess->open("base", "alarm_status_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("status_value"); columns.push_back("display_name"); @@ -726,8 +726,8 @@ void CAlarmMsgManage::loadAlarmStatusDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -740,8 +740,8 @@ void CAlarmMsgManage::loadDeviceTypeDescription() { if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -750,8 +750,8 @@ void CAlarmMsgManage::loadDeviceTypeDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -764,8 +764,8 @@ void CAlarmMsgManage::loadDeviceGroupDescription() { if(m_rtdbAccess->open("base", "dev_group")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("tag_name"); columns.push_back("description"); @@ -774,8 +774,8 @@ void CAlarmMsgManage::loadDeviceGroupDescription() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceGroupDescriptionMap[QString::fromStdString(key.toStdString())] = QString::fromStdString(value.toStdString()); @@ -786,7 +786,7 @@ void CAlarmMsgManage::loadDeviceGroupDescription() void CAlarmMsgManage::loadAlarmShowStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -821,7 +821,7 @@ void CAlarmMsgManage::loadAlarmShowStatusDescription() void CAlarmMsgManage::loadAlarmOtherStatusDescription() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -1678,31 +1678,31 @@ QList CAlarmMsgManage::findMsgsByKeyIdTag(const QString &key_id_tag int CAlarmMsgManage::queryAlarmAction(const int &priority) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAlarmActionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbAlarmActionAccess); + iot_dbms::CVarType value; m_rtdbAlarmActionAccess->getColumnValueByKey((void*)&priority, "alarm_actions",value); return value.toInt(); } QString CAlarmMsgManage::queryLocationDescription(int id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbLocationDescriptionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbLocationDescriptionAccess); + iot_dbms::CVarType value; m_rtdbLocationDescriptionAccess->getColumnValueByKey((void*)&id, "description", value); return value.c_str(); } QString CAlarmMsgManage::queryAppDescription(int id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAppDescriptionAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbAppDescriptionAccess); + iot_dbms::CVarType value; m_rtdbAppDescriptionAccess->getColumnValueByKey((void*)&id, "description", value); return value.c_str(); } void CAlarmMsgManage::loadPermInfo() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.h b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.h index a1ae0842..e8eb0c2c 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.h +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmMsgManage.h @@ -420,11 +420,11 @@ public: int getAlmTotal(); private: QMutex * mutex; - kbd_dbms::CRdbAccess * m_rtdbAlarmActionAccess; - kbd_dbms::CRdbAccess * m_rtdbLocationDescriptionAccess; - kbd_dbms::CRdbAccess * m_rtdbAppDescriptionAccess; - //kbd_dbms::CRdbAccess * m_rtdbDeviceAccess; - kbd_dbms::CDbApi * m_dbInterface; + iot_dbms::CRdbAccess * m_rtdbAlarmActionAccess; + iot_dbms::CRdbAccess * m_rtdbLocationDescriptionAccess; + iot_dbms::CRdbAccess * m_rtdbAppDescriptionAccess; + //iot_dbms::CRdbAccess * m_rtdbDeviceAccess; + iot_dbms::CDbApi * m_dbInterface; int m_nNDelComAlarmCount; //< 未删除未确认数量 N--not Del--delete Com--confirm int m_nDelNComAlarmCount; //< 已删除未确认数量 QHash m_infos; @@ -454,7 +454,7 @@ private: QHash > > m_alarmDGPDev; //< <设备组,<告警等级,设备> > QHash > m_alarmLPAlm; //< <车站id,<告警等级,告警数量> > - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_priorityDescriptionMap; QMap m_locationDescriptionMap; QMap m_regionDescriptionMap; diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmPlugin.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmPlugin.cpp index da760e08..f937b850 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmPlugin.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmPlugin.cpp @@ -32,7 +32,7 @@ CAlarmPlugin::CAlarmPlugin(QWidget *parent, bool editMode) m_pModel(Q_NULLPTR) { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -42,7 +42,7 @@ CAlarmPlugin::CAlarmPlugin(QWidget *parent, bool editMode) qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarm.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -252,7 +252,7 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) return -1; } //< 可能有部分告警没有确认权限 - QMap pkgMap; //Domain-DelPkg; + QMap pkgMap; //Domain-DelPkg; for(int nIndex(0); nIndex < msgs.size(); nIndex++) { AlarmMsgPtr info = msgs.at(nIndex); @@ -278,10 +278,10 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) } if(regionEnable && locationEnable) { - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if(it == pkgMap.end()) { - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_currentNodeName); pkg->set_user_id(m_currentUsrId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -297,7 +297,7 @@ int CAlarmPlugin::confirmAlarm(const QList &msgs) } } //请求确认 - foreach (kbd_idlfile::SAlmCltCfmAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltCfmAlm * pkg, pkgMap) { CAlarmDataCollect::instance()->requestCfmAlm(*pkg); } @@ -318,7 +318,7 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) return -1; } //< 可能有部分告警没有删除权限 - QMap pkgMap; + QMap pkgMap; for(int nIndex(0); nIndex < msgs.size(); nIndex++) { AlarmMsgPtr info = msgs.at(nIndex); @@ -344,10 +344,10 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) } if(regionEnable && locationEnable) { - QMap::iterator it = pkgMap.find(info->domain_id); + QMap::iterator it = pkgMap.find(info->domain_id); if( it == pkgMap.end()) { - kbd_idlfile::SAlmCltDelAlm * pkg = new kbd_idlfile::SAlmCltDelAlm(); + iot_idl::SAlmCltDelAlm * pkg = new iot_idl::SAlmCltDelAlm(); pkg->set_domain_id(info->domain_id); pkgMap[info->domain_id] = pkg; } @@ -355,7 +355,7 @@ int CAlarmPlugin::removeAlarm(const QList &msgs) } } //请求删除 - foreach (kbd_idlfile::SAlmCltDelAlm * pkg, pkgMap) + foreach (iot_idl::SAlmCltDelAlm * pkg, pkgMap) { CAlarmDataCollect::instance()->requestDelAlm(*pkg); } @@ -881,9 +881,9 @@ void CAlarmPlugin::updateAlarmOperatePerm() m_vecRegionId.clear(); m_vecLocationId.clear(); - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!") return; @@ -891,7 +891,7 @@ void CAlarmPlugin::updateAlarmOperatePerm() spSysInfo->getLocalNodeInfo(stNodeInfo); m_currentNodeName = stNodeInfo.strName; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmWidget.cpp b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmWidget.cpp index 0da30a4f..b7a029f6 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/CAlarmWidget.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/CAlarmWidget.cpp @@ -302,7 +302,7 @@ void CAlarmWidget::confirmAlarm(const int &row) return; } - kbd_idlfile::SAlmCltCfmAlm * pkg = new kbd_idlfile::SAlmCltCfmAlm(); + iot_idl::SAlmCltCfmAlm * pkg = new iot_idl::SAlmCltCfmAlm(); pkg->set_node_name(m_nodeName); pkg->set_user_id(m_userId); pkg->set_confirm_time(QDateTime::currentMSecsSinceEpoch()); @@ -320,9 +320,9 @@ void CAlarmWidget::confirmAlarm(const int &row) bool CAlarmWidget::updateAlarmOperatePerm() { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return false; @@ -330,7 +330,7 @@ bool CAlarmWidget::updateAlarmOperatePerm() spSysInfo->getLocalNodeInfo(stNodeInfo); m_nodeName = stNodeInfo.strName; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/ISCSAlarmWidget/main.cpp b/product/src/gui/plugin/ISCSAlarmWidget/main.cpp index 90f7977e..6477efb7 100644 --- a/product/src/gui/plugin/ISCSAlarmWidget/main.cpp +++ b/product/src/gui/plugin/ISCSAlarmWidget/main.cpp @@ -10,12 +10,12 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); //<初始化消息总线 - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -35,8 +35,8 @@ int main(int argc, char *argv[]) } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.cpp b/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.cpp index 2f2b3119..bdca55b1 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.cpp @@ -16,7 +16,7 @@ #include "pub_utility_api/FileUtil.h" #include "pub_utility_api/CharUtil.h" using namespace std; -using namespace kbd_public; +using namespace iot_public; CEventDataCollect * CEventDataCollect::m_pInstance = NULL; CEventDataCollect * CEventDataCollect::instance() @@ -33,11 +33,11 @@ CEventDataCollect::CEventDataCollect() { msgMutex = new QMutex(); - m_dbHisReadApi = new kbd_dbms::CDbApi(DB_CONN_HIS_READ); + m_dbHisReadApi = new iot_dbms::CDbApi(DB_CONN_HIS_READ); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); - m_rtdbPriorityOrderAccess = new kbd_dbms::CRdbAccess(); + m_rtdbPriorityOrderAccess = new iot_dbms::CRdbAccess(); m_rtdbPriorityOrderAccess->open("base", "alarm_level_define"); m_pTimer = new QTimer(); @@ -77,12 +77,12 @@ CEventDataCollect::~CEventDataCollect() bool CEventDataCollect::initialize() { m_pTimer->start(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - kbd_public::SNodeInfo stNodeInfo; + iot_public::SNodeInfo stNodeInfo; spSysInfo->getLocalNodeInfo(stNodeInfo); - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(stNodeInfo.nLocationId, stLocationInfo); m_nLocationID = stNodeInfo.nLocationId; } @@ -219,7 +219,7 @@ QList CEventDataCollect::alarmOtherList() void CEventDataCollect::loadPermInfo() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { @@ -249,8 +249,8 @@ QMap CEventDataCollect::priorityDescriptionMap() m_priorityDescriptionMap.clear(); if(m_rtdbAccess->open("base", "alarm_level_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("priority_id"); columns.push_back("priority_name"); @@ -259,8 +259,8 @@ QMap CEventDataCollect::priorityDescriptionMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_priorityDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -275,8 +275,8 @@ QMap CEventDataCollect::locationDescriptionMap() m_locationDescriptionMap.clear(); if(m_rtdbAccess->open("base", "sys_model_location_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("location_id"); columns.push_back("description"); @@ -286,8 +286,8 @@ QMap CEventDataCollect::locationDescriptionMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermLocationId.contains(key.toInt())) @@ -305,8 +305,8 @@ QMap CEventDataCollect::regionInfoDescriptionMap() m_regionInfoDescriptionMap.clear(); if(m_rtdbAccess->open("base", "region_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("region_id"); columns.push_back("description"); @@ -315,8 +315,8 @@ QMap CEventDataCollect::regionInfoDescriptionMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); if(m_listPermRegionId.contains(key.toInt())) @@ -334,8 +334,8 @@ QMap CEventDataCollect::alarmTypeDescriptionMap() m_alarmTypeDescriptionMap.clear(); if(m_rtdbAccess->open("base", "alarm_type_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("type_id"); columns.push_back("type_name"); @@ -344,8 +344,8 @@ QMap CEventDataCollect::alarmTypeDescriptionMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -361,8 +361,8 @@ QMap CEventDataCollect::deviceTypeDescriptionMap() m_deviceTypeDescriptionMap.clear(); if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("dev_type_id"); columns.push_back("description"); @@ -371,8 +371,8 @@ QMap CEventDataCollect::deviceTypeDescriptionMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_deviceTypeDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -387,8 +387,8 @@ QMap CEventDataCollect::alarmStatusMap() m_alarmStatusMap.clear(); if(m_rtdbAccess->open("base", "alarm_status_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("status_value"); columns.push_back("display_name"); @@ -397,8 +397,8 @@ QMap CEventDataCollect::alarmStatusMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -413,8 +413,8 @@ QMap CEventDataCollect::userNameMap() m_userNameMap.clear(); if(m_rtdbAccess->open("base", "rm_user_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_id"); columns.push_back("perm_name"); @@ -423,8 +423,8 @@ QMap CEventDataCollect::userNameMap() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_userNameMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -436,7 +436,7 @@ QMap CEventDataCollect::userNameMap() QMap CEventDataCollect::eventShowStatusDescriptionMap() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -473,7 +473,7 @@ QMap CEventDataCollect::eventShowStatusDescriptionMap() QMap CEventDataCollect::eventOtherStatusDescriptionMap() { m_eventOtherStatusMap.clear(); - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -617,13 +617,13 @@ void CEventDataCollect::slotUpdateEvent() m_listEventCache.clear(); } -void CEventDataCollect::handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEvt &objAllEvt) +void CEventDataCollect::handleAllEvtMsg(int nDomainID, iot_idl::SEvtCltAddEvt &objAllEvt) { QMutexLocker locker(msgMutex); CEventMsgManage::instance()->removeEventMsgByDomainID(nDomainID); for(int nAddMsgIndex(0); nAddMsgIndex < objAllEvt.evt_info_size(); nAddMsgIndex++) { - kbd_idlfile::SEvtInfoToEvtClt msg = objAllEvt.evt_info(nAddMsgIndex); + iot_idl::SEvtInfoToEvtClt msg = objAllEvt.evt_info(nAddMsgIndex); EventMsgPtr event(new CEventMsgInfo()); event->initialize(msg); event->priorityOrder = queryPriorityOrder(event->priority); @@ -641,12 +641,12 @@ void CEventDataCollect::handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEv emit sigEventStateChanged(); } -void CEventDataCollect::handleAddEvtMsg(kbd_idlfile::SEvtCltAddEvt &objAddEvt) +void CEventDataCollect::handleAddEvtMsg(iot_idl::SEvtCltAddEvt &objAddEvt) { QMutexLocker locker(msgMutex); for(int nAddMsgIndex(0); nAddMsgIndex < objAddEvt.evt_info_size(); nAddMsgIndex++) { - kbd_idlfile::SEvtInfoToEvtClt msg = objAddEvt.evt_info(nAddMsgIndex); + iot_idl::SEvtInfoToEvtClt msg = objAddEvt.evt_info(nAddMsgIndex); EventMsgPtr event(new CEventMsgInfo()); event->initialize(msg); event->priorityOrder = queryPriorityOrder(event->priority); @@ -774,8 +774,8 @@ void CEventDataCollect::queryHistoryEvent(const QStringList &tables, const QStri int CEventDataCollect::queryPriorityOrder(int &id) { - kbd_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); - kbd_dbms::CVarType value; + iot_dbms::CTableLockGuard locker(*m_rtdbPriorityOrderAccess); + iot_dbms::CVarType value; m_rtdbPriorityOrderAccess->getColumnValueByKey((void*)&id, "priority_order", value); return value.toInt(); } diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.h b/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.h index 9f8cf868..5ef9b2ea 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.h +++ b/product/src/gui/plugin/ISCSEventWidget/CEventDataCollect.h @@ -13,7 +13,7 @@ #define FUNC_SPE_EVENT_VIEW ("FUNC_SPE_EVENT_VIEW") #define LIMIT_HIS_RECORD 10000 const int OTHERSTATUS = 9999; -class CEventDataCollect : public QObject, public kbd_service::CAlmApiForEvtClt +class CEventDataCollect : public QObject, public iot_service::CAlmApiForEvtClt { Q_OBJECT public: @@ -61,9 +61,9 @@ public: QMap eventShowStatusDescriptionMap(); QMap eventOtherStatusDescriptionMap(); - virtual void handleAllEvtMsg(int nDomainID, kbd_idlfile::SEvtCltAddEvt &objAllEvt); + virtual void handleAllEvtMsg(int nDomainID, iot_idl::SEvtCltAddEvt &objAllEvt); - virtual void handleAddEvtMsg(kbd_idlfile::SEvtCltAddEvt &objAddEvt); + virtual void handleAddEvtMsg(iot_idl::SEvtCltAddEvt &objAddEvt); void handleClearRTEvent(); @@ -99,9 +99,9 @@ private: QTimer * m_pTimer; int m_nLocationID; QList m_listEventCache; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; - kbd_dbms::CDbApi * m_dbHisReadApi; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbPriorityOrderAccess; + iot_dbms::CDbApi * m_dbHisReadApi; QList m_listPermLocationId; QList m_listPermRegionId; QMap m_priorityOrderMap; diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.cpp b/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.cpp index b788745e..ad2f9456 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.cpp @@ -27,7 +27,7 @@ CEventFilterDialog::~CEventFilterDialog() void CEventFilterDialog::initialize() { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); ui->level->setSelectionMode(QAbstractItemView::MultiSelection); ui->location->setSelectionMode(QAbstractItemView::MultiSelection); ui->region->setSelectionMode(QAbstractItemView::MultiSelection); @@ -57,12 +57,12 @@ void CEventFilterDialog::initialize() ui->type->addItem(CEventDataCollect::instance()->alarmTypeDescription(alarmType)); } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(info.nId <= CN_AppId_COMAPP) { @@ -482,12 +482,12 @@ void CEventFilterDialog::slot_updateCheckTypeState() void CEventFilterDialog::slot_updateDevice(const QString &subSystem) { int nSubSystemId = -1; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - std::vector vecSubsystemInfo; + std::vector vecSubsystemInfo; spSysInfo->getAllSubsystemInfo(vecSubsystemInfo); - foreach (kbd_public::SSubsystemInfo info, vecSubsystemInfo) + foreach (iot_public::SSubsystemInfo info, vecSubsystemInfo) { if(subSystem.toStdString() == info.strDesc) { @@ -497,34 +497,34 @@ void CEventFilterDialog::slot_updateDevice(const QString &subSystem) } ui->deviceType->clear(); - QList values; + QList values; if(nSubSystemId != -1) { - kbd_dbms::CVarType subSystemId = nSubSystemId; + iot_dbms::CVarType subSystemId = nSubSystemId; if(m_rtdbAccess->open("base", "dev_type_def")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CONDINFO condition; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CONDINFO condition; condition.relationop = ATTRCOND_EQU; memcpy(condition.name, "sub_system", strlen("sub_system")); condition.conditionval = subSystemId; std::vector columns; columns.push_back("description"); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; if(m_rtdbAccess->select(condition, result, columns)) { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType value; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, value); values.append(value); } } } } - foreach (kbd_dbms::CVarType value, values) + foreach (iot_dbms::CVarType value, values) { ui->deviceType->addItem(value.c_str()); } diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.h b/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.h index 5e3919dc..84d27583 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.h +++ b/product/src/gui/plugin/ISCSEventWidget/CEventFilterDialog.h @@ -70,7 +70,7 @@ private slots: private: Ui::CEventFilterDialog *ui; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; }; #endif // CEVENTFILTERDIALOG_H diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventForm.cpp b/product/src/gui/plugin/ISCSEventWidget/CEventForm.cpp index cf3f002a..9c95b482 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventForm.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/CEventForm.cpp @@ -55,7 +55,7 @@ CEventForm::CEventForm(QWidget *parent, bool editMode) : ui->eventView->setColumnWidth(5, 150); } QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -65,7 +65,7 @@ CEventForm::CEventForm(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("event.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("event.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventHistoryModel.cpp b/product/src/gui/plugin/ISCSEventWidget/CEventHistoryModel.cpp index 9c0c69d9..10e25586 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventHistoryModel.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/CEventHistoryModel.cpp @@ -61,7 +61,7 @@ void CEventHistoryModel::initFilter() void CEventHistoryModel::loadEventHistoryData() { //< 权限判断 - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -117,10 +117,10 @@ QString CEventHistoryModel::bulidCondition() LOGDEBUG("bulidConditionPartStatus():[%s]",status.toStdString().c_str()); //< 车站 - // kbd_public::SNodeInfo stNodeInfo; - // kbd_public::SLocationInfo stLocationInfo; - // kbd_public::CSysInfoInterfacePtr spSysInfo; - // if (kbd_public::createSysInfoInstance(spSysInfo)) + // iot_public::SNodeInfo stNodeInfo; + // iot_public::SLocationInfo stLocationInfo; + // iot_public::CSysInfoInterfacePtr spSysInfo; + // if (iot_public::createSysInfoInstance(spSysInfo)) // { // spSysInfo->getLocalNodeInfo(stNodeInfo); // spSysInfo->getLocationInfoById(stNodeInfo.nLocationId, stLocationInfo); @@ -233,7 +233,7 @@ QString CEventHistoryModel::bulidConditionPartType() QString CEventHistoryModel::bulidConditionPartLocation() { QList locationFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -284,7 +284,7 @@ QString CEventHistoryModel::bulidConditionPartLocation() QString CEventHistoryModel::bulidConditionPartRegion() { QList regionFilter; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.cpp b/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.cpp index e47bcca5..67db931c 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.cpp @@ -32,7 +32,7 @@ CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other) deleted = other.deleted; } -void CEventMsgInfo::initialize(const kbd_idlfile::SEvtInfoToEvtClt &eventInfo) +void CEventMsgInfo::initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo) { alm_type = eventInfo.alm_type(); time_stamp = eventInfo.time_stamp(); diff --git a/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.h b/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.h index 6743107f..7c5a9e7c 100644 --- a/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.h +++ b/product/src/gui/plugin/ISCSEventWidget/CEventMsgInfo.h @@ -34,7 +34,7 @@ class CEventMsgInfo public: CEventMsgInfo(); CEventMsgInfo(const CEventMsgInfo &other); - void initialize(const kbd_idlfile::SEvtInfoToEvtClt &eventInfo); + void initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo); bool lessThan(EventMsgPtr info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); bool moreThan(EventMsgPtr info, E_ALARM_SORTKEY sortkey = E_SORT_PRIORITY); diff --git a/product/src/gui/plugin/ISCSEventWidget/main.cpp b/product/src/gui/plugin/ISCSEventWidget/main.cpp index 41afc697..e8d744d0 100644 --- a/product/src/gui/plugin/ISCSEventWidget/main.cpp +++ b/product/src/gui/plugin/ISCSEventWidget/main.cpp @@ -11,16 +11,16 @@ int main(int argc, char *argv[]) //<初始化消息总线 - //kbd_public::StartLogSystem(NULL, "HMI", "Alarm_Client"); - kbd_public::StartLogSystem(NULL, "HMI"); - kbd_net::initMsgBus("Alarm_Client", "1", true); + //iot_public::StartLogSystem(NULL, "HMI", "Alarm_Client"); + iot_public::StartLogSystem(NULL, "HMI"); + iot_net::initMsgBus("Alarm_Client", "1", true); - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); permMngPtr->PermDllInit(); if(permMngPtr->SysLogin("2", "2", 1, 12*60*60, "hmi") != 0) { - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return -1; } // CEventPlugin p; @@ -35,8 +35,8 @@ int main(int argc, char *argv[]) //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.cpp b/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.cpp index 6ed7a392..b7e5834d 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.cpp @@ -3,7 +3,7 @@ #include "sample_server_api/SampleDefine.h" #include "CTrendInfoManage.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CHisDataManage::CHisDataManage(QObject *parent) : QObject(parent), @@ -52,10 +52,10 @@ void CHisDataManage::release() delete this; } -bool CHisDataManage::getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr) +bool CHisDataManage::getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr) { //< 不使用getOneUseableConn()返回的正式库测试 - // ptr.reset(new kbd_dbms::CTsdbConn("127.0.0.1", -1, "iscs6000", "", "")); + // ptr.reset(new iot_dbms::CTsdbConn("127.0.0.1", -1, "iscs6000", "", "")); // return true; if(m_tsdbConnPtr != NULL) { @@ -135,7 +135,7 @@ void CHisDataManage::queryHistoryOriginalData(std::vector *vecMpK double nIntervalSecs = SAMPLE_CYC_MIN * 60 * 1000; std::vector *> *vecResult = new std::vector *>(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { for(size_t nIndex(0); nIndex < vecMpKey->size(); nIndex++) @@ -143,7 +143,7 @@ void CHisDataManage::queryHistoryOriginalData(std::vector *vecMpK vecResult->push_back(new std::vector()); } if(!getHisSamplePoint(*tsdbConnPtr, 10000, *vecMpKey, lower - nIntervalSecs, upper + nIntervalSecs, - NULL,NULL,kbd_dbms::CM_NULL,0,kbd_dbms::FM_NULL_METHOD,*vecResult)) + NULL,NULL,iot_dbms::CM_NULL,0,iot_dbms::FM_NULL_METHOD,*vecResult)) { LOGINFO("TrendCurve CHisDataManage::queryHistoryOriginalData: 查询超时!"); } @@ -172,7 +172,7 @@ void CHisDataManage::queryHistoryPolymericData(std::vector *vecMp double nIntervalSecs = SAMPLE_CYC_MIN * 60 * 1000; std::vector *> *vecResult = new std::vector *>(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { std::vector vecNotHaveStatus; @@ -206,7 +206,7 @@ void CHisDataManage::queryHistoryPolymericData(std::vector *vecMp void CHisDataManage::queryHistoryEvents(std::vector *vecMpKey, double lower, double upper, std::vector *> *vecResult, const QString &tag) { - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { diff --git a/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.h b/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.h index d8fe5858..3de350fd 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.h +++ b/product/src/gui/plugin/ISCSTrendCurves/CHisDataManage.h @@ -23,7 +23,7 @@ enum E_His_Type struct MeasurementPoint { - kbd_dbms::EnMeasPiontType type; //< 测点类型 + iot_dbms::EnMeasPiontType type; //< 测点类型 const QString strTagName; //< 测点TAG名 }; @@ -36,14 +36,14 @@ struct TsdbCommand lower = -1.; upper = -1.; nGroupByMinute = -1; - method = kbd_dbms::CM_NULL; + method = iot_dbms::CM_NULL; } E_His_Type type; - std::vector * pVecMpKey; + std::vector * pVecMpKey; double lower; double upper; int nGroupByMinute; - kbd_dbms::EnComputeMethod method; + iot_dbms::EnComputeMethod method; }; class CHisDataManage : public QObject @@ -56,48 +56,48 @@ public: bool isTsdbExuting(); signals: - void sigupdateHisOriginalData(std::vector *vecMpKey, - std::vector *> *vecResult, + void sigupdateHisOriginalData(std::vector *vecMpKey, + std::vector *> *vecResult, E_Data_Type type = E_HISTORY); - void sigHistoryPolymericData(std::vector *vecMpKey, - std::vector *> *vecResult, + void sigHistoryPolymericData(std::vector *vecMpKey, + std::vector *> *vecResult, int nGroupByMinute); - void sigHistoryEvent(std::vector *vecMpKey, - std::vector *> *vecResult, + void sigHistoryEvent(std::vector *vecMpKey, + std::vector *> *vecResult, const QString &tag); public slots: void release(); - void postTsdbCommandQueue(E_His_Type type, std::vector *vecMpKey, + void postTsdbCommandQueue(E_His_Type type, std::vector *vecMpKey, double lower, double upper, int nGroupByMinute = -1, - kbd_dbms::EnComputeMethod method = kbd_dbms::CM_NULL); + iot_dbms::EnComputeMethod method = iot_dbms::CM_NULL); - void queryHistoryOriginalData(std::vector *vecMpKey, + void queryHistoryOriginalData(std::vector *vecMpKey, double lower, double upper, E_Data_Type type = E_HISTORY); - void queryHistoryPolymericData(std::vector *vecMpKey, + void queryHistoryPolymericData(std::vector *vecMpKey, double lower, double upper, int nGroupByMinute, - kbd_dbms::EnComputeMethod method); + iot_dbms::EnComputeMethod method); - void queryHistoryEvents(std::vector *vecMpKey, + void queryHistoryEvents(std::vector *vecMpKey, double lower, double upper, - std::vector *> *vecResult, + std::vector *> *vecResult, const QString &tag); protected: - bool getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr); + bool getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr); void checkTsdbCommandQueue(); private: bool m_TsdbExcuting; bool m_bHasPendingCommand; - kbd_dbms::CTsdbConnPtr m_tsdbConnPtr; + iot_dbms::CTsdbConnPtr m_tsdbConnPtr; QList m_listCommand; QMutex m_mutex; diff --git a/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.cpp b/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.cpp index 17c67c04..e5edba9f 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.cpp @@ -5,7 +5,7 @@ CHisEventManage::CHisEventManage(QObject *parent) : QObject(parent), m_pReadDb(Q_NULLPTR) { - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_HIS_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_HIS_READ); m_pReadDb->open(); } diff --git a/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.h b/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.h index c585950e..0672a92a 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.h +++ b/product/src/gui/plugin/ISCSTrendCurves/CHisEventManage.h @@ -19,7 +19,7 @@ signals: void updateHisEvent(const QString &tag, const qint64 &time, QStringList contents); private: - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; }; #endif // CHISEVENTMANAGE_H diff --git a/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.cpp b/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.cpp index ab43378b..9d89e0a1 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.cpp @@ -9,7 +9,7 @@ #include "./widgets/CEditCollectWidget.h" #include "./widgets/CToolTip.h" -using namespace kbd_dbms; +using namespace iot_dbms; CPlotWidget::CPlotWidget(QWidget *parent) : QWidget(parent), @@ -31,9 +31,9 @@ CPlotWidget::CPlotWidget(QWidget *parent) : ui->setupUi(this); setContentsMargins(1, 1, 1, 1); qRegisterMetaType< E_Data_Type >("E_Data_Type"); - qRegisterMetaType< kbd_dbms::EnComputeMethod >("kbd_dbms::EnComputeMethod"); - qRegisterMetaType< std::vector >("std::vector"); - qRegisterMetaType< std::vector *> >("std::vector *>"); + qRegisterMetaType< iot_dbms::EnComputeMethod >("iot_dbms::EnComputeMethod"); + qRegisterMetaType< std::vector >("std::vector"); + qRegisterMetaType< std::vector *> >("std::vector *>"); } CPlotWidget::~CPlotWidget() @@ -194,7 +194,7 @@ void CPlotWidget::initialize() connect(m_pTimer, &QTimer::timeout, this, &CPlotWidget::realTimeElapsed); } - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); m_rtDataCollect = new CRealTimeDataCollect(this); connect(m_rtDataCollect, &CRealTimeDataCollect::finished, m_rtDataCollect, &CRealTimeDataCollect::deleteLater); connect(m_rtDataCollect, &CRealTimeDataCollect::realTimeTrendDataArrived, this, &CPlotWidget::recvRealTimeTrendData, Qt::QueuedConnection); @@ -1064,7 +1064,7 @@ void CPlotWidget::updateHistoryCurveRecord(double lower, double upper) } else { - emit sigQueryHistoryPolymericData(vecMpKey, lower, upper, currentGroupByMinute(), kbd_dbms::CM_FIRST); + emit sigQueryHistoryPolymericData(vecMpKey, lower, upper, currentGroupByMinute(), iot_dbms::CM_FIRST); } } else @@ -1075,7 +1075,7 @@ void CPlotWidget::updateHistoryCurveRecord(double lower, double upper) } else { - m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower, upper, currentGroupByMinute(), kbd_dbms::CM_FIRST); + m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower, upper, currentGroupByMinute(), iot_dbms::CM_FIRST); } } } @@ -1316,7 +1316,7 @@ void CPlotWidget::updateSelectGraph(const QString &graphName) ui->plot->replot(QCustomPlot::rpQueuedReplot); } -void CPlotWidget::updatePhaseTracer(std::vector *vecMpKey, std::vector *> *vecResult, const QString &tag) +void CPlotWidget::updatePhaseTracer(std::vector *vecMpKey, std::vector *> *vecResult, const QString &tag) { ui->plot->clearItems(); m_listTracer.clear(); @@ -1334,8 +1334,8 @@ void CPlotWidget::updatePhaseTracer(std::vector *vecMpK QMultiMap< double, QStringList > map; for(size_t tagIndex(0); tagIndex < vecResult->size(); tagIndex++) { - std::vector *evetVector = vecResult->at(tagIndex); - std::vector::iterator iter = evetVector->begin(); + std::vector *evetVector = vecResult->at(tagIndex); + std::vector::iterator iter = evetVector->begin(); for(; iter != evetVector->end(); iter++) { QStringList list; @@ -1386,7 +1386,7 @@ void CPlotWidget::updatePhaseTracer(std::vector *vecMpK //< 释放结果集 - std::vector *>::iterator res = vecResult->begin(); + std::vector *>::iterator res = vecResult->begin(); while(res != vecResult->end()) { delete (*res); diff --git a/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.h b/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.h index e5af78c2..041d1c08 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.h +++ b/product/src/gui/plugin/ISCSTrendCurves/CPlotWidget.h @@ -105,16 +105,16 @@ signals: void releaseHisDataThread(); void releaseHisEventThread(); - void sigQueryHistoryOriginalData(std::vector *vecMpKey, + void sigQueryHistoryOriginalData(std::vector *vecMpKey, double lower, double upper, E_Data_Type type = E_HISTORY); - void sigQueryHistoryPolymericData(std::vector *vecMpKey, - double lower, double upper, int nGroupByMinute, kbd_dbms::EnComputeMethod method); + void sigQueryHistoryPolymericData(std::vector *vecMpKey, + double lower, double upper, int nGroupByMinute, iot_dbms::EnComputeMethod method); - void sigQueryHistoryEvent(std::vector *vecMpKey, + void sigQueryHistoryEvent(std::vector *vecMpKey, double lower, double upper, - std::vector *> *vecResult, + std::vector *> *vecResult, const QString &tag); protected: @@ -137,22 +137,22 @@ private slots: void updateHistoryCurveRecord(double lower, double upper); - void updateHisOriginalData(std::vector *vecMpKey, - std::vector *> *vecResult, + void updateHisOriginalData(std::vector *vecMpKey, + std::vector *> *vecResult, E_Data_Type type = E_HISTORY); - void updateHisPolymericData(std::vector *vecMpKey, - std::vector *> *vecResult, + void updateHisPolymericData(std::vector *vecMpKey, + std::vector *> *vecResult, int nGroupByMinute); - void updateHistoryGraph(std::vector *vecMpKey, + void updateHistoryGraph(std::vector *vecMpKey, std::vector< QSharedPointer > &vecContainer, std::vector< QSharedPointer > &vecRange); void updateSelectGraph(const QString &graphName); - void updatePhaseTracer(std::vector *vecMpKey, - std::vector *> *vecResult, + void updatePhaseTracer(std::vector *vecMpKey, + std::vector *> *vecResult, const QString &tag); void updateGraphEvent(const QString &tag, const qint64 &time, QStringList contents); @@ -175,7 +175,7 @@ private slots: void slotDateTimeChanged(const QDateTime &dateTime); private: - kbd_dbms::EnMeasPiontType getMeasType(const QString &type); + iot_dbms::EnMeasPiontType getMeasType(const QString &type); E_Trend_Type getRangeType(const QCPRange &range); @@ -199,7 +199,7 @@ private: bool checkStatus(const _Tp &var, const int &nInvalid); template - bool checkStatus(const kbd_dbms::SVarHisSamplePoint &var, const int &nInvalid); + bool checkStatus(const iot_dbms::SVarHisSamplePoint &var, const int &nInvalid); private: Ui::CPlotWidget *ui; @@ -211,7 +211,7 @@ private: CTrendGraph * m_pTrendGraph; QCPItemText * m_trendTitle; double m_rtRange; - kbd_service::CDpcdaForApp * m_pDpcdaForApp; + iot_service::CDpcdaForApp * m_pDpcdaForApp; CRealTimeDataCollect * m_rtDataCollect; QSharedPointer m_ptrPlotTricker; QThread * m_pHisDataThread; diff --git a/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.cpp b/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.cpp index b8a90a08..b9ea6936 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.cpp @@ -5,9 +5,9 @@ #include "CTrendInfoManage.h" #include -using namespace kbd_net; -using namespace kbd_public; -using namespace kbd_idlfile; +using namespace iot_net; +using namespace iot_public; +using namespace iot_idl; CRealTimeDataCollect::CRealTimeDataCollect(QObject *parent) : QThread(parent) @@ -22,15 +22,15 @@ CRealTimeDataCollect::~CRealTimeDataCollect() void CRealTimeDataCollect::run() { - kbd_public::CSysInfoInterfacePtr sysInfo; - kbd_public::createSysInfoInstance(sysInfo); + iot_public::CSysInfoInterfacePtr sysInfo; + iot_public::createSysInfoInstance(sysInfo); // 初始化通讯器 CMbCommunicator * pCommunicator = new CMbCommunicator(); pCommunicator->addSub(0, CH_SCADA_TO_HMI_DATA_CHANGE); while(!isInterruptionRequested()) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; if (pCommunicator && pCommunicator->recvMsg(msg, 100) && !isInterruptionRequested()) { parseTrendDataMessage(msg); @@ -49,35 +49,35 @@ void CRealTimeDataCollect::parseTrendDataMessage(const CMbMessage &msg) int msgType = msg.getMsgType(); if(MT_DP_CHANGE_DATA == msgType) { - kbd_idlfile::SRealTimeDataPkg chgDataPkg; + iot_idl::SRealTimeDataPkg chgDataPkg; try { chgDataPkg.ParseFromArray(msg.getDataPtr(), (int)msg.getDataSize()); int aiSize = chgDataPkg.stairtd_size(); for(int i = 0;i < aiSize; i++) { - const kbd_idlfile::SAiRealTimeData &aiStru = chgDataPkg.stairtd(i); + const iot_idl::SAiRealTimeData &aiStru = chgDataPkg.stairtd(i); msgNotify(aiStru.strtagname(), aiStru.fvalue()); } int diSize = chgDataPkg.stdirtd_size(); for(int i = 0;i < diSize; i++) { - const kbd_idlfile::SDiRealTimeData &diStru = chgDataPkg.stdirtd(i); + const iot_idl::SDiRealTimeData &diStru = chgDataPkg.stdirtd(i); msgNotify(diStru.strtagname(), diStru.nvalue()); } int piSize = chgDataPkg.stpirtd_size(); for(int i = 0;i < piSize; i++) { - const kbd_idlfile::SPiRealTimeData &piStru = chgDataPkg.stpirtd(i); + const iot_idl::SPiRealTimeData &piStru = chgDataPkg.stpirtd(i); msgNotify(piStru.strtagname(), (qint64)piStru.dvalue()); } int miSize = chgDataPkg.stmirtd_size(); for(int i = 0;i < miSize; i++) { - const kbd_idlfile::SMiRealTimeData &miStru = chgDataPkg.stmirtd(i); + const iot_idl::SMiRealTimeData &miStru = chgDataPkg.stmirtd(i); msgNotify(miStru.strtagname(), miStru.nvalue()); } } diff --git a/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.h b/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.h index 6dd3f6cb..5b0bdf82 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.h +++ b/product/src/gui/plugin/ISCSTrendCurves/CRealTimeDataCollect.h @@ -37,7 +37,7 @@ private: * @brief parseTrendDataMessage 解析实时数据 * @param msg */ - void parseTrendDataMessage(const kbd_net::CMbMessage &msg); + void parseTrendDataMessage(const iot_net::CMbMessage &msg); void msgNotify(const std::string &strTagName, const QVariant &value); }; diff --git a/product/src/gui/plugin/ISCSTrendCurves/CTrendEditDialog.cpp b/product/src/gui/plugin/ISCSTrendCurves/CTrendEditDialog.cpp index 45802ba8..68b6bbac 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CTrendEditDialog.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CTrendEditDialog.cpp @@ -5,7 +5,7 @@ #include "GraphTool/Retriever/CRetriever.h" #include "pub_utility_api/FileUtil.h" -using namespace kbd_dbms; +using namespace iot_dbms; CTrendEditDialog::CTrendEditDialog(QWidget *parent) : QDialog(parent), diff --git a/product/src/gui/plugin/ISCSTrendCurves/CTrendFavTreeWidget.cpp b/product/src/gui/plugin/ISCSTrendCurves/CTrendFavTreeWidget.cpp index e182f771..bddc2fd4 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CTrendFavTreeWidget.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CTrendFavTreeWidget.cpp @@ -59,7 +59,7 @@ void CTrendFavTreeWidget::collectGraph(const QString &title, const CTrendGraph & void CTrendFavTreeWidget::contextMenuEvent(QContextMenuEvent *event) { // bool bIsEditable = false; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL) { return; @@ -354,7 +354,7 @@ void CTrendFavTreeWidget::loadTrendGraph(const QString &filePath) QString strFileName; if(filePath.isEmpty()) { - strFileName = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); + strFileName = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); } else { @@ -463,13 +463,13 @@ void CTrendFavTreeWidget::savaTrendGraph(const QString &filePath) } else { - QString strTrendDir = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model"); + QString strTrendDir = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model"); QDir dir; if(!dir.exists(strTrendDir)) { dir.mkdir(strTrendDir); } - QString strTrendFile = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); + QString strTrendFile = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); file.setFileName(strTrendFile); } diff --git a/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.cpp b/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.cpp index 65eb12f9..29d15acf 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.cpp @@ -3,7 +3,7 @@ #include "public/pub_sysinfo_api/SysInfoApi.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CTrendInfoManage *CTrendInfoManage::m_pInstance = NULL; @@ -26,7 +26,7 @@ CTrendInfoManage::CTrendInfoManage() } //< 实时库 - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_listTagInfo.reserve(5000); @@ -171,16 +171,16 @@ QString CTrendInfoManage::getSubSystemDesc(int id) bool CTrendInfoManage::checkTrendEditPerm() { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { LOGERROR("创建系统信息访问库实例失败!"); return false; } spSysInfo->getLocalNodeInfo(stNodeInfo); - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { if(0 == permMngPtr->PermDllInit()) @@ -221,7 +221,7 @@ void CTrendInfoManage::reloadData() void CTrendInfoManage::loadRTLocation() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -243,8 +243,8 @@ void CTrendInfoManage::loadRTLocation() id_value.second = "description"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back(id_value.first); columns.push_back(id_value.second); @@ -255,8 +255,8 @@ void CTrendInfoManage::loadRTLocation() m_locationInfo.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); @@ -283,8 +283,8 @@ void CTrendInfoManage::loadRTSubsystem() id_value.second = "description"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back(id_value.first); columns.push_back(id_value.second); @@ -294,8 +294,8 @@ void CTrendInfoManage::loadRTSubsystem() m_subSystemInfo.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_subSystemInfo[key.toInt()] = QString::fromStdString(value.toStdString()); diff --git a/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.h b/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.h index e05a3ecd..afdbbcef 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.h +++ b/product/src/gui/plugin/ISCSTrendCurves/CTrendInfoManage.h @@ -61,8 +61,8 @@ private: void loadStateDefine(); private: - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_subSystemInfo; QMap m_locationInfo; //< LocationID-LocationDesc QMap > m_devGroupInfo; //< LocationID- 新增设备组 diff --git a/product/src/gui/plugin/ISCSTrendCurves/CTrendWindow.cpp b/product/src/gui/plugin/ISCSTrendCurves/CTrendWindow.cpp index 48688c87..2a9aa572 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/CTrendWindow.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/CTrendWindow.cpp @@ -29,7 +29,7 @@ CTrendWindow::CTrendWindow(bool editMode, QVector ptrVec, QWidget *paren { Q_UNUSED(ptrVec) QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -39,7 +39,7 @@ CTrendWindow::CTrendWindow(bool editMode, QVector ptrVec, QWidget *paren qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("trendCurves.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("trendCurves.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/ISCSTrendCurves/main.cpp b/product/src/gui/plugin/ISCSTrendCurves/main.cpp index 789f8667..f3ccb082 100644 --- a/product/src/gui/plugin/ISCSTrendCurves/main.cpp +++ b/product/src/gui/plugin/ISCSTrendCurves/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { LOGINFO("===========================Trend Curve==========================="); @@ -37,10 +37,10 @@ int main(int argc, char *argv[]) app.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/InverseTimeLimit/inversetimelimit.cpp b/product/src/gui/plugin/InverseTimeLimit/inversetimelimit.cpp index e26f943c..26676d30 100644 --- a/product/src/gui/plugin/InverseTimeLimit/inversetimelimit.cpp +++ b/product/src/gui/plugin/InverseTimeLimit/inversetimelimit.cpp @@ -45,7 +45,7 @@ InverseTimeLimit::InverseTimeLimit(bool editMode, QWidget *parent) : #endif QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) diff --git a/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.cpp b/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.cpp index 0eaf3bfa..6ea23a56 100644 --- a/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.cpp +++ b/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.cpp @@ -5,7 +5,7 @@ CRdbAccessUtilty::CRdbAccessUtilty(int nDomainId,int nAppId) { - m_pNetRdbApi = new kbd_dbms::CRdbNetApi(); + m_pNetRdbApi = new iot_dbms::CRdbNetApi(); m_pNetRdbApi->connect(nDomainId,nAppId); @@ -84,7 +84,7 @@ int CRdbAccessUtilty::splitTagName(const std::string &inTag, std::string &outTyp bool CRdbAccessUtilty::queryPointTable(const std::string &pointtag, const std::string &pointType, CCamInfo &outCamInfo) { - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector vecKey,vecColumn; vecKey.push_back(pointtag); @@ -109,7 +109,7 @@ bool CRdbAccessUtilty::queryPointTable(const std::string &pointtag, const std::s bool CRdbAccessUtilty::queryCameraInfoTable(CCamInfo &outCamInfo) { - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector vecKey,vecColumn; vecKey.push_back(outCamInfo.camTag()); @@ -141,17 +141,17 @@ bool CRdbAccessUtilty::queryCameraInfoTable(CCamInfo &outCamInfo) bool CRdbAccessUtilty::queryPresetTable(CCamInfo &outCamInfo) { - using namespace kbd_dbms; - using namespace kbd_idlfile; + using namespace iot_dbms; + using namespace iot_idl; - kbd_idlfile::RdbQuery msgQuery; + iot_idl::RdbQuery msgQuery; msgQuery.set_strtablename("cctv_orientation"); msgQuery.add_strselectcolnamearr("tag_name"); msgQuery.add_strselectcolnamearr("description"); msgQuery.add_strselectcolnamearr("preset_token"); - kbd_idlfile::RdbCondition *pCondtion = msgQuery.add_msgcondition(); + iot_idl::RdbCondition *pCondtion = msgQuery.add_msgcondition(); pCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pCondtion->set_strcolumnname("camera_tag_name"); @@ -159,7 +159,7 @@ bool CRdbAccessUtilty::queryPresetTable(CCamInfo &outCamInfo) pCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pCondValue->set_strvalue(outCamInfo.camTag().c_str()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; bool bRet; bRet = m_pNetRdbApi->query(msgQuery, retMsg); diff --git a/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.h b/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.h index 14b261a5..1ece149d 100644 --- a/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.h +++ b/product/src/gui/plugin/IpcPlusWidget/CRdbAccessUtilty.h @@ -28,7 +28,7 @@ private: bool queryPresetTable(CCamInfo &outCamInfo); - kbd_dbms::CRdbNetApi *m_pNetRdbApi; //网络实时数据库接口指针 + iot_dbms::CRdbNetApi *m_pNetRdbApi; //网络实时数据库接口指针 }; #endif // CRDBACCESSUTILTY_H diff --git a/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.cpp b/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.cpp index 62c90db0..c1ce55d1 100644 --- a/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.cpp +++ b/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.cpp @@ -45,7 +45,7 @@ using namespace QtAV; -using namespace kbd_net; +using namespace iot_net; IpcPlusWidget::IpcPlusWidget(bool editMode, QWidget *parent) : QWidget(parent), m_player(Q_NULLPTR), @@ -60,7 +60,7 @@ IpcPlusWidget::IpcPlusWidget(bool editMode, QWidget *parent) : init(); setCapturePath(); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -70,7 +70,7 @@ IpcPlusWidget::IpcPlusWidget(bool editMode, QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("ipcPlus.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("ipcPlus.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.h b/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.h index 2d151b41..3b626d45 100644 --- a/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.h +++ b/product/src/gui/plugin/IpcPlusWidget/IpcPlusWidget.h @@ -121,7 +121,7 @@ private: std::string m_strNodeName; std::string m_strAppName; - kbd_net::CMbCommunicator m_com; + iot_net::CMbCommunicator m_com; //< 摄像头相关信息 QString m_pointTag; //< 摄像头关联点 diff --git a/product/src/gui/plugin/IpcPlusWidget/main.cpp b/product/src/gui/plugin/IpcPlusWidget/main.cpp index 176a0a6f..82e1b36f 100644 --- a/product/src/gui/plugin/IpcPlusWidget/main.cpp +++ b/product/src/gui/plugin/IpcPlusWidget/main.cpp @@ -5,8 +5,8 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.cpp b/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.cpp index 9591427e..cc05765f 100644 --- a/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.cpp +++ b/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.cpp @@ -11,7 +11,7 @@ CIpcViewerMsgBusMng::CIpcViewerMsgBusMng() bool CIpcViewerMsgBusMng::sendMsgToDomain(int nMessageType, int nChannel, const std::string &strMessage) { - using namespace kbd_net; + using namespace iot_net; bool bRet = false; CMbMessage objMsg; diff --git a/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.h b/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.h index f560dd68..b8ca99f6 100644 --- a/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.h +++ b/product/src/gui/plugin/IpcViewerWidget/cipcviewermsgbusmng.h @@ -14,7 +14,7 @@ public: void setNodeInfo(int nDomainId,int nAppid); private: - kbd_net::CMbCommunicator m_objCommon; + iot_net::CMbCommunicator m_objCommon; int m_nDomainid; int m_nAppid; }; diff --git a/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.cpp b/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.cpp index 7310e3a1..9edbb49f 100644 --- a/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.cpp +++ b/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.cpp @@ -5,7 +5,7 @@ CRdbAccessUtilty::CRdbAccessUtilty(int nDomainId,int nAppId) { - m_pNetRdbApi = new kbd_dbms::CRdbNetApi(); + m_pNetRdbApi = new iot_dbms::CRdbNetApi(); m_pNetRdbApi->connect(nDomainId,nAppId); @@ -84,7 +84,7 @@ int CRdbAccessUtilty::splitTagName(const std::string &inTag, std::string &outTyp bool CRdbAccessUtilty::queryPointTable(const std::string &pointtag, const std::string &pointType, CCamInfo &outCamInfo) { - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector vecKey,vecColumn; vecKey.push_back(pointtag); @@ -109,7 +109,7 @@ bool CRdbAccessUtilty::queryPointTable(const std::string &pointtag, const std::s bool CRdbAccessUtilty::queryCameraInfoTable(CCamInfo &outCamInfo) { - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; std::vector vecKey,vecColumn; vecKey.push_back(outCamInfo.camTag()); @@ -143,17 +143,17 @@ bool CRdbAccessUtilty::queryCameraInfoTable(CCamInfo &outCamInfo) bool CRdbAccessUtilty::queryPresetTable(CCamInfo &outCamInfo) { - using namespace kbd_dbms; - using namespace kbd_idlfile; + using namespace iot_dbms; + using namespace iot_idl; - kbd_idlfile::RdbQuery msgQuery; + iot_idl::RdbQuery msgQuery; msgQuery.set_strtablename("cctv_orientation"); msgQuery.add_strselectcolnamearr("tag_name"); msgQuery.add_strselectcolnamearr("description"); msgQuery.add_strselectcolnamearr("preset_token"); - kbd_idlfile::RdbCondition *pCondtion = msgQuery.add_msgcondition(); + iot_idl::RdbCondition *pCondtion = msgQuery.add_msgcondition(); pCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pCondtion->set_strcolumnname("camera_tag_name"); @@ -161,7 +161,7 @@ bool CRdbAccessUtilty::queryPresetTable(CCamInfo &outCamInfo) pCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pCondValue->set_strvalue(outCamInfo.camTag().c_str()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; bool bRet; bRet = m_pNetRdbApi->query(msgQuery, retMsg); diff --git a/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.h b/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.h index f15d95d6..18c67b57 100644 --- a/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.h +++ b/product/src/gui/plugin/IpcViewerWidget/crdbaccessutilty.h @@ -32,7 +32,7 @@ private: bool queryPresetTable(CCamInfo &outCamInfo); - kbd_dbms::CRdbNetApi *m_pNetRdbApi; //网络实时数据库接口指针 + iot_dbms::CRdbNetApi *m_pNetRdbApi; //网络实时数据库接口指针 }; #endif // CRDBACCESSUTILTY_H diff --git a/product/src/gui/plugin/IpcViewerWidget/ipcviewerwidget.cpp b/product/src/gui/plugin/IpcViewerWidget/ipcviewerwidget.cpp index c7920f92..4d93240d 100644 --- a/product/src/gui/plugin/IpcViewerWidget/ipcviewerwidget.cpp +++ b/product/src/gui/plugin/IpcViewerWidget/ipcviewerwidget.cpp @@ -225,7 +225,7 @@ void IpcViewerWidget::initUi() void IpcViewerWidget::initStylesheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -235,7 +235,7 @@ void IpcViewerWidget::initStylesheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("ipcViewer.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("ipcViewer.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/IpcViewerWidget/main.cpp b/product/src/gui/plugin/IpcViewerWidget/main.cpp index 37ff7037..80ad5671 100644 --- a/product/src/gui/plugin/IpcViewerWidget/main.cpp +++ b/product/src/gui/plugin/IpcViewerWidget/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -35,6 +35,6 @@ int main(int argc, char *argv[]) int result = a.exec(); //<释放消息总线 - kbd_net::releaseMsgBus(); + iot_net::releaseMsgBus(); return result; } diff --git a/product/src/gui/plugin/IpcWallWidget/VideoWall.cpp b/product/src/gui/plugin/IpcWallWidget/VideoWall.cpp index 11e0aa94..19366f99 100644 --- a/product/src/gui/plugin/IpcWallWidget/VideoWall.cpp +++ b/product/src/gui/plugin/IpcWallWidget/VideoWall.cpp @@ -48,7 +48,7 @@ using namespace QtAV; -using namespace kbd_net; +using namespace iot_net; const int kSyncInterval = 10000; @@ -806,7 +806,7 @@ void VideoWall::intiPtzUi() void VideoWall::loadPtzUiQss() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -816,7 +816,7 @@ void VideoWall::loadPtzUiQss() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("ipcPlus.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("ipcPlus.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/IpcWallWidget/VideoWall.h b/product/src/gui/plugin/IpcWallWidget/VideoWall.h index dfae132a..e8717a2a 100644 --- a/product/src/gui/plugin/IpcWallWidget/VideoWall.h +++ b/product/src/gui/plugin/IpcWallWidget/VideoWall.h @@ -143,7 +143,7 @@ private: int curNo; QPushButton *m_play,*m_pause; - kbd_net::CMbCommunicator m_com; + iot_net::CMbCommunicator m_com; QPushButton *m_cap; //抓图 diff --git a/product/src/gui/plugin/IpcWallWidget/main.cpp b/product/src/gui/plugin/IpcWallWidget/main.cpp index 0653bf04..11292b4d 100644 --- a/product/src/gui/plugin/IpcWallWidget/main.cpp +++ b/product/src/gui/plugin/IpcWallWidget/main.cpp @@ -44,9 +44,9 @@ void append(QVariantList &list1,QVariantList &list2,QVariantList &list3) int main(int argc, char *argv[]) { QGuiApplication::setAttribute(Qt::AA_UseDesktopOpenGL); - kbd_public::StartLogSystem("BASE","ipcwall"); + iot_public::StartLogSystem("BASE","ipcwall"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -82,8 +82,8 @@ int main(int argc, char *argv[]) result = a.exec(); } } - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); //<释放消息总线 - kbd_net::releaseMsgBus(); + iot_net::releaseMsgBus(); return 0; } diff --git a/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.cpp b/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.cpp index c09eee42..73fe34d6 100644 --- a/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.cpp +++ b/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.cpp @@ -10,7 +10,7 @@ #include #include -using namespace kbd_public; +using namespace iot_public; CLimitOptWidget::CLimitOptWidget(QWidget *parent, bool editModel) : QWidget(parent), @@ -73,7 +73,7 @@ void CLimitOptWidget::addPoints(const QStringList &tagList) vecColumnP.push_back("is_limit"); vecColumnP.push_back("location_id"); vecColumnP.push_back("region_id"); - kbd_idlfile::RdbRet objRetl; + iot_idl::RdbRet objRetl; if(false == m_objRdbNetApi.queryByKey("analog", vecKeyP, vecColumnP, objRetl)) { LOGINFO("限值设置添加测点:查询模拟量测点失败 [%s]", tagName.toStdString().c_str()); @@ -98,7 +98,7 @@ void CLimitOptWidget::addPoints(const QStringList &tagList) std::vector vecColumnD; vecColumnD.push_back("description"); vecColumnD.push_back("group_tag_name"); - kbd_idlfile::RdbRet objRetlD; + iot_idl::RdbRet objRetlD; if(false == m_objRdbNetApi.queryByKey("dev_info", vecKeyD, vecColumnD, objRetlD)) { LOGINFO("限值设置添加测点:查询设备信息失败 [%s]", tagName.toStdString().c_str()); @@ -127,7 +127,7 @@ void CLimitOptWidget::addPoints(const QStringList &tagList) vecColumnLimit.push_back("limit_low2"); vecColumnLimit.push_back("limit_up3"); vecColumnLimit.push_back("limit_low3"); - kbd_idlfile::RdbRet objRetLimit; + iot_idl::RdbRet objRetLimit; if(false == m_objRdbNetApi.queryByKey("analog_limit_info", vecKeyLimit, vecColumnLimit, objRetLimit)) { LOGINFO("限值设置添加测点:查询模拟量越限信息失败 [%s]", tagName.toStdString().c_str()); @@ -308,7 +308,7 @@ void CLimitOptWidget::slotCancelClicked() void CLimitOptWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -501,7 +501,7 @@ void CLimitOptWidget::initSysInfo() void CLimitOptWidget::initPermMng() { - kbd_service::CPermMngApiPtr ptrPermMng = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr ptrPermMng = iot_service::getPermMngInstance("base"); if(ptrPermMng == NULL || (PERM_NORMAL != ptrPermMng->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -539,7 +539,7 @@ void CLimitOptWidget::loadLocDomainMap() LOGERROR("限值设置加载厂站信息失败: [%s]", m_objRdbApi.getErrorMsg().c_str()); return; } - kbd_dbms::CRdbQueryResult oResult; + iot_dbms::CRdbQueryResult oResult; std::vector vecSelectColumn; vecSelectColumn.push_back("tag_name"); vecSelectColumn.push_back("domain_id"); @@ -554,8 +554,8 @@ void CLimitOptWidget::loadLocDomainMap() m_locDomainMap.clear(); for(int nIndex(0); nIndex < oResult.getRecordCount(); nIndex++) { - kbd_dbms::CVarType tag_name; - kbd_dbms::CVarType domain_id; + iot_dbms::CVarType tag_name; + iot_dbms::CVarType domain_id; oResult.getColumnValue(nIndex, 0, tag_name); oResult.getColumnValue(nIndex, 1, domain_id); m_locDomainMap.insert(QString::fromStdString(tag_name.toStdString()), domain_id.toInt()); @@ -588,11 +588,11 @@ QString CLimitOptWidget::getDevGroupDesc(const QString &devGroupTag) LOGERROR("限值设置查询dev_group失败: [%s]", m_objRdbApi.getErrorMsg().c_str()); return ""; } - kbd_dbms::CONDINFO oCondInfo; + iot_dbms::CONDINFO oCondInfo; oCondInfo.relationop = ATTRCOND_EQU; memcpy(oCondInfo.name, "tag_name", strlen("tag_name")); oCondInfo.conditionval = devGroupTag.toStdString(); - kbd_dbms::CRdbQueryResult oResult; + iot_dbms::CRdbQueryResult oResult; std::string sSelectColumn = "description"; if(false == m_objRdbApi.select(oCondInfo, oResult, sSelectColumn)) { @@ -604,7 +604,7 @@ QString CLimitOptWidget::getDevGroupDesc(const QString &devGroupTag) for(int nIndex(0); nIndex < oResult.getRecordCount(); nIndex++) { - kbd_dbms::CVarType description; + iot_dbms::CVarType description; oResult.getColumnValue(nIndex, 0, description); return QString::fromStdString(description.toStdString()); } diff --git a/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.h b/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.h index 00d055bf..8d901064 100644 --- a/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.h +++ b/product/src/gui/plugin/LimitOptWidget/CLimitOptWidget.h @@ -89,9 +89,9 @@ private: private: Ui::CLimitOptWidget *ui; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; - kbd_dbms::CRdbAccess m_objRdbApi; - kbd_dbms::CRdbNetApi m_objRdbNetApi; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_dbms::CRdbAccess m_objRdbApi; + iot_dbms::CRdbNetApi m_objRdbNetApi; CLimitOptWork *m_pLimitOptWork; QMap m_locDomainMap; std::vector m_vecPermRegionId; diff --git a/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.cpp b/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.cpp index fd131ee6..8fb7d5a6 100644 --- a/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.cpp +++ b/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.cpp @@ -5,9 +5,9 @@ #include "alarm_server_api/CAlmApiForApp.h" #include "public/pub_utility_api/TimeUtil.h" -using namespace kbd_public; -using namespace kbd_service; -using namespace kbd_dbms; +using namespace iot_public; +using namespace iot_service; +using namespace iot_dbms; CLimitOptWork::CLimitOptWork(QObject *parent) : QObject(parent), @@ -94,7 +94,7 @@ bool CLimitOptWork::initSysApi() m_pAlmApi = new CAlmApiForApp(stNodeInfo.nDomainId, stAppInfo.nId); m_pAlmApi->resumeThread(); LOGINFO("CAlmApiForApp domain: %d, app: %d", stNodeInfo.nDomainId, stAppInfo.nId); - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); return true; } @@ -137,7 +137,7 @@ bool CLimitOptWork::updateLimitPara(const QMap, QList, QList > >::const_iterator iter = limitPara.constBegin(); for(; iter != limitPara.constEnd(); iter++) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; msg.setMsgType(MT_OPT_AI_LIMIT_SET_DOWN); msg.setSubject(iter.key().second, CH_HMI_TO_OPT_OPTCMD_DOWN); @@ -200,13 +200,13 @@ bool CLimitOptWork::createReqHead(SOptReqHead &head, const int &nDomainId, const bool CLimitOptWork::sendAlarm(const QString &alarm, int isLimit) { - kbd_idlfile::SAppAddAlm stAppAddAlarm; - kbd_idlfile::SAlmInfoFromApp &stAlmInfoFromApp = *(stAppAddAlarm.add_alm_info()); + iot_idl::SAppAddAlm stAppAddAlarm; + iot_idl::SAlmInfoFromApp &stAlmInfoFromApp = *(stAppAddAlarm.add_alm_info()); stAlmInfoFromApp.set_alm_type(ALM_TYPE_OPERATE); stAlmInfoFromApp.set_time_stamp(getUTCTimeMsec()); stAlmInfoFromApp.set_status(ALM_STAT_OPT_MODEL_MODIFY); stAlmInfoFromApp.set_location_id(m_nLocationId); - stAlmInfoFromApp.set_alm_style(kbd_idlfile::enAlmStyle::AS_EVENT_ONLY); + stAlmInfoFromApp.set_alm_style(iot_idl::enAlmStyle::AS_EVENT_ONLY); stAlmInfoFromApp.set_region_id(-1); //< 责任区ID,HMI 系统操作责任区统一为-1,系统事件 std::string strAlias = ""; @@ -242,7 +242,7 @@ bool CLimitOptWork::sendAlarm(const QString &alarm, int isLimit) alarmDesc += tr("操作主机: "); alarmDesc += QString::fromStdString(m_strName); - kbd_idlfile::SAlmKeyword stAlmKeyword; + iot_idl::SAlmKeyword stAlmKeyword; stAlmKeyword.set_id(ALM_KEY_ALM_DESC); stAlmKeyword.set_value(alarmDesc.toStdString().c_str()); stAlmInfoFromApp.add_alm_keyword()->CopyFrom(stAlmKeyword); diff --git a/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.h b/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.h index 4c3b7a68..ac31e881 100644 --- a/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.h +++ b/product/src/gui/plugin/LimitOptWidget/CLimitOptWork.h @@ -40,10 +40,10 @@ private: bool sendAlarm(const QString &alarm, int isLimit); private: - kbd_net::CMbCommunicator *m_communicator; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; - kbd_service::CPermMngApiPtr m_ptrPermMng; - kbd_service::CAlmApiForApp *m_pAlmApi; + iot_net::CMbCommunicator *m_communicator; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_service::CPermMngApiPtr m_ptrPermMng; + iot_service::CAlmApiForApp *m_pAlmApi; bool m_isInit; int m_nDomainId; int m_nLocationId; diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.cpp index 5a168e1f..59b82f1c 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.cpp @@ -7,8 +7,8 @@ #include #include -using namespace kbd_dbms; -using namespace kbd_idlfile::linkage; +using namespace iot_dbms; +using namespace iot_idl::linkage; CLinkCtrlDataManage::CLinkCtrlDataManage(QObject *parent) : QObject(parent), @@ -49,9 +49,9 @@ CLinkCtrlDataManage::~CLinkCtrlDataManage() QList CLinkCtrlDataManage::queryLinkCtrlList() { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { spSysInfo->getLocalNodeInfo(stNodeInfo); } @@ -227,7 +227,7 @@ void CLinkCtrlDataManage::requestLinkOperation(const int &nDomainID, const QStri int nLevel = -1; int nLoginSec = -1; std::string strInstanceName = ""; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -252,9 +252,9 @@ void CLinkCtrlDataManage::requestLinkOperation(const int &nDomainID, const QStri head->set_source_tag("hmi"); head->set_msg_type((enLcsMsgType)E_LinkOperate_Message); - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { spSysInfo->getLocalNodeInfo(stNodeInfo); } @@ -324,7 +324,7 @@ void CLinkCtrlDataManage::requestLinkOperation(const int &nDomainID, const QStri } -bool CLinkCtrlDataManage::receiveLinkOperateAck(kbd_idlfile::linkage::LinkOperateMessageAck &msg) +bool CLinkCtrlDataManage::receiveLinkOperateAck(iot_idl::linkage::LinkOperateMessageAck &msg) { if (msg.has_execute_status()) { @@ -341,14 +341,14 @@ bool CLinkCtrlDataManage::receiveLinkOperateAck(kbd_idlfile::linkage::LinkOperat return true; } -bool CLinkCtrlDataManage::recvUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage &msg) +bool CLinkCtrlDataManage::recvUserInterveneRequest(iot_idl::linkage::UiRequestMessage &msg) { - kbd_idlfile::linkage::UiRequestMessage * requestMessage = new kbd_idlfile::linkage::UiRequestMessage(msg); + iot_idl::linkage::UiRequestMessage * requestMessage = new iot_idl::linkage::UiRequestMessage(msg); emit sigRecvLinkUserInterveneRequest(requestMessage); return true; } -void CLinkCtrlDataManage::replyUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessageAck &msg) +void CLinkCtrlDataManage::replyUserInterveneRequest(iot_idl::linkage::UiRequestMessageAck &msg) { try { @@ -361,7 +361,7 @@ void CLinkCtrlDataManage::replyUserInterveneRequest(kbd_idlfile::linkage::UiRequ } -bool CLinkCtrlDataManage::recvLinkStartRequest(kbd_idlfile::linkage::LinkStartRequestMessage &msg) +bool CLinkCtrlDataManage::recvLinkStartRequest(iot_idl::linkage::LinkStartRequestMessage &msg) { quint64 triggerTime = msg.trigger_time(); LinkNodeStatusParameter * linkNodeParameter = msg.mutable_nodelist(); @@ -371,7 +371,7 @@ bool CLinkCtrlDataManage::recvLinkStartRequest(kbd_idlfile::linkage::LinkStartRe return true; } -bool CLinkCtrlDataManage::recvLinkStateChange(kbd_idlfile::linkage::StatusChangeMessage &msg) +bool CLinkCtrlDataManage::recvLinkStateChange(iot_idl::linkage::StatusChangeMessage &msg) { try { diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.h index aa616932..cda77515 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlDataManage.h @@ -45,15 +45,15 @@ public: const QList &nodeList, const E_LINK_OPERATETYPE & type); - bool receiveLinkOperateAck(kbd_idlfile::linkage::LinkOperateMessageAck &msg); + bool receiveLinkOperateAck(iot_idl::linkage::LinkOperateMessageAck &msg); - bool recvUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage &msg); + bool recvUserInterveneRequest(iot_idl::linkage::UiRequestMessage &msg); - void replyUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessageAck &msg); + void replyUserInterveneRequest(iot_idl::linkage::UiRequestMessageAck &msg); - bool recvLinkStartRequest(kbd_idlfile::linkage::LinkStartRequestMessage &msg); + bool recvLinkStartRequest(iot_idl::linkage::LinkStartRequestMessage &msg); - bool recvLinkStateChange(kbd_idlfile::linkage::StatusChangeMessage &msg); + bool recvLinkStateChange(iot_idl::linkage::StatusChangeMessage &msg); signals: void sigRequestLinkOperationFail(const QString &strLinkName, const E_LINK_OPERATETYPE &type, const int &nErrorCode, const QString &strErrorCode); @@ -61,13 +61,13 @@ signals: void sigUpdateLinkAgeState(const QString &strLinkName, int state, quint64 triggerTime, quint64 timeFlag); void sigUpdateFunctionState(const QString &strLinkName, const QString &strFunctionName, const int &state); void sigUpdateActionState(const QString &strLinkName, const QString &strFunctionName, const QString &strActionName, const int &state); - void sigRecvLinkUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage *msg); + void sigRecvLinkUserInterveneRequest(iot_idl::linkage::UiRequestMessage *msg); private: QTimer * m_Timer; CLinkCtrlMessageHandle * m_linkCtrlMsgHandle; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbNetApi * m_rdbNetApi; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbNetApi * m_rdbNetApi; }; #endif // CLINKCTRLDATAMANAGE_H diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.cpp index 02af651d..5ab9983a 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.cpp @@ -12,25 +12,25 @@ CLinkCtrlMessageHandle::~CLinkCtrlMessageHandle() stop(); } -bool CLinkCtrlMessageHandle::handleLinkOperateResponse(kbd_idlfile::linkage::LinkOperateMessageAck &msg) +bool CLinkCtrlMessageHandle::handleLinkOperateResponse(iot_idl::linkage::LinkOperateMessageAck &msg) { qDebug() << "receiveLinkOperateAck "; return m_linkCtrlDataManage->receiveLinkOperateAck(msg); } -bool CLinkCtrlMessageHandle::handleUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage &msg) +bool CLinkCtrlMessageHandle::handleUserInterveneRequest(iot_idl::linkage::UiRequestMessage &msg) { qDebug() << "recvUserInterveneRequest "; return m_linkCtrlDataManage->recvUserInterveneRequest(msg); } -bool CLinkCtrlMessageHandle::handleLinkStartRequest(kbd_idlfile::linkage::LinkStartRequestMessage &msg) +bool CLinkCtrlMessageHandle::handleLinkStartRequest(iot_idl::linkage::LinkStartRequestMessage &msg) { qDebug() << "recvLinkStartRequest "; return m_linkCtrlDataManage->recvLinkStartRequest(msg); } -bool CLinkCtrlMessageHandle::handleLinkStateChange(kbd_idlfile::linkage::StatusChangeMessage &msg) +bool CLinkCtrlMessageHandle::handleLinkStateChange(iot_idl::linkage::StatusChangeMessage &msg) { return true; qDebug() << "recvLinkStateChange "; diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.h index 77767f9f..875b204e 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlMessageHandle.h @@ -5,30 +5,30 @@ class CLinkCtrlDataManage; -class CLinkCtrlMessageHandle : public kbd_application::CLinkageForHmiApi +class CLinkCtrlMessageHandle : public iot_app::CLinkageForHmiApi { public: CLinkCtrlMessageHandle(CLinkCtrlDataManage * linkCtrlDataManage); ~CLinkCtrlMessageHandle(); //1 hmi->server 发起的请求联动操作 - //bool linkOperateRequest(kbd_idlfile::LinkOperateMessage& msg); + //bool linkOperateRequest(iot_idl::LinkOperateMessage& msg); //2 server->hmi 请求联动操作的应答 - virtual bool handleLinkOperateResponse(kbd_idlfile::linkage::LinkOperateMessageAck& msg); + virtual bool handleLinkOperateResponse(iot_idl::linkage::LinkOperateMessageAck& msg); //1 server->hmi 发起的人工干预 请求 - virtual bool handleUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage& msg); + virtual bool handleUserInterveneRequest(iot_idl::linkage::UiRequestMessage& msg); //2 hmi ->server 人工干预应答 - //bool userInterveneResponse(kbd_idlfile::UiRequestMessageAck& msg); + //bool userInterveneResponse(iot_idl::UiRequestMessageAck& msg); //server->hmi 请求联动操作 应答 server 发起的 半自动请求开始 - virtual bool handleLinkStartRequest(kbd_idlfile::linkage::LinkStartRequestMessage& msg); + virtual bool handleLinkStartRequest(iot_idl::linkage::LinkStartRequestMessage& msg); //server->hmi 联动状态更新 - virtual bool handleLinkStateChange(kbd_idlfile::linkage::StatusChangeMessage& msg); + virtual bool handleLinkStateChange(iot_idl::linkage::StatusChangeMessage& msg); private: CLinkCtrlDataManage * m_linkCtrlDataManage; diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.cpp index 78191803..a5bf7493 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.cpp @@ -6,8 +6,8 @@ #include #include -using namespace kbd_dbms; -using namespace kbd_idlfile; +using namespace iot_dbms; +using namespace iot_idl; CLinkCtrlStateManage::CLinkCtrlStateManage(QObject *parent) : QObject(parent) @@ -61,7 +61,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() } while(m_rdbNetApi->checkStatus()) { - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_rdbNetApi->getRet(&retMsg)) { if(retMsg.msgrecord_size() != 0) @@ -110,12 +110,12 @@ void CLinkCtrlStateManage::updateLinkAgeState() bool bValid = false; if ( m_nDomainID <= 0 || m_nAppID <= 0 ) { - kbd_public::CSysInfoInterfacePtr spSysInfo; - if ( kbd_public::createSysInfoInstance( spSysInfo )) + iot_public::CSysInfoInterfacePtr spSysInfo; + if ( iot_public::createSysInfoInstance( spSysInfo )) { - kbd_public::SNodeInfo nodeInfo; + iot_public::SNodeInfo nodeInfo; spSysInfo->getLocalNodeInfo( nodeInfo ); - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo ); m_nDomainID = nodeInfo.nDomainId; @@ -135,7 +135,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() m_rdbNetApi->connect(m_nDomainID, m_nAppID); foreach (S_LINKCTRL_INFO linkage, m_linkAgeList) { - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("linkage_running"); std::string *pStatusColName = query.add_strselectcolnamearr(); *pStatusColName = "status"; @@ -152,7 +152,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() std::string *pActionNameColName = query.add_strselectcolnamearr(); *pActionNameColName = "action_name"; - kbd_idlfile::RdbCondition *pLinkAgeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkAgeCondtion = query.add_msgcondition(); pLinkAgeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkAgeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkAgeCondtion->set_strcolumnname("linkage_name"); @@ -162,7 +162,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() if(E_Node_LinkCtrl == linkage.nodeType) { - kbd_idlfile::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); pLinkNodeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNodeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNodeCondtion->set_strcolumnname("node_type"); @@ -170,7 +170,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pLinkNodeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pLinkNodeCondValue->set_nvalue((int)E_Node_LinkCtrl); -// kbd_idlfile::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); +// iot_idl::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); // pLinkTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); // pLinkTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); // pLinkTypeCondtion->set_strcolumnname("link_type"); @@ -178,12 +178,12 @@ void CLinkCtrlStateManage::updateLinkAgeState() // pLinkTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); // pLinkTypeCondValue->set_nvalue((int)E_Node_Function); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_rdbNetApi->query(query, retMsg, true); } else if(E_Node_Function == linkage.nodeType) { - kbd_idlfile::RdbCondition *pFuncCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pFuncCondtion = query.add_msgcondition(); pFuncCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pFuncCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pFuncCondtion->set_strcolumnname("func_name"); @@ -191,7 +191,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pFuncCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pFuncCondValue->set_strvalue(linkage.funcName.toStdString()); - kbd_idlfile::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); pLinkNodeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNodeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNodeCondtion->set_strcolumnname("node_type"); @@ -199,7 +199,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pLinkNodeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pLinkNodeCondValue->set_nvalue((int)E_Node_Function); -// kbd_idlfile::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); +// iot_idl::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); // pLinkTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); // pLinkTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); // pLinkTypeCondtion->set_strcolumnname("link_type"); @@ -207,12 +207,12 @@ void CLinkCtrlStateManage::updateLinkAgeState() // pLinkTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); // pLinkTypeCondValue->set_nvalue((int)E_Node_LinkCtrl); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_rdbNetApi->query(query, retMsg, true); } else if(E_Node_Action == linkage.nodeType) { - kbd_idlfile::RdbCondition *pFuncCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pFuncCondtion = query.add_msgcondition(); pFuncCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pFuncCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pFuncCondtion->set_strcolumnname("func_name"); @@ -220,7 +220,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pFuncCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pFuncCondValue->set_strvalue(linkage.funcName.toStdString()); - kbd_idlfile::RdbCondition *pActionCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pActionCondtion = query.add_msgcondition(); pActionCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pActionCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pActionCondtion->set_strcolumnname("action_name"); @@ -228,7 +228,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pActionCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pActionCondValue->set_strvalue(linkage.actionName.toStdString()); - kbd_idlfile::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNodeCondtion = query.add_msgcondition(); pLinkNodeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNodeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNodeCondtion->set_strcolumnname("node_type"); @@ -236,7 +236,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() pLinkNodeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pLinkNodeCondValue->set_nvalue((int)E_Node_Action); -// kbd_idlfile::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); +// iot_idl::RdbCondition *pLinkTypeCondtion = query.add_msgcondition(); // pLinkTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); // pLinkTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); // pLinkTypeCondtion->set_strcolumnname("link_type"); @@ -244,7 +244,7 @@ void CLinkCtrlStateManage::updateLinkAgeState() // pLinkTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); // pLinkTypeCondValue->set_nvalue((int)E_Node_LinkCtrl); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_rdbNetApi->query(query, retMsg, true); } } diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.h index 6429cc8a..dd87dd03 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlStateManage.h @@ -32,7 +32,7 @@ private: int m_nDomainID{-1}; int m_nAppID{-1}; QTimer * m_Timer{nullptr}; - kbd_dbms::CRdbNetApi * m_rdbNetApi{nullptr}; + iot_dbms::CRdbNetApi * m_rdbNetApi{nullptr}; QMutex mutex; QList m_linkAgeList; diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.cpp index c6015d4e..363bf116 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.cpp @@ -25,9 +25,9 @@ #include -using namespace kbd_public; -using namespace kbd_dbms; -using namespace kbd_idlfile::linkage; +using namespace iot_public; +using namespace iot_dbms; +using namespace iot_idl::linkage; using boost::property_tree::ptree; using namespace std; @@ -49,11 +49,11 @@ CLinkCtrlWidget::CLinkCtrlWidget(QWidget *parent, bool editMode) : { qRegisterMetaType("E_LINK_OPERATETYPE"); qRegisterMetaType >("LISTLINKCTRL"); - qRegisterMetaType("kbd_idlfile::linkage::UiRequestMessage"); + qRegisterMetaType("iot_idl::linkage::UiRequestMessage"); initialize(); } QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -63,7 +63,7 @@ CLinkCtrlWidget::CLinkCtrlWidget(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("linkCtrl.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("linkCtrl.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -236,7 +236,7 @@ void CLinkCtrlWidget::logout() bool CLinkCtrlWidget::getLinkCtrlPerm() { //<权限处理 - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -268,9 +268,9 @@ void CLinkCtrlWidget::slotExecution() index = index.sibling(index.row(), 0); QString strLinkAgeName = m_pLinkCtrlTableModel->value(index).toString(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - kbd_public::SLocationInfo stLocationInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + iot_public::SLocationInfo stLocationInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { foreach (S_LINKCTRL_INFO info, m_linkCtrlList) { @@ -311,9 +311,9 @@ void CLinkCtrlWidget::slotSingleStep() index = index.sibling(index.row(), 0); QString strLinkAgeName = m_pLinkCtrlTableModel->value(index).toString(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - kbd_public::SLocationInfo stLocationInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + iot_public::SLocationInfo stLocationInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { foreach(S_LINKCTRL_INFO info, m_linkCtrlList) { @@ -355,9 +355,9 @@ void CLinkCtrlWidget::slotPause() index = index.sibling(index.row(), 0); QString strLinkAgeName = m_pLinkCtrlTableModel->value(index).toString(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - kbd_public::SLocationInfo stLocationInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + iot_public::SLocationInfo stLocationInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { foreach(S_LINKCTRL_INFO info, m_linkCtrlList) { @@ -394,9 +394,9 @@ void CLinkCtrlWidget::slotTermination() index = index.sibling(index.row(), 0); QString strLinkAgeName = m_pLinkCtrlTableModel->value(index).toString(); - kbd_public::CSysInfoInterfacePtr spSysInfo; - kbd_public::SLocationInfo stLocationInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + iot_public::SLocationInfo stLocationInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { foreach(S_LINKCTRL_INFO info, m_linkCtrlList) { @@ -642,7 +642,7 @@ void CLinkCtrlWidget::handleUserInterveneRequest(UiRequestMessage &msg) } - kbd_idlfile::linkage::UiRequestMessageAck msgAck; + iot_idl::linkage::UiRequestMessageAck msgAck; if(!buildUserInterveneReplyMsg(msg, type, msgAck)) { return; @@ -845,11 +845,11 @@ void CLinkCtrlWidget::updateUiButtonState(const E_LCS_STATUS type) } } -bool CLinkCtrlWidget::buildUserInterveneReplyMsg(const kbd_idlfile::linkage::UiRequestMessage &sourceMsg, const E_UIOPERATE_TYPE &type, UiRequestMessageAck &msgAck) +bool CLinkCtrlWidget::buildUserInterveneReplyMsg(const iot_idl::linkage::UiRequestMessage &sourceMsg, const E_UIOPERATE_TYPE &type, UiRequestMessageAck &msgAck) { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { spSysInfo->getLocalNodeInfo(stNodeInfo); } @@ -865,7 +865,7 @@ bool CLinkCtrlWidget::buildUserInterveneReplyMsg(const kbd_idlfile::linkage::UiR int nLevel = -1; int nLoginSec = -1; std::string strInstanceName = ""; - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); @@ -998,7 +998,7 @@ int CLinkCtrlWidget::readLinkTypeDescXml() std::string linkTypeStr; //< 读取LINKAGE_SETTING配置文件,获取联动类型 - std::string path = kbd_public::CFileUtil::getPathOfResFile("model_studio/setting/table/LINKAGE_SETTING.xml"); + std::string path = iot_public::CFileUtil::getPathOfResFile("model_studio/setting/table/LINKAGE_SETTING.xml"); if(readXml(path,linkTypeStr)==kbdFailed) { LOGERROR("readLinkTypeDescXml load [zh] LINKAGE_SETTING.xml error"); diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.h index 8a26c7b7..1f6463a9 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkCtrlWidget.h @@ -56,7 +56,7 @@ protected slots: void slotLinkCtrlCheckStateChanged(const QString functionName, const QString actionName, const int checkedState); void slotRequestLinkOperationFail(const QString &strLinkDescription, const E_LINK_OPERATETYPE &type, const int &nErrorCode, const QString &strErrorCode); - void slotRecvLinkUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage *msg); + void slotRecvLinkUserInterveneRequest(iot_idl::linkage::UiRequestMessage *msg); void slotLinkAgeStart(const QString &strLinkName, const int &state, const quint64 &triggerTime); //< triggerTime 为0不刷新此值 @@ -73,8 +73,8 @@ private slots: private: bool getLinkCtrlPerm(); void updateUiButtonState(const E_LCS_STATUS type); - void handleUserInterveneRequest(kbd_idlfile::linkage::UiRequestMessage &msg); - bool buildUserInterveneReplyMsg(const kbd_idlfile::linkage::UiRequestMessage &sourceMsg, const E_UIOPERATE_TYPE &type, kbd_idlfile::linkage::UiRequestMessageAck &msgAck); + void handleUserInterveneRequest(iot_idl::linkage::UiRequestMessage &msg); + bool buildUserInterveneReplyMsg(const iot_idl::linkage::UiRequestMessage &sourceMsg, const E_UIOPERATE_TYPE &type, iot_idl::linkage::UiRequestMessageAck &msgAck); void loadLinkReport(); void updateHistoryActionData(); int readLinkTypeDescXml(); @@ -103,6 +103,6 @@ private: Q_DECLARE_METATYPE(E_LINK_OPERATETYPE) Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(kbd_idlfile::linkage::UiRequestMessage) +Q_DECLARE_METATYPE(iot_idl::linkage::UiRequestMessage) #endif // CLINKCTRLWIDGET_H diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.cpp index 6d4fb6fd..3eb8490f 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.cpp @@ -3,8 +3,8 @@ #include "../../idl_files/LinkageMessage.pb.h" #include "../../idl_files/RdbServerMessage.pb.h" -using namespace kbd_dbms; -using namespace kbd_idlfile; +using namespace iot_dbms; +using namespace iot_idl; CLinkDBInterface::CLinkDBInterface() : m_timer(NULL) @@ -56,8 +56,8 @@ QString CLinkDBInterface::queryLocationName(const int nLocationID) std::string strTableName = "sys_model_location_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("description"); @@ -93,8 +93,8 @@ QString CLinkDBInterface::queryUserName(const int nUserID) std::string strTableName = "rm_user_def"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_name"); @@ -128,8 +128,8 @@ QStringList CLinkDBInterface::queryAllLocationName() std::string strTableName = "sys_model_location_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("description"); std::string sOrderColumn = "location_no"; @@ -156,8 +156,8 @@ QMap CLinkDBInterface::queryUserIDMap() std::string strTableName = "rm_user_def"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_id"); columns.push_back("perm_alias"); @@ -237,7 +237,7 @@ QString CLinkDBInterface::queryStateName(const QString &strStateTextName, const std::string strTableName = "dict_state_text_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); std::vector vecCondInfo; CONDINFO conditionName; @@ -255,7 +255,7 @@ QString CLinkDBInterface::queryStateName(const QString &strStateTextName, const vecCondInfo.push_back(conditionState); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("display_value"); @@ -279,13 +279,13 @@ QString CLinkDBInterface::queryStateName(const QString &strStateTextName, const QList CLinkDBInterface::queryRunLinkNodeList() { QList LinkList; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { return LinkList; } - kbd_public::SNodeInfo stNodeInfo; + iot_public::SNodeInfo stNodeInfo; spSysInfo->getLocalNodeInfo(stNodeInfo); bool res = m_dbInterface->open(); if(res) @@ -500,27 +500,27 @@ void CLinkDBInterface::updataLinkState(QList &listLink) { //query state QMutexLocker locker(&mutex); - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo); for(int nIndex(0); nIndex < listLink.size(); nIndex++) { if(E_Node_Link == listLink.at(nIndex).nodeType) { - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(listLink.at(nIndex).locationID, stLocationInfo); m_rdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); try { - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("Link_running"); std::string *pStatusColName = query.add_strselectcolnamearr(); *pStatusColName = "status"; - kbd_idlfile::RdbCondition *pLinkNodeTypeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNodeTypeCondtion = query.add_msgcondition(); pLinkNodeTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNodeTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNodeTypeCondtion->set_strcolumnname("node_type"); @@ -529,7 +529,7 @@ void CLinkDBInterface::updataLinkState(QList &listLink) pSeqNodeTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pSeqNodeTypeCondValue->set_nvalue((int)E_Node_Link); - kbd_idlfile::RdbCondition *pLinkNameCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNameCondtion = query.add_msgcondition(); pLinkNameCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNameCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNameCondtion->set_strcolumnname("seq_name"); @@ -538,7 +538,7 @@ void CLinkDBInterface::updataLinkState(QList &listLink) pSeqNameCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pSeqNameCondValue->set_strvalue(listLink.at(nIndex).seqName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_rdbNetApi->query(query, retMsg)) { if(retMsg.msgrecord_size() != 0) @@ -568,7 +568,7 @@ void CLinkDBInterface::updataLinkExecuteState() while(m_rdbNetApi->checkStatus()) { - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_rdbNetApi->getRet(&retMsg)) { if(retMsg.msgrecord_size() != 0) @@ -580,8 +580,8 @@ void CLinkDBInterface::updataLinkExecuteState() } } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { for(int nIndex(0); nIndex < m_listLink.size(); nIndex++) { @@ -592,13 +592,13 @@ void CLinkDBInterface::updataLinkExecuteState() continue; } - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(m_listLink.at(nIndex).locationID, stLocationInfo); - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo); m_rdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("Link_running"); std::string *pSeqColName = query.add_strselectcolnamearr(); @@ -607,7 +607,7 @@ void CLinkDBInterface::updataLinkExecuteState() std::string *pStatusColName = query.add_strselectcolnamearr(); *pStatusColName = "status"; - kbd_idlfile::RdbCondition *pLinkNodeTypeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNodeTypeCondtion = query.add_msgcondition(); pLinkNodeTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNodeTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNodeTypeCondtion->set_strcolumnname("node_type"); @@ -616,7 +616,7 @@ void CLinkDBInterface::updataLinkExecuteState() pSeqNodeTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pSeqNodeTypeCondValue->set_nvalue((int)E_Node_Link); - kbd_idlfile::RdbCondition *pLinkNameCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pLinkNameCondtion = query.add_msgcondition(); pLinkNameCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pLinkNameCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pLinkNameCondtion->set_strcolumnname("seq_name"); @@ -625,7 +625,7 @@ void CLinkDBInterface::updataLinkExecuteState() pSeqNameCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pSeqNameCondValue->set_strvalue(m_listLink.at(nIndex).seqName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_rdbNetApi->query(query, retMsg, true); } } diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.h index 2ebcc155..d47d7033 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkDBInterface.h @@ -64,9 +64,9 @@ private: QMutex linkmutex; QTimer * m_timer; //QList m_listLink; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccessEx * m_rtdbAccessEx; - kbd_dbms::CRdbNetApi * m_rdbNetApi; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccessEx * m_rtdbAccessEx; + iot_dbms::CRdbNetApi * m_rdbNetApi; }; #endif // CLINKDBINTERFACE_H diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApi.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApi.cpp index 30edf3ca..8c0a7ac7 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApi.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApi.cpp @@ -1,7 +1,7 @@ #include "application/linkage_server_api/CLinkageForHmiApi.h" #include "CLinkageForHmiApiImpl.h" -using namespace kbd_application; +using namespace iot_app; CLinkageForHmiApi::CLinkageForHmiApi(int appid) { diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.cpp b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.cpp index df8d1e35..1fb4ddcb 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.cpp @@ -4,10 +4,10 @@ #include "CLinkageForHmiApiImpl.h" -using namespace kbd_application; -using namespace kbd_idlfile::linkage; +using namespace iot_app; +using namespace iot_idl::linkage; -kbd_application::CLinkageForHmiApiImpl::CLinkageForHmiApiImpl( +iot_app::CLinkageForHmiApiImpl::CLinkageForHmiApiImpl( int appid, CLinkageForHmiApi* api) : CTimerThreadBase("CLinkageForHmiApiImpl thread", 100), @@ -56,7 +56,7 @@ void CLinkageForHmiApiImpl::afterSuspend() } void CLinkageForHmiApiImpl::execute() { - using namespace kbd_idlfile; + using namespace iot_idl; if (!m_objRecvLinkCMb.recvMsg(m_objRecvMsg)) { return; @@ -66,10 +66,10 @@ void CLinkageForHmiApiImpl::execute() } bool CLinkageForHmiApiImpl::recvMsgLink( - kbd_net::CMbMessage& msg) + iot_net::CMbMessage& msg) { try { - using namespace kbd_idlfile; + using namespace iot_idl; if (msg.getMsgType() != MT_LINKAGE_CTRL_HMI_UP) { @@ -143,7 +143,7 @@ bool CLinkageForHmiApiImpl::recvMsgLink( return false; } -bool CLinkageForHmiApiImpl::sendToLink(kbd_net::CMbMessage& msg, int domain) +bool CLinkageForHmiApiImpl::sendToLink(iot_net::CMbMessage& msg, int domain) { LOGINFO("sendMsgToDomain domain[%d] appid[%d] msgType[%d] Subject[%d]", domain, @@ -160,7 +160,7 @@ bool CLinkageForHmiApiImpl::linkOperateRequest( LinkOperateMessage& msg) { int domain = msg.pkg_head().target_domain(); - kbd_net::CMbMessage objMessage; + iot_net::CMbMessage objMessage; objMessage.setPara1(enumLinkOperateMessage); objMessage.setData(msg.SerializeAsString()); return sendToLink(objMessage, domain); @@ -170,7 +170,7 @@ bool CLinkageForHmiApiImpl::userInterveneResponse( UiRequestMessageAck& msg) { int domain = msg.pkg_head().target_domain(); - kbd_net::CMbMessage objMessage; + iot_net::CMbMessage objMessage; objMessage.setPara1(enumUiRequestMessageAck); objMessage.setData(msg.SerializeAsString()); return sendToLink(objMessage, domain); diff --git a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.h b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.h index 16f08937..e1b2f567 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.h +++ b/product/src/gui/plugin/LinkCtrlWidget/CLinkageForHmiApiImpl.h @@ -6,11 +6,11 @@ #include "net/net_msg_bus_api/CMbCommunicator.h" #include "application/linkage_server_api/CLinkageForHmiApi.h" -namespace kbd_application { - using namespace kbd_idlfile::linkage; +namespace iot_app { + using namespace iot_idl::linkage; class CLinkageForHmiApiImpl - : public kbd_public::CTimerThreadBase + : public iot_public::CTimerThreadBase { public: CLinkageForHmiApiImpl(int appid, CLinkageForHmiApi* api); @@ -47,15 +47,15 @@ namespace kbd_application { bool handleLinkStateChange( StatusChangeMessage& msg); - bool sendToLink(kbd_net::CMbMessage& msg, int domain); + bool sendToLink(iot_net::CMbMessage& msg, int domain); - bool recvMsgLink(kbd_net::CMbMessage& msg); + bool recvMsgLink(iot_net::CMbMessage& msg); private: CLinkageForHmiApi* m_ptrInterface; - kbd_net::CMbMessage m_objRecvMsg; + iot_net::CMbMessage m_objRecvMsg; - kbd_net::CMbCommunicator m_objSendLinkCMb;//发送 linkage - kbd_net::CMbCommunicator m_objRecvLinkCMb;//接收 linkage + iot_net::CMbCommunicator m_objSendLinkCMb;//发送 linkage + iot_net::CMbCommunicator m_objRecvLinkCMb;//接收 linkage const int m_nServerAppId; }; diff --git a/product/src/gui/plugin/LinkCtrlWidget/main.cpp b/product/src/gui/plugin/LinkCtrlWidget/main.cpp index 5f3d2681..408b78d9 100644 --- a/product/src/gui/plugin/LinkCtrlWidget/main.cpp +++ b/product/src/gui/plugin/LinkCtrlWidget/main.cpp @@ -10,8 +10,8 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); - kbd_public::StartLogSystem(NULL, "HMI", "LinkCtrl"); - kbd_net::initMsgBus("Alarm_Client", "1", true); + iot_public::StartLogSystem(NULL, "HMI", "LinkCtrl"); + iot_net::initMsgBus("Alarm_Client", "1", true); { CLinkCtrlWidget w; @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) } - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/MediaWidget/CMediaWidget.cpp b/product/src/gui/plugin/MediaWidget/CMediaWidget.cpp index 39d486c3..f5276f31 100644 --- a/product/src/gui/plugin/MediaWidget/CMediaWidget.cpp +++ b/product/src/gui/plugin/MediaWidget/CMediaWidget.cpp @@ -36,7 +36,7 @@ CMediaWidget::CMediaWidget(bool editMode,QWidget *parent) : connect(ui->label,&Label::ccdPlay,this,&CMediaWidget::slotCCDPlay,Qt::QueuedConnection); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -46,7 +46,7 @@ CMediaWidget::CMediaWidget(bool editMode,QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("media.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("media.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/MediaWidget/main.cpp b/product/src/gui/plugin/MediaWidget/main.cpp index ec22499e..e85a55d6 100644 --- a/product/src/gui/plugin/MediaWidget/main.cpp +++ b/product/src/gui/plugin/MediaWidget/main.cpp @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("", "hmi"); + iot_public::StartLogSystem("", "hmi"); { CMediaWidget w(false,NULL); @@ -19,6 +19,6 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_public::StopLogSystem(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/NavigationWidget/CNavigationConfigDialog.cpp b/product/src/gui/plugin/NavigationWidget/CNavigationConfigDialog.cpp index ce05f99e..c0b2d9ee 100644 --- a/product/src/gui/plugin/NavigationWidget/CNavigationConfigDialog.cpp +++ b/product/src/gui/plugin/NavigationWidget/CNavigationConfigDialog.cpp @@ -219,7 +219,7 @@ void CNavigationConfigDialog::updateItemIconPath() QTreeWidgetItem * item = ui->navigationWidget->currentItem(); if(item) { - std::string defaultPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string defaultPath = iot_public::CFileUtil::getCurModuleDir(); QString strIconFilePath = QString::fromStdString(defaultPath) + QString("..%1..%1data%1back_pixmap%1").arg(QDir::separator()); QString strFileName = QFileDialog::getOpenFileName(this, tr("打开"), strIconFilePath, "*.jpg; *.png"); if(strFileName.isEmpty()) @@ -247,7 +247,7 @@ void CNavigationConfigDialog::updateItemDataPath() QTreeWidgetItem * item = ui->navigationWidget->currentItem(); if(item) { - QString strGraphFilePath = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()); + QString strGraphFilePath = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()); QString filter = ""; if(ui->itemOptTypeComb->currentData().toInt() == CNavigationWidget::SWITCH_GRAPH) { diff --git a/product/src/gui/plugin/NavigationWidget/CNavigationWidget.cpp b/product/src/gui/plugin/NavigationWidget/CNavigationWidget.cpp index 7eb50151..e0ef0455 100644 --- a/product/src/gui/plugin/NavigationWidget/CNavigationWidget.cpp +++ b/product/src/gui/plugin/NavigationWidget/CNavigationWidget.cpp @@ -58,7 +58,7 @@ void CNavigationWidget::initialize() connect(this, &CNavigationWidget::currentItemChanged, this, &CNavigationWidget::itemSelectedChanged); connect(this, &CNavigationWidget::itemClicked, this, &CNavigationWidget::itemSelected); - std::string currentPath = kbd_public::CFileUtil::getCurModuleDir(); + std::string currentPath = iot_public::CFileUtil::getCurModuleDir(); m_strFileHomePath = QString::fromStdString(currentPath) + QString("..%1..%1data%1").arg(QDir::separator()); m_mapEnable.insert(Enable, tr("是")); m_mapEnable.insert(Disable, tr("否")); @@ -389,7 +389,7 @@ int CNavigationWidget::slotImport() QXlsx::CellRange cellRange = xlsx.currentWorksheet()->dimension(); QDir iconDir(m_strFileHomePath + "back_pixmap" + QDir::separator()); QDir dataDir(m_strFileHomePath + "pic" + QDir::separator()); - QDir exeDir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir exeDir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); QMultiMap numberMap; int nItemNumber = 0; for(int row=cellRange.firstRow()+1; row<=cellRange.lastRow(); row++) @@ -468,7 +468,7 @@ void CNavigationWidget::slotExport() QDir iconDir(m_strFileHomePath + "back_pixmap" + QDir::separator()); QDir dataDir(m_strFileHomePath + "pic" + QDir::separator()); - QDir exeDir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir exeDir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); int row = 2; for (int nIndex(0); nIndex < topLevelItemCount(); ++nIndex) { @@ -868,7 +868,7 @@ void CNavigationWidget::read(const QString &strFileName) { QDir iconDir(m_strFileHomePath + "back_pixmap" + QDir::separator()); QDir dataDir(m_strFileHomePath + "pic" + QDir::separator()); - QDir exeDir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir exeDir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); QJsonArray itemArray = root.value("items").toArray(); int nItemNumber = 0; for(int nIndex(0); nIndex< itemArray.size(); nIndex++) @@ -1028,7 +1028,7 @@ void CNavigationWidget::write(const QString &strFileName) //< Items QDir iconDir(m_strFileHomePath + "back_pixmap" + QDir::separator()); QDir dataDir(m_strFileHomePath + "pic" + QDir::separator()); - QDir exeDir(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir())); + QDir exeDir(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir())); QJsonArray itemsArray; for (int nIndex(0); nIndex < topLevelItemCount(); ++nIndex) { diff --git a/product/src/gui/plugin/OrderManageWidget/COperationOrderForm.cpp b/product/src/gui/plugin/OrderManageWidget/COperationOrderForm.cpp index dd8ca7fd..551115ea 100644 --- a/product/src/gui/plugin/OrderManageWidget/COperationOrderForm.cpp +++ b/product/src/gui/plugin/OrderManageWidget/COperationOrderForm.cpp @@ -767,7 +767,7 @@ void COperationOrderForm::on_m_table_cellChanged(int row, int column) bool COperationOrderForm::omPermCheck() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); diff --git a/product/src/gui/plugin/OrderManageWidget/COrderManageWidget.cpp b/product/src/gui/plugin/OrderManageWidget/COrderManageWidget.cpp index 3799a69a..84db5923 100644 --- a/product/src/gui/plugin/OrderManageWidget/COrderManageWidget.cpp +++ b/product/src/gui/plugin/OrderManageWidget/COrderManageWidget.cpp @@ -28,7 +28,7 @@ COrderManageWidget::~COrderManageWidget() void COrderManageWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -38,7 +38,7 @@ void COrderManageWidget::initStyleSheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("orderManage.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("orderManage.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -244,7 +244,7 @@ void COrderManageWidget::showEvent(QShowEvent *event) bool COrderManageWidget::omPermCheck() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); diff --git a/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.cpp b/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.cpp index 8251f870..2086e178 100644 --- a/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.cpp +++ b/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.cpp @@ -5,12 +5,12 @@ CSqlDbCtrl::CSqlDbCtrl( EDbConnType eType) { - m_pDbApi = new kbd_dbms::CDbApi(eType); + m_pDbApi = new iot_dbms::CDbApi(eType); m_pDbApi->open(); -// m_pDbApi = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); +// m_pDbApi = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); // m_pDbApi->open(); -// m_pDbApi = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); +// m_pDbApi = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); // m_pDbApi->open(); } diff --git a/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.h b/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.h index 22bed0fc..30485c1f 100644 --- a/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.h +++ b/product/src/gui/plugin/OrderManageWidget/CSqlDbCtrl.h @@ -43,7 +43,7 @@ public: QString readSignatureData(int perm_id); private: - kbd_dbms::CDbApi * m_pDbApi; + iot_dbms::CDbApi * m_pDbApi; }; #endif // CSQLDBCTRL_H diff --git a/product/src/gui/plugin/OrderManageWidget/Mainwindow.cpp b/product/src/gui/plugin/OrderManageWidget/Mainwindow.cpp index 127cb089..a43ef832 100644 --- a/product/src/gui/plugin/OrderManageWidget/Mainwindow.cpp +++ b/product/src/gui/plugin/OrderManageWidget/Mainwindow.cpp @@ -34,7 +34,7 @@ Mainwindow::~Mainwindow() void Mainwindow::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -44,7 +44,7 @@ void Mainwindow::initStyleSheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("orderManage.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("orderManage.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/OrderManageWidget/main.cpp b/product/src/gui/plugin/OrderManageWidget/main.cpp index ff4855da..219120ad 100644 --- a/product/src/gui/plugin/OrderManageWidget/main.cpp +++ b/product/src/gui/plugin/OrderManageWidget/main.cpp @@ -10,12 +10,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); -// kbd_public::StartLogSystem("HMI", "hmi"); -// if (!(kbd_net::initMsgBus("HMI", "HMI"))) +// iot_public::StartLogSystem("HMI", "hmi"); +// if (!(iot_net::initMsgBus("HMI", "HMI"))) // { // return -1; // } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 -// kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); +// iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.cpp b/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.cpp index bd4f8148..8f06871b 100644 --- a/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.cpp +++ b/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.cpp @@ -2,7 +2,7 @@ #include "service/perm_mng_api/PermMngApi.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbInterfaceMng *CDbInterfaceMng::m_pInstance = NULL; @@ -332,7 +332,7 @@ CDbInterfaceMng::CDbInterfaceMng() m_pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); loadRTLocation(); loadDevGroupInfo(); @@ -361,7 +361,7 @@ void CDbInterfaceMng::loadRTLocation() m_locationInfo[id] = desc; m_locOrderList.push_back(id); } -// kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); +// iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); // if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) // { // LOGERROR("权限接口初始化失败!"); @@ -383,8 +383,8 @@ void CDbInterfaceMng::loadRTLocation() // id_value.second = "description"; // if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) // { -// kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); -// kbd_dbms::CRdbQueryResult result; +// iot_dbms::CTableLockGuard locker(*m_rtdbAccess); +// iot_dbms::CRdbQueryResult result; // std::vector columns; // columns.push_back(id_value.first); // columns.push_back(id_value.second); @@ -394,8 +394,8 @@ void CDbInterfaceMng::loadRTLocation() // m_locationInfo.clear(); // for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) // { -// kbd_dbms::CVarType key; -// kbd_dbms::CVarType value; +// iot_dbms::CVarType key; +// iot_dbms::CVarType value; // result.getColumnValue(nIndex, 0, key); // result.getColumnValue(nIndex, 1, value); diff --git a/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.h b/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.h index 9528c76e..723897e4 100644 --- a/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.h +++ b/product/src/gui/plugin/PointLockWidget/CDbInterfaceMng.h @@ -72,8 +72,8 @@ private: private: static CDbInterfaceMng * m_pInstance; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CDbApi * m_pWriteDb; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pWriteDb; QMap m_locationInfo; QList m_locOrderList; diff --git a/product/src/gui/plugin/PointLockWidget/CPointLockWidget.cpp b/product/src/gui/plugin/PointLockWidget/CPointLockWidget.cpp index b8ef2c59..a7c5bf31 100644 --- a/product/src/gui/plugin/PointLockWidget/CPointLockWidget.cpp +++ b/product/src/gui/plugin/PointLockWidget/CPointLockWidget.cpp @@ -256,7 +256,7 @@ void CPointLockWidget::listItemClicked(QListWidgetItem *item) void CPointLockWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -270,7 +270,7 @@ void CPointLockWidget::initStyle() qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("devgrouplock.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("devgrouplock.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/PointRealDataWidget/CDbInterface.cpp b/product/src/gui/plugin/PointRealDataWidget/CDbInterface.cpp index 3d66487e..47e0a353 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CDbInterface.cpp +++ b/product/src/gui/plugin/PointRealDataWidget/CDbInterface.cpp @@ -1,7 +1,7 @@ #include "CDbInterface.h" #include "public/pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbInterface *CDbInterface::m_pInstance = NULL; @@ -10,8 +10,8 @@ CDbInterface::CDbInterface() m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); m_pReadDb->open(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); - m_rtdbNetAcs = new kbd_dbms::CRdbNetApi(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); + m_rtdbNetAcs = new iot_dbms::CRdbNetApi(); readUnitInfo(); } @@ -273,7 +273,7 @@ bool CDbInterface::readPointValue(SRealData &sRealData) std::string sTable = sRealData.table_name.toStdString(); std::string sKey = sRealData.tag_name.toStdString(); std::string sColumn= sRealData.column.toStdString(); - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; if(m_rtdbNetAcs->queryByKey(sTable, sKey, sColumn, objRet)) { diff --git a/product/src/gui/plugin/PointRealDataWidget/CDbInterface.h b/product/src/gui/plugin/PointRealDataWidget/CDbInterface.h index 48951cb3..433003d9 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CDbInterface.h +++ b/product/src/gui/plugin/PointRealDataWidget/CDbInterface.h @@ -29,9 +29,9 @@ private: private: static CDbInterface * m_pInstance; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CRdbNetApi * m_rtdbNetAcs; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbNetApi * m_rtdbNetAcs; QMap m_mapDevGroup; QMap m_mapDevice; QMap m_mapUnit; diff --git a/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.cpp b/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.cpp index 17539760..97f466d9 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.cpp +++ b/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.cpp @@ -65,7 +65,7 @@ void CPointRealDataWidget::initialize() connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateDi, this, &CPointRealDataWidget::slotUpdateDi); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updatePi, this, &CPointRealDataWidget::slotUpdatePi); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateMi, this, &CPointRealDataWidget::slotUpdateMi); - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); m_pTimer = new QTimer(this); connect(m_pTimer, &QTimer::timeout, this, &CPointRealDataWidget::onTimer); diff --git a/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.h b/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.h index f2f44038..6eacdbd9 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.h +++ b/product/src/gui/plugin/PointRealDataWidget/CPointRealDataWidget.h @@ -132,7 +132,7 @@ private: bool m_isRtdbNormal; EN_AppContext m_objAppContext; QTimer * m_pTimer; - kbd_service::CDpcdaForApp *m_pDpcdaForApp; + iot_service::CDpcdaForApp *m_pDpcdaForApp; QMap m_tableMap; QMap > m_groupMap; QMap m_tagMap; diff --git a/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.cpp b/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.cpp index 61b9c27d..cb3e6e10 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.cpp +++ b/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.cpp @@ -66,7 +66,7 @@ void CRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("PointRealDataWidget"); + m_pMbComm = new iot_net::CMbCommunicator("PointRealDataWidget"); } } @@ -83,7 +83,7 @@ void CRealDataCollect::clearMsg() { if(m_pMbComm) { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; while(m_pMbComm->recvMsg(objMsg, 0)) {} } @@ -146,14 +146,14 @@ void CRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) { if(objMsg.isValid()) { - if(objMsg.getMsgType() != kbd_idlfile::MT_DP_CHANGE_DATA) + if(objMsg.getMsgType() != iot_idl::MT_DP_CHANGE_DATA) { continue; } @@ -200,16 +200,16 @@ void CRealDataCollect::processChangeData() } } -int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int CRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -227,7 +227,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -245,7 +245,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -263,7 +263,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; diff --git a/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.h b/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.h index b0e8cd89..5e60a89a 100644 --- a/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.h +++ b/product/src/gui/plugin/PointRealDataWidget/CRealDataCollect.h @@ -28,7 +28,7 @@ private: bool addSub(); bool delSub(); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); private slots: void recvMessage(); @@ -41,7 +41,7 @@ signals: void signal_updateMi(QMap> miMap); private: - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; EN_AppContext m_objAppContext; diff --git a/product/src/gui/plugin/PointRealDataWidget/main.cpp b/product/src/gui/plugin/PointRealDataWidget/main.cpp index d4e333c2..a3d62529 100644 --- a/product/src/gui/plugin/PointRealDataWidget/main.cpp +++ b/product/src/gui/plugin/PointRealDataWidget/main.cpp @@ -4,7 +4,7 @@ int main(int argc, char *argv[]) { - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -17,6 +17,6 @@ int main(int argc, char *argv[]) a.exec(); } - kbd_net::releaseMsgBus(); + iot_net::releaseMsgBus(); return 0; } diff --git a/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.cpp b/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.cpp index 807bb8aa..bc1c3565 100644 --- a/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.cpp +++ b/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.cpp @@ -2,7 +2,7 @@ #include "service/perm_mng_api/PermMngApi.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbInterfaceMng *CDbInterfaceMng::m_pInstance = NULL; @@ -328,7 +328,7 @@ CDbInterfaceMng::CDbInterfaceMng() m_pWriteDb = new CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); loadRTLocation(); loadDevGroupInfo(); @@ -355,7 +355,7 @@ void CDbInterfaceMng::loadRTLocation() QString desc = query.value(1).toString(); m_locationInfo[id] = desc; } -// kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); +// iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); // if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) // { // LOGERROR("权限接口初始化失败!"); @@ -377,8 +377,8 @@ void CDbInterfaceMng::loadRTLocation() // id_value.second = "description"; // if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) // { -// kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); -// kbd_dbms::CRdbQueryResult result; +// iot_dbms::CTableLockGuard locker(*m_rtdbAccess); +// iot_dbms::CRdbQueryResult result; // std::vector columns; // columns.push_back(id_value.first); // columns.push_back(id_value.second); @@ -388,8 +388,8 @@ void CDbInterfaceMng::loadRTLocation() // m_locationInfo.clear(); // for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) // { -// kbd_dbms::CVarType key; -// kbd_dbms::CVarType value; +// iot_dbms::CVarType key; +// iot_dbms::CVarType value; // result.getColumnValue(nIndex, 0, key); // result.getColumnValue(nIndex, 1, value); diff --git a/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.h b/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.h index 275ad309..2582c84b 100644 --- a/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.h +++ b/product/src/gui/plugin/PointsLockWidget/CDbInterfaceMng.h @@ -70,8 +70,8 @@ private: private: static CDbInterfaceMng * m_pInstance; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_dbms::CDbApi * m_pWriteDb; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pWriteDb; QMap m_locationInfo; //< LocationID-LocationDesc QMap > > m_devGroupInfoMap; //为了设备组号排序 diff --git a/product/src/gui/plugin/PointsLockWidget/PointsLockWidget.cpp b/product/src/gui/plugin/PointsLockWidget/PointsLockWidget.cpp index 7cbc01ac..1e8064d2 100644 --- a/product/src/gui/plugin/PointsLockWidget/PointsLockWidget.cpp +++ b/product/src/gui/plugin/PointsLockWidget/PointsLockWidget.cpp @@ -20,7 +20,7 @@ PointsLockWidget::PointsLockWidget(QWidget *parent, bool editMode) : ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -34,7 +34,7 @@ PointsLockWidget::PointsLockWidget(QWidget *parent, bool editMode) : qDebug() << "public.qss 无法打开!"; } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("devgrouplock.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("devgrouplock.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/RelaySettingWidget/CDbMng.cpp b/product/src/gui/plugin/RelaySettingWidget/CDbMng.cpp index 05793f16..898bc492 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CDbMng.cpp +++ b/product/src/gui/plugin/RelaySettingWidget/CDbMng.cpp @@ -2,7 +2,7 @@ #include "pub_logger_api/logger.h" #include "pub_sysinfo_api/SysInfoApi.h" -using namespace kbd_dbms; +using namespace iot_dbms; CDbMng *CDbMng::m_pInstance = NULL; @@ -301,8 +301,8 @@ QList CDbMng::getSetting() LOGERROR("getSetting():数据库读模型打开失败!"); return setList; } - kbd_public::CSysInfoInterfacePtr sysInfoPtr; - if(!kbd_public::createSysInfoInstance(sysInfoPtr)) + iot_public::CSysInfoInterfacePtr sysInfoPtr; + if(!iot_public::createSysInfoInstance(sysInfoPtr)) { LOGERROR("getSetting():创建系统信息访问库实例失败!"); return setList; @@ -346,7 +346,7 @@ QList CDbMng::getSetting() relaySetting.locDesc = query.value(22).toString(); relaySetting.keyIdTag = QString("%1.%2.%3").arg("fes_const").arg(relaySetting.tagName).arg("value"); - kbd_public::SAppInfo stAppInfo; + iot_public::SAppInfo stAppInfo; if(kbdSuccess != sysInfoPtr->getAppInfoBySubsystemId(relaySetting.subSystem, stAppInfo)) { relaySetting.nAppId = relaySetting.subSystem; @@ -403,7 +403,7 @@ CDbMng::CDbMng() { m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); m_pReadDb->open(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); m_locMap.clear(); m_rtuMap.clear(); m_devMap.clear(); diff --git a/product/src/gui/plugin/RelaySettingWidget/CDbMng.h b/product/src/gui/plugin/RelaySettingWidget/CDbMng.h index 5c5a4b4f..17dca323 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CDbMng.h +++ b/product/src/gui/plugin/RelaySettingWidget/CDbMng.h @@ -30,8 +30,8 @@ private: private: static CDbMng * m_pInstance; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_locMap; QMap m_rtuMap; diff --git a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.cpp b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.cpp index 0013ac58..e86de10e 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.cpp +++ b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.cpp @@ -41,7 +41,7 @@ void CRelaySettingMsgMng::slotcmd(const QList &keyList, const QList &keyList, const QListrecvMsg(msg, 50)) { if(msg.getMsgType() != MT_OPT_COMMON_UP) @@ -129,7 +129,7 @@ void CRelaySettingMsgMng::initMsg() { if(m_communicator == Q_NULLPTR) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } @@ -157,7 +157,7 @@ bool CRelaySettingMsgMng::delSub(int appID, int channel) { m_communicator->delSub(appID, channel); } - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; while (m_communicator->recvMsg(msg, 0)) { } diff --git a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.h b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.h index 97dca3e5..5fd3a39b 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.h +++ b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingMsgMng.h @@ -12,8 +12,8 @@ #include "pub_sysinfo_api/SysInfoApi.h" #include "perm_mng_api/PermMngApi.h" -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_service; class CRelaySettingMsgMng : public QObject { @@ -65,10 +65,10 @@ private: void affirmTest(RelayCmdReply &relayCmdReply,const QString &cmd); void editGroupTest(RelayCmdReply &relayCmdReply,const QString &cmd); private: - kbd_net::CMbCommunicator *m_communicator; + iot_net::CMbCommunicator *m_communicator; QTimer *m_timer; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; CPermMngApiPtr m_permMng; std::string m_curRtu; diff --git a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.cpp b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.cpp index af7eaa29..441c482d 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.cpp +++ b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.cpp @@ -60,7 +60,7 @@ CRelaySettingWidget::~CRelaySettingWidget() void CRelaySettingWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -70,7 +70,7 @@ void CRelaySettingWidget::initStyleSheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -1577,7 +1577,7 @@ void CRelaySettingWidget::setFilterGroup(const QString &groupPoints) QString CRelaySettingWidget::getFesDevByKeyIdTag(const QString &keyIdTag) { QString retStr; - kbd_dbms::CDbApi* m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi* m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { return retStr; diff --git a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.h b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.h index 2eb5fb4e..58ef26bd 100644 --- a/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.h +++ b/product/src/gui/plugin/RelaySettingWidget/CRelaySettingWidget.h @@ -31,8 +31,8 @@ enum EN_RELAY_TREE_TYPE EN_RELAY_TREE_CHANL = 20002 }; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_service; class CRelaySettingWidget : public QWidget { @@ -193,9 +193,9 @@ signals: private: Ui::CRelaySettingWidget *ui; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; CPermMngApiPtr m_permMng; - kbd_public::SNodeInfo m_nodeInfo; + iot_public::SNodeInfo m_nodeInfo; QMap m_locMap; QMap m_rtuMap; diff --git a/product/src/gui/plugin/RelaySettingWidget/main.cpp b/product/src/gui/plugin/RelaySettingWidget/main.cpp index b6f90ce9..84295aae 100644 --- a/product/src/gui/plugin/RelaySettingWidget/main.cpp +++ b/product/src/gui/plugin/RelaySettingWidget/main.cpp @@ -7,13 +7,13 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - kbd_public::StartLogSystem("HMI", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ReportApp/CReportWidget.h b/product/src/gui/plugin/ReportApp/CReportWidget.h index a8cb5cbb..534b4b59 100644 --- a/product/src/gui/plugin/ReportApp/CReportWidget.h +++ b/product/src/gui/plugin/ReportApp/CReportWidget.h @@ -20,8 +20,8 @@ //#include //#include -//using namespace kbd_service; -//using namespace kbd_public; +//using namespace iot_service; +//using namespace iot_public; class CReportWebView; class CReportStackedWidget; diff --git a/product/src/gui/plugin/ReportApp/main.cpp b/product/src/gui/plugin/ReportApp/main.cpp index 577e0f47..9c053141 100644 --- a/product/src/gui/plugin/ReportApp/main.cpp +++ b/product/src/gui/plugin/ReportApp/main.cpp @@ -7,7 +7,7 @@ class SingleApplication; int main(int argc, char *argv[]) { - kbd_common::doQtAppGlobalSet(); + iot_common::doQtAppGlobalSet(); SingleApplication app(argc, argv); diff --git a/product/src/gui/plugin/ReportWidget/CReportWidget.cpp b/product/src/gui/plugin/ReportWidget/CReportWidget.cpp index 847efcb4..93a5d1f4 100644 --- a/product/src/gui/plugin/ReportWidget/CReportWidget.cpp +++ b/product/src/gui/plugin/ReportWidget/CReportWidget.cpp @@ -49,7 +49,7 @@ CReportWidget::~CReportWidget() void CReportWidget::init() { - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); stackedWidget = new CReportStackedWidget(this); QHBoxLayout* hlay = new QHBoxLayout(this); @@ -140,10 +140,10 @@ void CReportWidget::setNicAddr(int appId) std::string ipAddr2 = ""; std::string node1 = ""; std::string node2 = ""; - std::vector> vector = getRunRedundancyInfoByAppid(appId); + std::vector> vector = getRunRedundancyInfoByAppid(appId); for(size_t i=0; i vec = vector.at(i); + std::vector vec = vector.at(i); std::string node_name = vec.at(0).toStdString(); int is_active = vec.at(1).toInt(); int is_master = vec.at(2).toInt(); @@ -209,21 +209,21 @@ std::string CReportWidget::getAnotherIp(const std::string &node) return ret; } -std::vector> CReportWidget::getRunRedundancyInfoByAppid(int appId) +std::vector> CReportWidget::getRunRedundancyInfoByAppid(int appId) { - std::vector> vector; + std::vector> vector; if(m_rtdbAccess->open("base", "sys_run_redundancy_info")) { - kbd_dbms::CONDINFO condition; + iot_dbms::CONDINFO condition; memcpy(condition.name, "app_id", strlen("app_id")); condition.logicalop = ATTRCOND_AND; condition.relationop = ATTRCOND_EQU; condition.conditionval = appId; - std::vector vecCondInfo; + std::vector vecCondInfo; vecCondInfo.push_back(condition); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("node_name"); columns.push_back("is_active"); @@ -238,15 +238,15 @@ std::vector> CReportWidget::getRunRedundancyInfo { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - std::vector temp; - kbd_dbms::CVarType node_name; - kbd_dbms::CVarType is_active; - kbd_dbms::CVarType is_master; - kbd_dbms::CVarType is_slave; - kbd_dbms::CVarType ip1; - kbd_dbms::CVarType ip1_active; - kbd_dbms::CVarType ip2; - kbd_dbms::CVarType ip2_active; + std::vector temp; + iot_dbms::CVarType node_name; + iot_dbms::CVarType is_active; + iot_dbms::CVarType is_master; + iot_dbms::CVarType is_slave; + iot_dbms::CVarType ip1; + iot_dbms::CVarType ip1_active; + iot_dbms::CVarType ip2; + iot_dbms::CVarType ip2_active; result.getColumnValue(nIndex, 0, node_name); result.getColumnValue(nIndex, 1, is_active); result.getColumnValue(nIndex, 2, is_master); @@ -273,7 +273,7 @@ std::vector> CReportWidget::getRunRedundancyInfo void CReportWidget::updateUserInfo() { - m_permMngPtr = kbd_service::getPermMngInstance("base"); + m_permMngPtr = iot_service::getPermMngInstance("base"); m_permMngPtr->PermDllInit(); if (m_permMngPtr != NULL) { @@ -291,7 +291,7 @@ void CReportWidget::updateUserInfo() void CReportWidget::loadPage() { m_isHTML = true; - std::string style = std::move(kbd_public::CFileStyle::getCurStyle()); + std::string style = std::move(iot_public::CFileStyle::getCurStyle()); if(m_browserMode == ViewMode) { QString urlstr ="http://"+QString::fromStdString(m_ServerAddr[m_addrNum])+m_strView; @@ -306,7 +306,7 @@ void CReportWidget::loadPage() { if(!checkReportEditPerm()) { - std::string path = kbd_public::CFileUtil::getCurModuleDir(); + std::string path = iot_public::CFileUtil::getCurModuleDir(); stackedWidget->view->load(QUrl::fromLocalFile(QString::fromStdString(path)+"../../data/report/PERM_FORBIT_EDIT.html")); return; } @@ -335,7 +335,7 @@ void CReportWidget::slotLoadFinish(bool ok) { if (!ok) { - std::string path = kbd_public::CFileUtil::getCurModuleDir(); + std::string path = iot_public::CFileUtil::getCurModuleDir(); stackedWidget->view->load(QUrl::fromLocalFile(QString::fromStdString(path)+"../../data/report/FAIL_PAGE.html")); if(m_changeAddr && !m_addrNum) m_updateTimer->start(); @@ -367,7 +367,7 @@ void CReportWidget::UserChanged() bool CReportWidget::checkReportEditPerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/ReportWidget/CReportWidget.h b/product/src/gui/plugin/ReportWidget/CReportWidget.h index 3daffbb8..e184bfcb 100644 --- a/product/src/gui/plugin/ReportWidget/CReportWidget.h +++ b/product/src/gui/plugin/ReportWidget/CReportWidget.h @@ -20,8 +20,8 @@ #include #include "dbms/rdb_api/CRdbAccess.h" -using namespace kbd_service; -using namespace kbd_public; +using namespace iot_service; +using namespace iot_public; class CReportWebView; class CReportStackedWidget; @@ -48,7 +48,7 @@ private: void initSysInfo(); void setNicAddr(int appId); std::string getAnotherIp(const std::string &node); - std::vector > getRunRedundancyInfoByAppid(int appId); + std::vector > getRunRedundancyInfoByAppid(int appId); void updateUserInfo(); void loadPage(); void slotLoadFinish(bool ok); @@ -58,7 +58,7 @@ private: private: CReportStackedWidget *stackedWidget; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; CPermMngApiPtr m_permMngPtr; CSysInfoInterfacePtr m_sysInfoPtr; QTimer * m_updateTimer; diff --git a/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.cpp b/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.cpp index 54772c2e..a4cda44a 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.cpp @@ -12,9 +12,9 @@ #include #include "operate_server_api/JsonOptCommand.h" -using namespace kbd_net; -using namespace kbd_idlfile; -using namespace kbd_public; +using namespace iot_net; +using namespace iot_idl; +using namespace iot_public; using namespace std; CRobotCtrlWidget::CRobotCtrlWidget(QWidget *parent) : QWidget(parent), @@ -36,7 +36,7 @@ CRobotCtrlWidget::CRobotCtrlWidget(QWidget *parent) : connect(m_queryThread,&QThread::started,this,&CRobotCtrlWidget::initOnTime,Qt::QueuedConnection); connect(m_queryThread,&QThread::finished,m_queryThread,&QThread::deleteLater,Qt::QueuedConnection); - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { LOGERROR("数据库打开失败!"); @@ -75,10 +75,10 @@ CRobotCtrlWidget::~CRobotCtrlWidget() void CRobotCtrlWidget::initGif() { - m_movie_0.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/free.gif").c_str()); - m_movie_1.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/overlook.gif").c_str()); - m_movie_2.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/charge.gif").c_str()); - m_movie_3.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/overhaul.gif").c_str()); + m_movie_0.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/free.gif").c_str()); + m_movie_1.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/overlook.gif").c_str()); + m_movie_2.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/charge.gif").c_str()); + m_movie_3.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/overhaul.gif").c_str()); ui->label_free->setContentsMargins(0,0,0,0); ui->label_free->setMovie(&m_movie_0); diff --git a/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.h b/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.h index 543b10ac..bc0d3e3f 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.h +++ b/product/src/gui/plugin/RobotCtrlWidget/CRobotCtrlWidget.h @@ -69,13 +69,13 @@ private: void sub(); void unSub(); - void dealOptMsg(const kbd_net::CMbMessage &objMsg); + void dealOptMsg(const iot_net::CMbMessage &objMsg); - void parseMsg(const kbd_net::CMbMessage &objMsg); + void parseMsg(const iot_net::CMbMessage &objMsg); private: Ui::CRobotCtrlWidget *ui; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; QMap m_diMap; //< QMap m_numMap; //< <设备点号,描述> QMap m_robotInfoMap; //< @@ -91,10 +91,10 @@ private: QThread *m_queryThread; OnTimeQueryThread *m_query; - kbd_public::SNodeInfo m_stLocalNodeInfo; //本机节点信息 - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; //创建系统信息访问智能库指针 + iot_public::SNodeInfo m_stLocalNodeInfo; //本机节点信息 + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; //创建系统信息访问智能库指针 - kbd_net::CMbCommunicator m_objCommon; + iot_net::CMbCommunicator m_objCommon; QString m_tag; int m_timeOutTimes; QTimer *m_timer; //等待超时定时器 diff --git a/product/src/gui/plugin/RobotCtrlWidget/CRobotFileCollect.cpp b/product/src/gui/plugin/RobotCtrlWidget/CRobotFileCollect.cpp index e7cec316..ebbf447e 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/CRobotFileCollect.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/CRobotFileCollect.cpp @@ -6,7 +6,7 @@ #include "pub_utility_api/FileUtil.h" #include "pub_utility_api/CommonConfigParse.h" -using namespace kbd_public; +using namespace iot_public; CRobotFileCollect::CRobotFileCollect(QObject *parent): QObject(parent), @@ -47,7 +47,7 @@ void CRobotFileCollect::release() void CRobotFileCollect::loadConfig() { CCommonConfigParse config; - const std::string file = kbd_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); + const std::string file = iot_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); std::string loadFilePath; config.load(file); int error = config.getStringValue("robot_config","loadFilePath",loadFilePath); diff --git a/product/src/gui/plugin/RobotCtrlWidget/CRobotWidget.cpp b/product/src/gui/plugin/RobotCtrlWidget/CRobotWidget.cpp index c0eb80b0..a068787c 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/CRobotWidget.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/CRobotWidget.cpp @@ -24,7 +24,7 @@ CRobotWidget::CRobotWidget(bool editMode, QWidget *parent) : ui(new Ui::CRobotWidget) { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -34,7 +34,7 @@ CRobotWidget::CRobotWidget(bool editMode, QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("robot.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("robot.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.cpp b/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.cpp index 51cb5f55..fc816178 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.cpp @@ -42,7 +42,7 @@ void OnTimeQueryThread::slotQuery() vecKey.push_back(it.key().toStdString()); std::vector vecColumn; vecColumn.push_back("value"); - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; rdb_net_api.connect(it.value()->m_domain,it.value()->m_sub); if(m_outTimeCount > 20) { diff --git a/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.h b/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.h index 33af2bb6..7cf97ab0 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.h +++ b/product/src/gui/plugin/RobotCtrlWidget/OnTimeQueryThread.h @@ -23,7 +23,7 @@ public slots: private: QMap m_map; QTimer *m_timer; - kbd_dbms::CRdbNetApi rdb_net_api; + iot_dbms::CRdbNetApi rdb_net_api; QMap m_infoMap; QMutex *m_mutex; int m_outTimeCount; diff --git a/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.cpp b/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.cpp index daa37866..0beec602 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.cpp @@ -6,7 +6,7 @@ #include "pub_logger_api/logger.h" #include "common/Common.h" -using namespace kbd_dbms; +using namespace iot_dbms; SWitchButton::SWitchButton(QWidget *parent) : QWidget(parent), @@ -22,8 +22,8 @@ SWitchButton::SWitchButton(QWidget *parent) { // 鼠标滑过光标形状 - 手型 setCursor(Qt::PointingHandCursor); - m_pWirteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); - m_rtdbTable = new kbd_dbms::CRdbAccess(); + m_pWirteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_rtdbTable = new iot_dbms::CRdbAccess(); m_rtdbTable->open(CN_AppId_BASE, "alarm_link_enable_info"); // 连接信号槽 m_load = new QTimer(); diff --git a/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.h b/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.h index 0769e099..59ee61ab 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.h +++ b/product/src/gui/plugin/RobotCtrlWidget/SWitchButton.h @@ -77,8 +77,8 @@ private: QTimer *m_load; - kbd_dbms::CDbApi * m_pWirteDb; - kbd_dbms::CRdbAccess * m_rtdbTable; + iot_dbms::CDbApi * m_pWirteDb; + iot_dbms::CRdbAccess * m_rtdbTable; }; #endif // SWITCHBUTTON_H diff --git a/product/src/gui/plugin/RobotCtrlWidget/main.cpp b/product/src/gui/plugin/RobotCtrlWidget/main.cpp index b11740fe..b180ffa8 100644 --- a/product/src/gui/plugin/RobotCtrlWidget/main.cpp +++ b/product/src/gui/plugin/RobotCtrlWidget/main.cpp @@ -6,8 +6,8 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.cpp b/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.cpp index 9d9a46be..ed79d97c 100644 --- a/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.cpp +++ b/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.cpp @@ -11,9 +11,9 @@ #include #include "operate_server_api/JsonOptCommand.h" -using namespace kbd_net; -using namespace kbd_idlfile; -using namespace kbd_public; +using namespace iot_net; +using namespace iot_idl; +using namespace iot_public; using namespace std; CRobotCtrlWidget::CRobotCtrlWidget(QWidget *parent) : QWidget(parent), @@ -45,7 +45,7 @@ CRobotCtrlWidget::CRobotCtrlWidget(QWidget *parent) : connect(m_recvThread,&QThread::finished,m_recvThread,&QThread::deleteLater,Qt::QueuedConnection); connect(m_recv,&OnTimeRecvThread::sigCtrlResult,this,&CRobotCtrlWidget::showMessDialog,Qt::QueuedConnection); - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); if(!m_pReadDb->open()) { LOGERROR("打开数据库失败!error:%s",m_pReadDb->getLastErrorString().toStdString().c_str()); @@ -90,10 +90,10 @@ CRobotCtrlWidget::~CRobotCtrlWidget() void CRobotCtrlWidget::initGif() { - m_movie_0.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/free.gif").c_str()); - m_movie_1.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/overlook.gif").c_str()); - m_movie_2.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/charge.gif").c_str()); - m_movie_3.setFileName(kbd_public::CFileUtil::getPathOfResFile("gui/icon/robot/overhaul.gif").c_str()); + m_movie_0.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/free.gif").c_str()); + m_movie_1.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/overlook.gif").c_str()); + m_movie_2.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/charge.gif").c_str()); + m_movie_3.setFileName(iot_public::CFileUtil::getPathOfResFile("gui/icon/robot/overhaul.gif").c_str()); ui->label_free->setContentsMargins(0,0,0,0); ui->label_free->setMovie(&m_movie_0); diff --git a/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.h b/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.h index 8ea879e3..47d6eb7d 100644 --- a/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.h +++ b/product/src/gui/plugin/RobotWidget/CRobotCtrlWidget.h @@ -66,13 +66,13 @@ private: void sub(); void unSub(); - void dealOptMsg(const kbd_net::CMbMessage &objMsg); + void dealOptMsg(const iot_net::CMbMessage &objMsg); - void parseMsg(const kbd_net::CMbMessage &objMsg); + void parseMsg(const iot_net::CMbMessage &objMsg); private: Ui::CRobotCtrlWidget *ui; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; QMap m_diMap; //< QMap m_numMap; //< <设备点号,描述> @@ -92,10 +92,10 @@ private: OnTimeRecvThread *m_recv; - kbd_public::SNodeInfo m_stLocalNodeInfo; //本机节点信息 - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; //创建系统信息访问智能库指针 + iot_public::SNodeInfo m_stLocalNodeInfo; //本机节点信息 + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; //创建系统信息访问智能库指针 - kbd_net::CMbCommunicator m_objCommon; + iot_net::CMbCommunicator m_objCommon; QString m_tag; int m_timeOutTimes; QTimer *m_timer; //等待超时定时器 diff --git a/product/src/gui/plugin/RobotWidget/CRobotFileCollect.cpp b/product/src/gui/plugin/RobotWidget/CRobotFileCollect.cpp index d8b43d34..e5fc3889 100644 --- a/product/src/gui/plugin/RobotWidget/CRobotFileCollect.cpp +++ b/product/src/gui/plugin/RobotWidget/CRobotFileCollect.cpp @@ -6,7 +6,7 @@ #include "pub_utility_api/FileUtil.h" #include "pub_utility_api/CommonConfigParse.h" -using namespace kbd_public; +using namespace iot_public; CRobotFileCollect::CRobotFileCollect(QObject *parent): QObject(parent), @@ -47,7 +47,7 @@ void CRobotFileCollect::release() void CRobotFileCollect::loadConfig() { CCommonConfigParse config; - const std::string file = kbd_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); + const std::string file = iot_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); std::string loadFilePath; config.load(file); int error = config.getStringValue("robot_config","loadFilePath",loadFilePath); diff --git a/product/src/gui/plugin/RobotWidget/CRobotWidget.cpp b/product/src/gui/plugin/RobotWidget/CRobotWidget.cpp index 5bf2ee53..ff8a884a 100644 --- a/product/src/gui/plugin/RobotWidget/CRobotWidget.cpp +++ b/product/src/gui/plugin/RobotWidget/CRobotWidget.cpp @@ -28,7 +28,7 @@ CRobotWidget::CRobotWidget(bool editMode, QWidget *parent) : ui(new Ui::CRobotWidget) { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -38,7 +38,7 @@ CRobotWidget::CRobotWidget(bool editMode, QWidget *parent) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("robot.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("robot.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.cpp b/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.cpp index 51cb5f55..fc816178 100644 --- a/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.cpp +++ b/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.cpp @@ -42,7 +42,7 @@ void OnTimeQueryThread::slotQuery() vecKey.push_back(it.key().toStdString()); std::vector vecColumn; vecColumn.push_back("value"); - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; rdb_net_api.connect(it.value()->m_domain,it.value()->m_sub); if(m_outTimeCount > 20) { diff --git a/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.h b/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.h index 33af2bb6..7cf97ab0 100644 --- a/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.h +++ b/product/src/gui/plugin/RobotWidget/OnTimeQueryThread.h @@ -23,7 +23,7 @@ public slots: private: QMap m_map; QTimer *m_timer; - kbd_dbms::CRdbNetApi rdb_net_api; + iot_dbms::CRdbNetApi rdb_net_api; QMap m_infoMap; QMutex *m_mutex; int m_outTimeCount; diff --git a/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.cpp b/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.cpp index 90c6d487..8411eb0f 100644 --- a/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.cpp +++ b/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.cpp @@ -7,9 +7,9 @@ #include "pub_utility_api/CommonConfigParse.h" #include #include "Common.h" -using namespace kbd_net; -using namespace kbd_idlfile; -using namespace kbd_public; +using namespace iot_net; +using namespace iot_idl; +using namespace iot_public; using namespace std; OnTimeRecvThread::OnTimeRecvThread(QObject *parent) : @@ -27,7 +27,7 @@ OnTimeRecvThread::~OnTimeRecvThread() void OnTimeRecvThread::loadConfig() { CCommonConfigParse config; - const std::string file = kbd_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); + const std::string file = iot_public::CFileUtil::getPathOfCfgFile("robot_config.xml"); int error = config.load(file); if(error != kbdSuccess) { @@ -78,15 +78,15 @@ void OnTimeRecvThread::slotAlmLinkOpen(bool bo) m_check = !bo; bool bRet = false; //拼凑命令 - ::kbd_idlfile::HmiCtrlRobot ctrlMsg; - ctrlMsg.set_entype(::kbd_idlfile::MT_HMI_CTRL_ROBOT); - ctrlMsg.set_encontent(bo?(::kbd_idlfile::MT_START):(::kbd_idlfile::MT_STOP)); + ::iot_idl::HmiCtrlRobot ctrlMsg; + ctrlMsg.set_entype(::iot_idl::MT_HMI_CTRL_ROBOT); + ctrlMsg.set_encontent(bo?(::iot_idl::MT_START):(::iot_idl::MT_STOP)); ctrlMsg.set_ntime(QDateTime::currentMSecsSinceEpoch()); string msg; ctrlMsg.SerializeToString(&msg); //发送命令 CMbMessage objMsg; - objMsg.setMsgType(::kbd_idlfile::MT_HMI_CTRL_ROBOT); + objMsg.setMsgType(::iot_idl::MT_HMI_CTRL_ROBOT); objMsg.setSubject(CN_AppId_BASE,CH_HMI_TO_ALCMD_DOWN); objMsg.setData(msg); init(); @@ -96,7 +96,7 @@ void OnTimeRecvThread::slotAlmLinkOpen(bool bo) QString text = tr("告警联动控制命令下发失败!"); emit sigCtrlResult(text); LOGERROR("告警联动控制-Message[MsgType='%d', Channel='%d'] send fail .", - ::kbd_idlfile::MT_HMI_CTRL_ROBOT,CH_HMI_TO_ALCMD_DOWN); + ::iot_idl::MT_HMI_CTRL_ROBOT,CH_HMI_TO_ALCMD_DOWN); }else { emit sigSetSwitchButtonUsed(false,false); @@ -107,10 +107,10 @@ void OnTimeRecvThread::slotAlmLinkOpen(bool bo) void OnTimeRecvThread::parseMsg(const CMbMessage &objMsg) { - ::kbd_idlfile::HmiCtrlRobot hmiCtrlRobot; + ::iot_idl::HmiCtrlRobot hmiCtrlRobot; if(hmiCtrlRobot.ParseFromArray(objMsg.getDataPtr(),(int)objMsg.getDataSize())) { - if(hmiCtrlRobot.encontent() == kbd_idlfile::MT_STOP) + if(hmiCtrlRobot.encontent() == iot_idl::MT_STOP) { emit sigSetSwitchButtonUsed(true,false); }else diff --git a/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.h b/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.h index 951cfebd..fa75b256 100644 --- a/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.h +++ b/product/src/gui/plugin/RobotWidget/OnTimeRecvThread.h @@ -21,13 +21,13 @@ public slots: void slotAlmLinkOpen(bool bo); private: - void parseMsg(const kbd_net::CMbMessage &objMsg); + void parseMsg(const iot_net::CMbMessage &objMsg); void unSub(); void clearMsg(); private: - kbd_net::CMbCommunicator m_objCommon; + iot_net::CMbCommunicator m_objCommon; bool m_check; int m_outTime; }; diff --git a/product/src/gui/plugin/RobotWidget/main.cpp b/product/src/gui/plugin/RobotWidget/main.cpp index b11740fe..b180ffa8 100644 --- a/product/src/gui/plugin/RobotWidget/main.cpp +++ b/product/src/gui/plugin/RobotWidget/main.cpp @@ -6,8 +6,8 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ScheduleWidget/CDutyDefineDialog.cpp b/product/src/gui/plugin/ScheduleWidget/CDutyDefineDialog.cpp index fadcc9d9..97a6398d 100644 --- a/product/src/gui/plugin/ScheduleWidget/CDutyDefineDialog.cpp +++ b/product/src/gui/plugin/ScheduleWidget/CDutyDefineDialog.cpp @@ -1,9 +1,9 @@ #include "CDutyDefineDialog.h" #include "ui_CDutyDefineDialog.h" -using namespace kbd_public; -using namespace kbd_dbms; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_dbms; +using namespace iot_service; CDutyDefineDialog::CDutyDefineDialog( QWidget *parent ) : QDialog(parent), @@ -54,7 +54,7 @@ bool CDutyDefineDialog::checkUserPerm() void CDutyDefineDialog::loadData() { - kbd_dbms::CDbApi* pDb = new CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi* pDb = new CDbApi(DB_CONN_MODEL_READ); if ( !pDb->open() ) { LOGERROR("initialize or open database failed!"); @@ -166,7 +166,7 @@ void CDutyDefineDialog::slotPushButtonSaveClicked( bool ) } // 创建数据库访问对象 - kbd_dbms::CDbApi* pDb = new CDbApi(DB_CONN_MODEL_WRITE); + iot_dbms::CDbApi* pDb = new CDbApi(DB_CONN_MODEL_WRITE); if ( !pDb->open() ) { LOGERROR("initialize or open database failed!"); diff --git a/product/src/gui/plugin/ScheduleWidget/CDutySetting.cpp b/product/src/gui/plugin/ScheduleWidget/CDutySetting.cpp index dd7e80cc..3ff07260 100644 --- a/product/src/gui/plugin/ScheduleWidget/CDutySetting.cpp +++ b/product/src/gui/plugin/ScheduleWidget/CDutySetting.cpp @@ -3,9 +3,9 @@ #include #include "pub_utility_api/FileStyle.h" -using namespace kbd_public; -using namespace kbd_dbms; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_dbms; +using namespace iot_service; CDutySetting::CDutySetting(QWidget *parent, bool editMode) : QWidget(parent), @@ -121,7 +121,7 @@ void CDutySetting::initQSS() { // 加载qss文件 QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -131,7 +131,7 @@ void CDutySetting::initQSS() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("duty_setting.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("duty_setting.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -677,15 +677,15 @@ void CDutySetting::sendOptEvent( QString sMsg ) if ( m_pAlmApiForApp == NULL ) return; - kbd_idlfile::SAppAddAlm stAppAddAlarm; - kbd_idlfile::SAlmInfoFromApp &stAlmInfoFromApp = *(stAppAddAlarm.add_alm_info()); + iot_idl::SAppAddAlm stAppAddAlarm; + iot_idl::SAlmInfoFromApp &stAlmInfoFromApp = *(stAppAddAlarm.add_alm_info()); stAlmInfoFromApp.set_alm_type(ALM_TYPE_OPERATE); stAlmInfoFromApp.set_time_stamp( QDateTime::currentMSecsSinceEpoch() ); stAlmInfoFromApp.set_status(ALM_STAT_OPT_DUTY); stAlmInfoFromApp.set_location_id(m_nLocationId); - stAlmInfoFromApp.set_alm_style(::kbd_idlfile::enAlmStyle::AS_EVENT_ONLY); + stAlmInfoFromApp.set_alm_style(::iot_idl::enAlmStyle::AS_EVENT_ONLY); - kbd_idlfile::SAlmKeyword stAlmKeyword; + iot_idl::SAlmKeyword stAlmKeyword; stAlmKeyword.set_id(ALM_KEY_ALM_DESC); stAlmKeyword.set_value( sMsg.toStdString().c_str() ); stAlmInfoFromApp.add_alm_keyword()->CopyFrom(stAlmKeyword); diff --git a/product/src/gui/plugin/ScheduleWidget/CDutySetting.h b/product/src/gui/plugin/ScheduleWidget/CDutySetting.h index 8cc6927d..1d38a5ae 100644 --- a/product/src/gui/plugin/ScheduleWidget/CDutySetting.h +++ b/product/src/gui/plugin/ScheduleWidget/CDutySetting.h @@ -65,13 +65,13 @@ public slots: private: Ui::CDutySetting *ui; - kbd_dbms::CDbApi* m_pDb; // 数据库接口 + iot_dbms::CDbApi* m_pDb; // 数据库接口 QDate m_startDate; CDragListWidget* m_pDragWdiget; QList m_listDutyDefine; QList m_listDropListWidget; - kbd_service::CAlmApiForApp* m_pAlmApiForApp; - kbd_service::CPermMngApiPtr m_ptrPermMng; + iot_service::CAlmApiForApp* m_pAlmApiForApp; + iot_service::CPermMngApiPtr m_ptrPermMng; int m_nLocationId; bool m_bEditMode;// 是否编辑态 QTimer *m_chkUserTimer; diff --git a/product/src/gui/plugin/ScheduleWidget/main.cpp b/product/src/gui/plugin/ScheduleWidget/main.cpp index b11b1049..2493ad9c 100644 --- a/product/src/gui/plugin/ScheduleWidget/main.cpp +++ b/product/src/gui/plugin/ScheduleWidget/main.cpp @@ -8,15 +8,15 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); - kbd_public::StartLogSystem( "", "" ); - kbd_net::initMsgBus("duty_setting","duty_setting xxx"); + iot_public::StartLogSystem( "", "" ); + iot_net::initMsgBus("duty_setting","duty_setting xxx"); CDutySetting w( 0, false ); w.show(); int nRet = a.exec(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return nRet; } diff --git a/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.cpp b/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.cpp index c71b0e44..97ace779 100644 --- a/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.cpp +++ b/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.cpp @@ -3,8 +3,8 @@ #include "../../idl_files/SequenceMessage.pb.h" #include "../../idl_files/RdbServerMessage.pb.h" -using namespace kbd_dbms; -using namespace kbd_idlfile; +using namespace iot_dbms; +using namespace iot_idl; CSequenceDBInterface::CSequenceDBInterface(CDbApi *dbRead) : m_timer(NULL), @@ -48,8 +48,8 @@ QString CSequenceDBInterface::queryLocationName(const int nLocationID) std::string strTableName = "sys_model_location_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("description"); @@ -84,8 +84,8 @@ QString CSequenceDBInterface::queryUserName(const int nUserID) std::string strTableName = "rm_user_def"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_alias"); @@ -118,8 +118,8 @@ QStringList CSequenceDBInterface::queryAllLocationName() std::string strTableName = "sys_model_location_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("description"); @@ -147,8 +147,8 @@ QMap CSequenceDBInterface::queryUserIDMap() std::string strTableName = "rm_user_def"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("perm_id"); columns.push_back("perm_alias"); @@ -227,7 +227,7 @@ QString CSequenceDBInterface::queryStateName(const QString &strStateTextName, co std::string strTableName = "dict_state_text_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); std::vector vecCondInfo; CONDINFO conditionName; @@ -245,7 +245,7 @@ QString CSequenceDBInterface::queryStateName(const QString &strStateTextName, co vecCondInfo.push_back(conditionState); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("display_value"); @@ -267,13 +267,13 @@ QString CSequenceDBInterface::queryStateName(const QString &strStateTextName, co QList CSequenceDBInterface::queryRunSequenceNodeList() { QList sequenceList; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { return sequenceList; } - kbd_public::SNodeInfo stNodeInfo; + iot_public::SNodeInfo stNodeInfo; spSysInfo->getLocalNodeInfo(stNodeInfo); if(!m_pReadDb->isOpen()) { @@ -483,27 +483,27 @@ void CSequenceDBInterface::updataSequenctState(QList &listSequence) { //query state QMutexLocker locker(&mutex); - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo); for(int nIndex(0); nIndex < listSequence.size(); nIndex++) { if(E_Node_Sequence == listSequence.at(nIndex).nodeType) { - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(listSequence.at(nIndex).locationID, stLocationInfo); m_rdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); try { - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("sequence_running"); std::string *pStatusColName = query.add_strselectcolnamearr(); *pStatusColName = "status"; - kbd_idlfile::RdbCondition *pSequenceNodeTypeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pSequenceNodeTypeCondtion = query.add_msgcondition(); pSequenceNodeTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pSequenceNodeTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pSequenceNodeTypeCondtion->set_strcolumnname("node_type"); @@ -512,7 +512,7 @@ void CSequenceDBInterface::updataSequenctState(QList &listSequence) pSeqNodeTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pSeqNodeTypeCondValue->set_nvalue((int)E_Node_Sequence); - kbd_idlfile::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); pSequenceNameCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pSequenceNameCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pSequenceNameCondtion->set_strcolumnname("seq_name"); @@ -521,7 +521,7 @@ void CSequenceDBInterface::updataSequenctState(QList &listSequence) pSeqNameCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pSeqNameCondValue->set_strvalue(listSequence.at(nIndex).seqName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_rdbNetApi->query(query, retMsg)) { if(retMsg.msgrecord_size() != 0) @@ -551,7 +551,7 @@ void CSequenceDBInterface::updataSequenceExecuteState() while(m_rdbNetApi->checkStatus()) { - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_rdbNetApi->getRet(&retMsg)) { if(retMsg.msgrecord_size() != 0) @@ -563,21 +563,21 @@ void CSequenceDBInterface::updataSequenceExecuteState() } } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { for(int nIndex(0); nIndex < m_listSequence.size(); nIndex++) { if(E_Node_Sequence == m_listSequence.at(nIndex).nodeType) { - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(m_listSequence.at(nIndex).locationID, stLocationInfo); - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo); m_rdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("sequence_running"); std::string *pSeqColName = query.add_strselectcolnamearr(); @@ -586,7 +586,7 @@ void CSequenceDBInterface::updataSequenceExecuteState() std::string *pStatusColName = query.add_strselectcolnamearr(); *pStatusColName = "status"; - kbd_idlfile::RdbCondition *pSequenceNodeTypeCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pSequenceNodeTypeCondtion = query.add_msgcondition(); pSequenceNodeTypeCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pSequenceNodeTypeCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pSequenceNodeTypeCondtion->set_strcolumnname("node_type"); @@ -595,7 +595,7 @@ void CSequenceDBInterface::updataSequenceExecuteState() pSeqNodeTypeCondValue->set_edatatype(DataType::CN_DATATYPE_INT32); pSeqNodeTypeCondValue->set_nvalue((int)E_Node_Sequence); - kbd_idlfile::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); pSequenceNameCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pSequenceNameCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pSequenceNameCondtion->set_strcolumnname("seq_name"); @@ -604,7 +604,7 @@ void CSequenceDBInterface::updataSequenceExecuteState() pSeqNameCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pSeqNameCondValue->set_strvalue(m_listSequence.at(nIndex).seqName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_rdbNetApi->query(query, retMsg, true); } } diff --git a/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.h b/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.h index d389e708..0588a4b6 100644 --- a/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.h +++ b/product/src/gui/plugin/SequenceManageWidget/CSequenceDBInterface.h @@ -20,7 +20,7 @@ class CSequenceDBInterface : public QObject { Q_OBJECT public: - CSequenceDBInterface(kbd_dbms::CDbApi *dbRead); + CSequenceDBInterface(iot_dbms::CDbApi *dbRead); ~CSequenceDBInterface(); @@ -64,9 +64,9 @@ private: QMutex mutex; QTimer * m_timer; QList m_listSequence; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccessEx * m_rtdbAccessEx; - kbd_dbms::CRdbNetApi * m_rdbNetApi; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccessEx * m_rtdbAccessEx; + iot_dbms::CRdbNetApi * m_rdbNetApi; }; #endif // CSEQUENCEDBINTERFACE_H diff --git a/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.cpp b/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.cpp index dda46307..8dc6180f 100644 --- a/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.cpp +++ b/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.cpp @@ -18,7 +18,7 @@ #include "pub_utility_api/FileStyle.h" #include -using namespace kbd_dbms; +using namespace iot_dbms; CSequenceManageWidget::CSequenceManageWidget(QWidget *parent, bool editMode) : QWidget(parent), ui(new Ui::CSequenceManageWidget), @@ -36,7 +36,7 @@ CSequenceManageWidget::CSequenceManageWidget(QWidget *parent, bool editMode) : ui->listWidget->setCurrentRow(1); } QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -46,7 +46,7 @@ CSequenceManageWidget::CSequenceManageWidget(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("sequence.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("sequence.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -250,7 +250,7 @@ void CSequenceManageWidget::updateActionRunData() bool CSequenceManageWidget::getSeqCtrlPerm() { //<权限处理 - kbd_service::CPermMngApiPtr permManage = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permManage = iot_service::getPermMngInstance("base"); permManage->PermDllInit(); int nLevel; diff --git a/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.h b/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.h index 87c4498d..fbc276ad 100644 --- a/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.h +++ b/product/src/gui/plugin/SequenceManageWidget/CSequenceManageWidget.h @@ -59,7 +59,7 @@ private: CHistorySequenceModel * m_historySequenceModel; CHistoryActionModel * m_historyActionModel; - kbd_dbms::CDbApi * m_pReadDb; + iot_dbms::CDbApi * m_pReadDb; QList m_listHistroySequence; History_Filter_Condition m_historyCondition; bool m_isGuard; diff --git a/product/src/gui/plugin/SequenceManageWidget/main.cpp b/product/src/gui/plugin/SequenceManageWidget/main.cpp index 35158c28..b727db70 100644 --- a/product/src/gui/plugin/SequenceManageWidget/main.cpp +++ b/product/src/gui/plugin/SequenceManageWidget/main.cpp @@ -7,9 +7,9 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem(QString("log_hmi.properties").toUtf8().data(), + iot_public::StartLogSystem(QString("log_hmi.properties").toUtf8().data(), "hmi", "sequence"); - kbd_net::initMsgBus("Sequence", "1", true); + iot_net::initMsgBus("Sequence", "1", true); { CSequenceManageWidget w; @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) } - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApi.cpp b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApi.cpp index e7365d44..e250d977 100644 --- a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApi.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApi.cpp @@ -1,8 +1,8 @@ #include "application/sequence_server_api/CSeqForHmiApi.h" #include "CSeqForHmiApiImpl.h" -using namespace kbd_application; -using namespace kbd_idlfile::sequence; +using namespace iot_app; +using namespace iot_idl::sequence; CSeqForHmiApi::CSeqForHmiApi(int appid) { m_pImpl = new CSeqForHmiApiImpl(appid, this); diff --git a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.cpp b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.cpp index 2e6dfde4..b61d2f32 100644 --- a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.cpp @@ -4,9 +4,9 @@ #include "CSeqForHmiApiImpl.h" -using namespace kbd_application; -using namespace kbd_idlfile::sequence; -kbd_application::CSeqForHmiApiImpl::CSeqForHmiApiImpl( +using namespace iot_app; +using namespace iot_idl::sequence; +iot_app::CSeqForHmiApiImpl::CSeqForHmiApiImpl( int appid, CSeqForHmiApi* api) : CTimerThreadBase("CSeqForHmiApiImpl thread", 100), @@ -55,7 +55,7 @@ void CSeqForHmiApiImpl::afterSuspend() } void CSeqForHmiApiImpl::execute() { - using namespace kbd_idlfile; + using namespace iot_idl; if (!m_objRecvSeqCMb.recvMsg(m_objRecvMsg)) { return; @@ -65,10 +65,10 @@ void CSeqForHmiApiImpl::execute() } bool CSeqForHmiApiImpl::recvMsgSeq( - kbd_net::CMbMessage& msg) + iot_net::CMbMessage& msg) { try { - using namespace kbd_idlfile; + using namespace iot_idl; if (msg.getMsgType() != MT_SEQAGE_CTRL_HMI_UP) { @@ -130,7 +130,7 @@ bool CSeqForHmiApiImpl::recvMsgSeq( return false; } -bool CSeqForHmiApiImpl::sendToSeq(kbd_net::CMbMessage& msg, int domain) +bool CSeqForHmiApiImpl::sendToSeq(iot_net::CMbMessage& msg, int domain) { LOGINFO("sendMsgToDomain domain[%d] appid[%d] msgType[%d] Subject[%d]", domain, @@ -147,7 +147,7 @@ bool CSeqForHmiApiImpl::seqOperateRequest( SeqOperateMessage& msg) { int domain = msg.pkg_head().target_domain(); - kbd_net::CMbMessage objMessage; + iot_net::CMbMessage objMessage; objMessage.setPara1(enumSeqOperateMessage); objMessage.setData(msg.SerializeAsString()); return sendToSeq(objMessage, domain); @@ -157,7 +157,7 @@ bool CSeqForHmiApiImpl::userInterveneResponse( UiRequestMessageAck& msg) { int domain = msg.pkg_head().target_domain(); - kbd_net::CMbMessage objMessage; + iot_net::CMbMessage objMessage; objMessage.setPara1(enumUiRequestMessageAck); objMessage.setData(msg.SerializeAsString()); return sendToSeq(objMessage, domain); diff --git a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.h b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.h index 71248357..b9a74e00 100644 --- a/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.h +++ b/product/src/gui/plugin/SequenceWidget/CSeqForHmiApiImpl.h @@ -6,10 +6,10 @@ #include "net/net_msg_bus_api/CMbCommunicator.h" #include "application/sequence_server_api/CSeqForHmiApi.h" -namespace kbd_application { - using namespace kbd_idlfile::sequence; +namespace iot_app { + using namespace iot_idl::sequence; class CSeqForHmiApiImpl - : public kbd_public::CTimerThreadBase + : public iot_public::CTimerThreadBase { public: CSeqForHmiApiImpl(int appid, CSeqForHmiApi* api); @@ -43,15 +43,15 @@ namespace kbd_application { bool handleSeqStateChange( StatusChangeMessage& msg); - bool sendToSeq(kbd_net::CMbMessage& msg, int domain); + bool sendToSeq(iot_net::CMbMessage& msg, int domain); - bool recvMsgSeq(kbd_net::CMbMessage& msg); + bool recvMsgSeq(iot_net::CMbMessage& msg); private: CSeqForHmiApi* m_ptrInterface; - kbd_net::CMbMessage m_objRecvMsg; + iot_net::CMbMessage m_objRecvMsg; - kbd_net::CMbCommunicator m_objSendSeqCMb;//发送 sequence - kbd_net::CMbCommunicator m_objRecvSeqCMb;//接收 sequence + iot_net::CMbCommunicator m_objSendSeqCMb;//发送 sequence + iot_net::CMbCommunicator m_objRecvSeqCMb;//接收 sequence const int m_nServerAppid; }; diff --git a/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.cpp b/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.cpp index c52c434f..887c6999 100644 --- a/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.cpp @@ -67,7 +67,7 @@ void CSeqPermDialog::initView(bool guard) bool CSeqPermDialog::initPermMng() { - m_ptrPermMng = kbd_service::getPermMngInstance("base"); + m_ptrPermMng = iot_service::getPermMngInstance("base"); int result = m_ptrPermMng->PermDllInit(); if(result < 0) { diff --git a/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.h b/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.h index 23bd274e..6bcf5421 100644 --- a/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.h +++ b/product/src/gui/plugin/SequenceWidget/CSeqPermDialog.h @@ -46,7 +46,7 @@ private slots: private: Ui::CSeqPermDialog * ui; - kbd_service::CPermMngApiPtr m_ptrPermMng; + iot_service::CPermMngApiPtr m_ptrPermMng; bool m_isGuard; int m_nUserId; std::string m_strUsrName; diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.cpp b/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.cpp index 9596291a..54ba0d5e 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.cpp @@ -3,8 +3,8 @@ #include "../../idl_files/SequenceMessage.pb.h" #include "../../idl_files/RdbServerMessage.pb.h" -using namespace kbd_dbms; -using namespace kbd_idlfile; +using namespace iot_dbms; +using namespace iot_idl; CSequenceDataManage::CSequenceDataManage(QObject *parent, CDbApi *dbRead) : QObject(parent), @@ -50,14 +50,14 @@ void CSequenceDataManage::initRdbDataBase() m_rtdbAccessEx = new CRdbAccessEx(); } -void CSequenceDataManage::recvSequenceResponse(kbd_idlfile::sequence::SeqOperateMessageAck &msg) +void CSequenceDataManage::recvSequenceResponse(iot_idl::sequence::SeqOperateMessageAck &msg) { if(msg.has_seq_node()) { - kbd_idlfile::sequence::SeqNodeStatusParameter* sequenceNode = msg.mutable_seq_node(); + iot_idl::sequence::SeqNodeStatusParameter* sequenceNode = msg.mutable_seq_node(); QString seqName = QString::fromStdString(sequenceNode->seq_name()); E_SEQ_OPERATE type = (E_SEQ_OPERATE)msg.opreate_type(); - kbd_idlfile::sequence::ExecuteStatusParameter * status = msg.mutable_execute_status(); + iot_idl::sequence::ExecuteStatusParameter * status = msg.mutable_execute_status(); //< status->statuscode() 状态码 0为成功 非零为错误状态 if(!status->statuscode()) @@ -68,7 +68,7 @@ void CSequenceDataManage::recvSequenceResponse(kbd_idlfile::sequence::SeqOperate { if(status->has_erro_param()) { - kbd_idlfile::sequence::ErrorParameter * error = status->mutable_erro_param(); + iot_idl::sequence::ErrorParameter * error = status->mutable_erro_param(); QString strErrorInfo = QString::fromStdString(error->errordescription()); emit sigRecvSequenceResponseErrorMsg(seqName, type, strErrorInfo); } @@ -76,17 +76,17 @@ void CSequenceDataManage::recvSequenceResponse(kbd_idlfile::sequence::SeqOperate } } -void CSequenceDataManage::recvUserInterveneRequest(kbd_idlfile::sequence::UiRequestMessage &msg) +void CSequenceDataManage::recvUserInterveneRequest(iot_idl::sequence::UiRequestMessage &msg) { - kbd_idlfile::sequence::UiRequestMessage * requestMessage = new kbd_idlfile::sequence::UiRequestMessage(msg); + iot_idl::sequence::UiRequestMessage * requestMessage = new iot_idl::sequence::UiRequestMessage(msg); emit sigRecvUserInterveneRequest(requestMessage); } -void CSequenceDataManage::recvSeqStateChange(kbd_idlfile::sequence::StatusChangeMessage &msg) +void CSequenceDataManage::recvSeqStateChange(iot_idl::sequence::StatusChangeMessage &msg) { for(int nIndex(0); nIndex < msg.execute_status_size(); nIndex++) { - kbd_idlfile::sequence::ExecuteStatusParameter statusParameter = msg.execute_status(nIndex); + iot_idl::sequence::ExecuteStatusParameter statusParameter = msg.execute_status(nIndex); if(statusParameter.statuscode() != 0) { QString strSeqName = QString::fromStdString(msg.mutable_nodelist()->seq_name()); @@ -96,7 +96,7 @@ void CSequenceDataManage::recvSeqStateChange(kbd_idlfile::sequence::StatusChange } } - kbd_idlfile::sequence::SeqNodeStatusParameter sequence = msg.nodelist(); + iot_idl::sequence::SeqNodeStatusParameter sequence = msg.nodelist(); QString strSeqName = QString::fromStdString(sequence.seq_name()); if(sequence.nodelist_size() == 0) { @@ -107,7 +107,7 @@ void CSequenceDataManage::recvSeqStateChange(kbd_idlfile::sequence::StatusChange { for(int nIndex(0); nIndex < sequence.nodelist_size(); nIndex++) { - kbd_idlfile::sequence::FucNodeStatusParameter funcNode = sequence.nodelist(nIndex); + iot_idl::sequence::FucNodeStatusParameter funcNode = sequence.nodelist(nIndex); QString strFuncName = QString::fromStdString(funcNode.fuc_name()); if(funcNode.nodelist_size() == 0) { @@ -118,7 +118,7 @@ void CSequenceDataManage::recvSeqStateChange(kbd_idlfile::sequence::StatusChange { for(int nActionIndex(0); nActionIndex < funcNode.nodelist_size(); nActionIndex++) { - kbd_idlfile::sequence::ActionNodeStatusParameter actionNode = funcNode.nodelist(nActionIndex); + iot_idl::sequence::ActionNodeStatusParameter actionNode = funcNode.nodelist(nActionIndex); QString strActionName = QString::fromStdString(actionNode.action_name()); E_EXECUTING_STATE actionState = (E_EXECUTING_STATE)actionNode.node_state(); emit sigRecvActionStateChanged(strSeqName, strFuncName, strActionName,actionState); @@ -136,8 +136,8 @@ QString CSequenceDataManage::queryLocationName(const int &nLocationID) std::string strTableName = "sys_model_location_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("description"); @@ -223,7 +223,7 @@ QString CSequenceDataManage::queryStateName(const QString &strStateTextName, con std::string strTableName = "dict_state_text_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); std::vector vecCondInfo; CONDINFO conditionName; @@ -241,7 +241,7 @@ QString CSequenceDataManage::queryStateName(const QString &strStateTextName, con vecCondInfo.push_back(conditionState); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("display_value"); @@ -263,8 +263,8 @@ QString CSequenceDataManage::queryStateName(const QString &strStateTextName, con QList CSequenceDataManage::querySequenceList(const QStringList &seqNameList) { QList sequenceList; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (!kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (!iot_public::createSysInfoInstance(spSysInfo)) { return sequenceList; } diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.h b/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.h index 34ed08ba..328b4cd4 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.h +++ b/product/src/gui/plugin/SequenceWidget/CSequenceDataManage.h @@ -20,18 +20,18 @@ class CSequenceDataManage : public QObject Q_OBJECT public: - explicit CSequenceDataManage(QObject *parent = nullptr, kbd_dbms::CDbApi *dbRead = NULL); + explicit CSequenceDataManage(QObject *parent = nullptr, iot_dbms::CDbApi *dbRead = NULL); ~CSequenceDataManage(); void initDataBase(); void initRdbDataBase(); - void recvSequenceResponse(kbd_idlfile::sequence::SeqOperateMessageAck &msg); + void recvSequenceResponse(iot_idl::sequence::SeqOperateMessageAck &msg); - void recvUserInterveneRequest(kbd_idlfile::sequence::UiRequestMessage &msg); + void recvUserInterveneRequest(iot_idl::sequence::UiRequestMessage &msg); - void recvSeqStateChange(kbd_idlfile::sequence::StatusChangeMessage &msg); + void recvSeqStateChange(iot_idl::sequence::StatusChangeMessage &msg); QString queryLocationName(const int &nLocationID); @@ -50,12 +50,12 @@ signals: void sigRecvSequenceStateChanged(const QString &seqName, const E_EXECUTING_STATE &state); void sigRecvFunctionStateChanged(const QString &seqName, const QString &funcName, const E_EXECUTING_STATE &state); void sigRecvActionStateChanged(const QString &seqName, const QString &funcName, const QString &actionName, const E_EXECUTING_STATE &state); - void sigRecvUserInterveneRequest(const kbd_idlfile::sequence::UiRequestMessage *msg); + void sigRecvUserInterveneRequest(const iot_idl::sequence::UiRequestMessage *msg); private: QMutex mutex; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccessEx * m_rtdbAccessEx; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccessEx * m_rtdbAccessEx; bool m_isInitDb; }; diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.cpp b/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.cpp index 419baf04..d0766bf0 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.cpp @@ -16,7 +16,7 @@ void CSequenceMsgHandle::setDataManager(CSequenceDataManage *mng) m_seqDataManage = mng; } -bool CSequenceMsgHandle::handleSeqOperateResponse(kbd_idlfile::sequence::SeqOperateMessageAck &msg) +bool CSequenceMsgHandle::handleSeqOperateResponse(iot_idl::sequence::SeqOperateMessageAck &msg) { if(NULL != m_seqDataManage) { @@ -25,7 +25,7 @@ bool CSequenceMsgHandle::handleSeqOperateResponse(kbd_idlfile::sequence::SeqOper return true; } -bool CSequenceMsgHandle::handleUserInterveneRequest(kbd_idlfile::sequence::UiRequestMessage &msg) +bool CSequenceMsgHandle::handleUserInterveneRequest(iot_idl::sequence::UiRequestMessage &msg) { if(NULL != m_seqDataManage) { @@ -34,7 +34,7 @@ bool CSequenceMsgHandle::handleUserInterveneRequest(kbd_idlfile::sequence::UiReq return true; } -bool CSequenceMsgHandle::handleSeqStateChange(kbd_idlfile::sequence::StatusChangeMessage &msg) +bool CSequenceMsgHandle::handleSeqStateChange(iot_idl::sequence::StatusChangeMessage &msg) { //< 不再接收顺控状态变化消息 Q_UNUSED(msg) diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.h b/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.h index c4e28177..50a46c62 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.h +++ b/product/src/gui/plugin/SequenceWidget/CSequenceMsgHandle.h @@ -5,7 +5,7 @@ class CSequenceDataManage; -class CSequenceMsgHandle : public kbd_application::CSeqForHmiApi +class CSequenceMsgHandle : public iot_app::CSeqForHmiApi { public: CSequenceMsgHandle(); @@ -14,20 +14,20 @@ public: void setDataManager(CSequenceDataManage * mng); //<1 hmi->server 发起的请求顺控操作 - //bool seqOperateRequest(kbd_idlfile::SeqOperateMessage& msg); + //bool seqOperateRequest(iot_idl::SeqOperateMessage& msg); //<2 server->hmi 请求顺控操作 的 应答 - virtual bool handleSeqOperateResponse(kbd_idlfile::sequence::SeqOperateMessageAck& msg); + virtual bool handleSeqOperateResponse(iot_idl::sequence::SeqOperateMessageAck& msg); //<1 server->hmi 发起的人工干预 请求 - virtual bool handleUserInterveneRequest(kbd_idlfile::sequence::UiRequestMessage& msg); + virtual bool handleUserInterveneRequest(iot_idl::sequence::UiRequestMessage& msg); //<2 hmi ->server 人工干预应答 - //bool userInterveneResponse(kbd_idlfile::sequence::UiRequestMessageAck& msg); + //bool userInterveneResponse(iot_idl::sequence::UiRequestMessageAck& msg); //server->hmi 顺控状态更新 - virtual bool handleSeqStateChange(kbd_idlfile::sequence::StatusChangeMessage& msg); + virtual bool handleSeqStateChange(iot_idl::sequence::StatusChangeMessage& msg); private: CSequenceDataManage * m_seqDataManage; diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.cpp b/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.cpp index 537a2079..900f8b5b 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.cpp @@ -4,8 +4,8 @@ #include "../../idl_files/RdbServerMessage.pb.h" #include -using namespace kbd_dbms; -using namespace kbd_idlfile; +using namespace iot_dbms; +using namespace iot_idl; CSequenceStateManage::CSequenceStateManage(QObject *parent, CDbApi *dbRead) : QObject(parent), @@ -133,7 +133,7 @@ void CSequenceStateManage::updataSequenceState() QMutexLocker locker(&mutex); while(m_tagRdbNetApi->checkStatus()) { - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_tagRdbNetApi->getRet(&retMsg)) { for (int nIndex(0); nIndex < retMsg.msgrecord_size(); nIndex++) @@ -155,8 +155,8 @@ void CSequenceStateManage::updataSequenceState() } } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { foreach (Sequence sequence, m_listSequence) { @@ -168,15 +168,15 @@ void CSequenceStateManage::updataSequenceState() { continue; } - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(sequence.locationID, stLocationInfo); - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoBySubsystemId(sequence.subSystemID, appInfo); m_tagRdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); QString strTableName = sequence.tagInfo.section(".", 0, 0); - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename(strTableName.toStdString()); std::string *pTagColName = query.add_strselectcolnamearr(); @@ -184,7 +184,7 @@ void CSequenceStateManage::updataSequenceState() std::string *pValColName = query.add_strselectcolnamearr(); *pValColName = "value"; - kbd_idlfile::RdbCondition *pCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pCondtion = query.add_msgcondition(); pCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pCondtion->set_strcolumnname("tag_name"); @@ -195,7 +195,7 @@ void CSequenceStateManage::updataSequenceState() pCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pCondValue->set_strvalue(tagName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_tagRdbNetApi->query(query, retMsg, true); } } @@ -207,7 +207,7 @@ void CSequenceStateManage::updataSequenceExecuteState() while(m_seqRdbNetApi->checkStatus()) { - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; if (m_seqRdbNetApi->getRet(&retMsg)) { for (int nIndex(0); nIndex < retMsg.msgrecord_size(); nIndex++) @@ -256,16 +256,16 @@ void CSequenceStateManage::updataSequenceExecuteState() return; } - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(nLocationID, stLocationInfo); - kbd_public::SAppInfo appInfo; + iot_public::SAppInfo appInfo; spSysInfo->getAppInfoByName(COMAPP, appInfo); m_seqRdbNetApi->connect(stLocationInfo.nDomainId, appInfo.nId); - kbd_idlfile::RdbQuery query; + iot_idl::RdbQuery query; query.set_strtablename("sequence_running"); std::string *pSeqColName = query.add_strselectcolnamearr(); @@ -281,7 +281,7 @@ void CSequenceStateManage::updataSequenceExecuteState() std::string *pTimeFlagColName = query.add_strselectcolnamearr(); *pTimeFlagColName = "timeflag"; - kbd_idlfile::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); + iot_idl::RdbCondition *pSequenceNameCondtion = query.add_msgcondition(); pSequenceNameCondtion->set_enlogic(ENConditionLogic::enumCondAnd); pSequenceNameCondtion->set_enrelation(ENConditionRelation::enumCondEqual); pSequenceNameCondtion->set_strcolumnname("seq_name"); @@ -290,7 +290,7 @@ void CSequenceStateManage::updataSequenceExecuteState() pSeqNameCondValue->set_edatatype(DataType::CN_DATATYPE_STRING); pSeqNameCondValue->set_strvalue(strSeqName.toStdString()); - kbd_idlfile::RdbRet retMsg; + iot_idl::RdbRet retMsg; m_seqRdbNetApi->query(query, retMsg, true); } } @@ -327,8 +327,8 @@ void CSequenceStateManage::loadStateNameMap() std::string strTableName = "dict_state_text_info"; if(m_rtdbAccessEx->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccessEx); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccessEx); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("state_text_name"); columns.push_back("actual_value"); diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.h b/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.h index 88ff2a43..a76fd177 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.h +++ b/product/src/gui/plugin/SequenceWidget/CSequenceStateManage.h @@ -18,7 +18,7 @@ class CSequenceStateManage : public QObject { Q_OBJECT public: - explicit CSequenceStateManage(QObject *parent = nullptr, kbd_dbms::CDbApi *dbRead = NULL); + explicit CSequenceStateManage(QObject *parent = nullptr, iot_dbms::CDbApi *dbRead = NULL); ~CSequenceStateManage(); signals: @@ -46,10 +46,10 @@ private: QMutex mutex; QTimer * m_timer; - kbd_dbms::CDbApi * m_pReadDb; - kbd_dbms::CRdbAccessEx * m_rtdbAccessEx; - kbd_dbms::CRdbNetApi * m_tagRdbNetApi; - kbd_dbms::CRdbNetApi * m_seqRdbNetApi; + iot_dbms::CDbApi * m_pReadDb; + iot_dbms::CRdbAccessEx * m_rtdbAccessEx; + iot_dbms::CRdbNetApi * m_tagRdbNetApi; + iot_dbms::CRdbNetApi * m_seqRdbNetApi; QList m_listSequence; QHash< QString, QMap > m_stateDescript; diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceWidget.cpp b/product/src/gui/plugin/SequenceWidget/CSequenceWidget.cpp index bdcb6770..1599f40b 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceWidget.cpp +++ b/product/src/gui/plugin/SequenceWidget/CSequenceWidget.cpp @@ -30,14 +30,14 @@ CSequenceWidget::CSequenceWidget(QWidget *parent, bool editMode) : ui->setupUi(this); qRegisterMetaType("E_SEQ_OPERATE"); qRegisterMetaType("E_EXECUTING_STATE"); - qRegisterMetaType("kbd_idlfile::sequence::UiRequestMessage"); + qRegisterMetaType("iot_idl::sequence::UiRequestMessage"); qRegisterMetaType >("SEQUENCELIST"); m_nUserId = -1; m_strUsrName = ""; m_nUserGrpId = -1; QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -47,7 +47,7 @@ CSequenceWidget::CSequenceWidget(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("sequence.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("sequence.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -164,7 +164,7 @@ void CSequenceWidget::release() } -void CSequenceWidget::initialize(int seqMode, QStringList listSequenceName, kbd_dbms::CDbApi *dbRead) +void CSequenceWidget::initialize(int seqMode, QStringList listSequenceName, iot_dbms::CDbApi *dbRead) { if(m_editMode) { @@ -477,7 +477,7 @@ void CSequenceWidget::slotRecvActionStateChanged(const QString &seqName, const Q -void CSequenceWidget::slotRecvUserInterveneRequest(const kbd_idlfile::sequence::UiRequestMessage *msg) +void CSequenceWidget::slotRecvUserInterveneRequest(const iot_idl::sequence::UiRequestMessage *msg) { if(!getSeqCtrlPerm()) { @@ -487,21 +487,21 @@ void CSequenceWidget::slotRecvUserInterveneRequest(const kbd_idlfile::sequence:: delete msg; } -void CSequenceWidget::handleUserInterveneRequest(const kbd_idlfile::sequence::UiRequestMessage &msg) +void CSequenceWidget::handleUserInterveneRequest(const iot_idl::sequence::UiRequestMessage &msg) { if(NULL != m_userInterveneRequestDialog) { return; } std::string strErrorDescription = ""; - kbd_idlfile::sequence::ExecuteStatusParameter executeStatueParameter = msg.execute_status(); + iot_idl::sequence::ExecuteStatusParameter executeStatueParameter = msg.execute_status(); if(0 != executeStatueParameter.statuscode() && executeStatueParameter.has_erro_param()) { - kbd_idlfile::sequence::ErrorParameter paramter = executeStatueParameter.erro_param(); + iot_idl::sequence::ErrorParameter paramter = executeStatueParameter.erro_param(); strErrorDescription = paramter.errordescription(); } - kbd_idlfile::sequence::SeqNodeStatusParameter sequence = msg.nodelist(); + iot_idl::sequence::SeqNodeStatusParameter sequence = msg.nodelist(); QString sequenceDescription = QString::fromStdString(sequence.seq_desc()); // foreach (Sequence locatSequence, m_listSequence) // { @@ -516,11 +516,11 @@ void CSequenceWidget::handleUserInterveneRequest(const kbd_idlfile::sequence::Ui for(int nSeqIndex(0); nSeqIndex < sequence.nodelist_size(); nSeqIndex++) { - kbd_idlfile::sequence::FucNodeStatusParameter function = sequence.nodelist(nSeqIndex); + iot_idl::sequence::FucNodeStatusParameter function = sequence.nodelist(nSeqIndex); QString functionDescription = QString::fromStdString(function.fuc_desc()); for(int nFuncIndex(0); nFuncIndex < function.nodelist_size(); nFuncIndex++) { - kbd_idlfile::sequence::ActionNodeStatusParameter action = function.nodelist(nFuncIndex); + iot_idl::sequence::ActionNodeStatusParameter action = function.nodelist(nFuncIndex); QString actionDescription = QString::fromStdString(action.action_desc()); QString content = QString("%1: [%2]\n%3: [%4]\n%5: [%6]\n").arg(tr("顺控名称")).arg(sequenceDescription).arg(tr("功能名称")).arg(functionDescription).arg(tr("动作名称")).arg(actionDescription); QString description = QString("%1 %2").arg(QString::fromStdString(strErrorDescription)).arg(tr("请求人工干预!")); @@ -543,33 +543,33 @@ void CSequenceWidget::handleUserInterveneRequest(const kbd_idlfile::sequence::Ui { type = E_Action_Skip; } - kbd_idlfile::sequence::UiRequestMessageAck uiRequestMessageAck; - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_idl::sequence::UiRequestMessageAck uiRequestMessageAck; + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { spSysInfo->getLocalNodeInfo(stNodeInfo); } - kbd_idlfile::sequence::SeqPkgHead * head = uiRequestMessageAck.mutable_pkg_head(); + iot_idl::sequence::SeqPkgHead * head = uiRequestMessageAck.mutable_pkg_head(); head->set_source_tag("hmi"); - head->set_msg_type(kbd_idlfile::sequence::enumSeqOperateMessage); + head->set_msg_type(iot_idl::sequence::enumSeqOperateMessage); head->set_source_domain(stNodeInfo.nDomainId); - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(msg.pkg_head().source_domain(), stLocationInfo); head->set_target_domain(stLocationInfo.nDomainId); head->set_para1(0); head->set_para2(0); - kbd_idlfile::sequence::ActorParameter* actor = uiRequestMessageAck.mutable_actor(); + iot_idl::sequence::ActorParameter* actor = uiRequestMessageAck.mutable_actor(); actor->set_user_id(m_nUserId); actor->set_user_groupid(m_nUserGrpId); actor->set_host_name(stNodeInfo.strName); actor->set_user_name(m_strUsrName); - kbd_idlfile::sequence::SeqNodeStatusParameter msgNodeParameter = msg.nodelist(); - kbd_idlfile::sequence::SeqNodeStatusParameter* seqNodeStatusParameter = uiRequestMessageAck.mutable_nodelist(); + iot_idl::sequence::SeqNodeStatusParameter msgNodeParameter = msg.nodelist(); + iot_idl::sequence::SeqNodeStatusParameter* seqNodeStatusParameter = uiRequestMessageAck.mutable_nodelist(); *seqNodeStatusParameter = msgNodeParameter; - uiRequestMessageAck.set_optype((kbd_idlfile::sequence::ENUiOperateType)type); + uiRequestMessageAck.set_optype((iot_idl::sequence::ENUiOperateType)type); m_seqMsgHandle->userInterveneResponse(uiRequestMessageAck); } } @@ -602,7 +602,7 @@ void CSequenceWidget::slotUpdateSequenceTimeFlag(const QString &seqName, const i // { // if(m_listSequence[nIndex].timeFlag != time) // { -// kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(m_listSequence[nIndex], E_Seq_Stop); +// iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(m_listSequence[nIndex], E_Seq_Stop); // msg.mutable_seq_node()->set_timeflag(time); // m_seqMsgHandle->seqOperateRequest(msg); // } @@ -625,7 +625,7 @@ void CSequenceWidget::seqExecute() if(E_Node_Sequence == sequence.nodeType) { model->updateSequenceState(sequence.seqName, E_Exec_Reset); - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Start); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Start); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: E_Seq_Start", sequence.seqName.toStdString().c_str()); } @@ -652,7 +652,7 @@ void CSequenceWidget::seqExecute() { if(E_Node_Sequence == sequence.nodeType) { - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: E_Seq_Start", sequence.seqName.toStdString().c_str()); } @@ -697,7 +697,7 @@ void CSequenceWidget::slotPause() { if(E_Node_Sequence == sequence.nodeType) { - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: Pause/Continue", sequence.seqName.toStdString().c_str()); } @@ -725,7 +725,7 @@ void CSequenceWidget::slotPause() if(E_Node_Sequence == sequence.nodeType) { - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, type); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: Pause/Continue", sequence.seqName.toStdString().c_str()); @@ -758,7 +758,7 @@ void CSequenceWidget::slotStop() { if(E_Node_Sequence == sequence.nodeType) { - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Stop); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Stop); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: E_Seq_Stop", sequence.seqName.toStdString().c_str()); } @@ -772,7 +772,7 @@ void CSequenceWidget::slotStop() if(E_Node_Sequence == sequence.nodeType) { - kbd_idlfile::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Stop); + iot_idl::sequence::SeqOperateMessage msg = buildSequenceRequest(sequence, E_Seq_Stop); m_seqMsgHandle->seqOperateRequest(msg); LOGINFO("SequenceMsgHandle send sequence OperateRequest! msgName: %s, msgType: E_Seq_Stop", sequence.seqName.toStdString().c_str()); @@ -783,22 +783,22 @@ void CSequenceWidget::slotStop() notify(tr("等待终止...")); } -kbd_idlfile::sequence::SeqOperateMessage CSequenceWidget::buildSequenceRequest(const Sequence &sequence, const E_SEQ_OPERATE &type) +iot_idl::sequence::SeqOperateMessage CSequenceWidget::buildSequenceRequest(const Sequence &sequence, const E_SEQ_OPERATE &type) { - kbd_public::SNodeInfo stNodeInfo; - kbd_public::CSysInfoInterfacePtr spSysInfo; - if (kbd_public::createSysInfoInstance(spSysInfo)) + iot_public::SNodeInfo stNodeInfo; + iot_public::CSysInfoInterfacePtr spSysInfo; + if (iot_public::createSysInfoInstance(spSysInfo)) { spSysInfo->getLocalNodeInfo(stNodeInfo); } - kbd_idlfile::sequence::SeqOperateMessage sequenceRequestMsg; - kbd_idlfile::sequence::SeqPkgHead * head = sequenceRequestMsg.mutable_pkg_head(); + iot_idl::sequence::SeqOperateMessage sequenceRequestMsg; + iot_idl::sequence::SeqPkgHead * head = sequenceRequestMsg.mutable_pkg_head(); head->set_source_tag("hmi"); - head->set_msg_type(kbd_idlfile::sequence::enumSeqOperateMessage); + head->set_msg_type(iot_idl::sequence::enumSeqOperateMessage); head->set_source_domain(stNodeInfo.nDomainId); - kbd_public::SLocationInfo stLocationInfo; + iot_public::SLocationInfo stLocationInfo; spSysInfo->getLocationInfoById(sequence.locationID, stLocationInfo); head->set_target_domain(stLocationInfo.nDomainId); @@ -807,13 +807,13 @@ kbd_idlfile::sequence::SeqOperateMessage CSequenceWidget::buildSequenceRequest(c head->set_para1(0); head->set_para2(0); - kbd_idlfile::sequence::SeqNodeStatusParameter* node = sequenceRequestMsg.mutable_seq_node(); + iot_idl::sequence::SeqNodeStatusParameter* node = sequenceRequestMsg.mutable_seq_node(); node->set_seq_name(sequence.seqName.toStdString()); node->set_seq_desc(sequence.seqDescription.toStdString()); - kbd_idlfile::sequence::ENSeqNodeCheckStatus checkState = (E_Mode_Action == m_seqMode) ? kbd_idlfile::sequence::enumnodePartiallyChecked : kbd_idlfile::sequence::enumNodeChecked; + iot_idl::sequence::ENSeqNodeCheckStatus checkState = (E_Mode_Action == m_seqMode) ? iot_idl::sequence::enumnodePartiallyChecked : iot_idl::sequence::enumNodeChecked; node->set_check_state(checkState); node->set_timeflag(sequence.timeFlag); - node->set_node_state((kbd_idlfile::sequence::ENSeqStatus)sequence.executeState); + node->set_node_state((iot_idl::sequence::ENSeqStatus)sequence.executeState); if(E_Mode_Action == m_seqMode) { @@ -824,23 +824,23 @@ kbd_idlfile::sequence::SeqOperateMessage CSequenceWidget::buildSequenceRequest(c { if(E_Node_Function == sequenceFunc.nodeType) { - kbd_idlfile::sequence::FucNodeStatusParameter* func = node->add_nodelist(); + iot_idl::sequence::FucNodeStatusParameter* func = node->add_nodelist(); func->set_fuc_name(sequenceFunc.funcName.toStdString()); func->set_fuc_desc(sequenceFunc.funcDescription.toStdString()); - func->set_check_state(kbd_idlfile::sequence::enumnodePartiallyChecked); + func->set_check_state(iot_idl::sequence::enumnodePartiallyChecked); func->set_timeflag(sequenceFunc.timeFlag); - func->set_node_state((kbd_idlfile::sequence::ENSeqStatus)sequenceFunc.executeState); + func->set_node_state((iot_idl::sequence::ENSeqStatus)sequenceFunc.executeState); QList listSequence = model->sequenceData(); foreach (Sequence sequenceAction, listSequence) { if(E_Node_Action == sequenceAction.nodeType && sequenceFunc.funcName == sequenceAction.funcName) { - kbd_idlfile::sequence::ActionNodeStatusParameter* action = func->add_nodelist(); + iot_idl::sequence::ActionNodeStatusParameter* action = func->add_nodelist(); action->set_action_name(sequenceAction.actionName.toStdString()); action->set_action_desc(sequenceAction.actionDescription.toStdString()); - action->set_check_state((kbd_idlfile::sequence::ENSeqNodeCheckStatus)sequenceAction.checkState); + action->set_check_state((iot_idl::sequence::ENSeqNodeCheckStatus)sequenceAction.checkState); action->set_timeflag(sequenceAction.timeFlag); - action->set_node_state((kbd_idlfile::sequence::ENSeqStatus)sequenceAction.executeState); + action->set_node_state((iot_idl::sequence::ENSeqStatus)sequenceAction.executeState); } } } @@ -848,12 +848,12 @@ kbd_idlfile::sequence::SeqOperateMessage CSequenceWidget::buildSequenceRequest(c } } - kbd_idlfile::sequence::ActorParameter* actor = sequenceRequestMsg.mutable_actor(); + iot_idl::sequence::ActorParameter* actor = sequenceRequestMsg.mutable_actor(); actor->set_user_id(m_nUserId); actor->set_user_groupid(m_nUserGrpId); actor->set_host_name(stNodeInfo.strName); actor->set_user_name(m_strUsrName); - sequenceRequestMsg.set_opreate_type((kbd_idlfile::sequence::ENSeqOperateType)type); + sequenceRequestMsg.set_opreate_type((iot_idl::sequence::ENSeqOperateType)type); return sequenceRequestMsg; } @@ -914,7 +914,7 @@ void CSequenceWidget::notify(const QString &strTips) bool CSequenceWidget::getSeqCtrlPerm() { //<权限处理 - kbd_service::CPermMngApiPtr permManage = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permManage = iot_service::getPermMngInstance("base"); permManage->PermDllInit(); int nLevel; diff --git a/product/src/gui/plugin/SequenceWidget/CSequenceWidget.h b/product/src/gui/plugin/SequenceWidget/CSequenceWidget.h index 1063165a..326a2749 100644 --- a/product/src/gui/plugin/SequenceWidget/CSequenceWidget.h +++ b/product/src/gui/plugin/SequenceWidget/CSequenceWidget.h @@ -48,7 +48,7 @@ public: void release(); public slots: - void initialize(int seqMode = -1, QStringList listSequenceName = QStringList(), kbd_dbms::CDbApi *dbRead = NULL); + void initialize(int seqMode = -1, QStringList listSequenceName = QStringList(), iot_dbms::CDbApi *dbRead = NULL); void loadSequenceData(QStringList listSequenceName); @@ -71,14 +71,14 @@ protected slots: void slotRecvSequenceStateChanged(const QString &seqName, const E_EXECUTING_STATE &state); void slotRecvFunctionStateChanged(const QString &seqName, const QString &funcName, const E_EXECUTING_STATE &state); void slotRecvActionStateChanged(const QString &seqName, const QString &funcName, const QString &actionName, const E_EXECUTING_STATE &state); - void slotRecvUserInterveneRequest(const kbd_idlfile::sequence::UiRequestMessage *msg); + void slotRecvUserInterveneRequest(const iot_idl::sequence::UiRequestMessage *msg); void slotUpdateActionActualState(const QString &seqName, const QString &funcName, const QString &actionName, const QString &state); void slotUpdateSequenceTimeFlag(const QString &seqName, const int &time); private: void seqExecute(); - kbd_idlfile::sequence::SeqOperateMessage buildSequenceRequest(const Sequence &sequence, const E_SEQ_OPERATE &type); - void handleUserInterveneRequest(const kbd_idlfile::sequence::UiRequestMessage &msg); + iot_idl::sequence::SeqOperateMessage buildSequenceRequest(const Sequence &sequence, const E_SEQ_OPERATE &type); + void handleUserInterveneRequest(const iot_idl::sequence::UiRequestMessage &msg); QString operateDescription(const E_SEQ_OPERATE &type); QString stateDescription(const E_EXECUTING_STATE &state); void notify(const QString &strTips); @@ -112,7 +112,7 @@ private: bool m_isGuard; }; -Q_DECLARE_METATYPE(kbd_idlfile::sequence::UiRequestMessage) +Q_DECLARE_METATYPE(iot_idl::sequence::UiRequestMessage) Q_DECLARE_METATYPE(QList) #endif // CSEQUENCEWIDGET_H diff --git a/product/src/gui/plugin/SequenceWidget/main.cpp b/product/src/gui/plugin/SequenceWidget/main.cpp index 7b799427..32d911d5 100644 --- a/product/src/gui/plugin/SequenceWidget/main.cpp +++ b/product/src/gui/plugin/SequenceWidget/main.cpp @@ -7,11 +7,11 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - kbd_public::StartLogSystem(QString("log_hmi.properties").toUtf8().data(), + iot_public::StartLogSystem(QString("log_hmi.properties").toUtf8().data(), "hmi", "sequence"); - kbd_net::initMsgBus("Sequence", "1", true); - LOGINFO("kbd_net::initMsgBus"); + iot_net::initMsgBus("Sequence", "1", true); + LOGINFO("iot_net::initMsgBus"); { CSequenceWidget w(0, false); w.initialize(E_Mode_Action, QStringList() << "dfzsd"); @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) } - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.cpp b/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.cpp index e3b580ed..9d9d64fa 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.cpp +++ b/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.cpp @@ -95,7 +95,7 @@ QList CDataManage::getDevInfoBySerial(const QString &serial) CDataManage::CDataManage() { - kbd_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); + iot_dbms::CDbApi objReadDb(DB_CONN_MODEL_READ); if(!objReadDb.open()) { return; @@ -108,7 +108,7 @@ CDataManage::CDataManage() loadFesDigitalTx(&objReadDb); } -void CDataManage::loadLocation(kbd_dbms::CDbApi *pReadDb) +void CDataManage::loadLocation(iot_dbms::CDbApi *pReadDb) { QSqlQuery objQuery; QList listColName; @@ -125,7 +125,7 @@ void CDataManage::loadLocation(kbd_dbms::CDbApi *pReadDb) } } -void CDataManage::loadChan(kbd_dbms::CDbApi *pReadDb) +void CDataManage::loadChan(iot_dbms::CDbApi *pReadDb) { QSqlQuery objQuery; QList listColName; @@ -142,15 +142,15 @@ void CDataManage::loadChan(kbd_dbms::CDbApi *pReadDb) } } -void CDataManage::loadRtu(kbd_dbms::CDbApi *pReadDb) +void CDataManage::loadRtu(iot_dbms::CDbApi *pReadDb) { QSqlQuery objQuery; QList listColName; listColName << "TAG_NAME"; listColName << "DESCRIPTION"; listColName << "CHAN_TAG"; - QList listOrderBy; - listOrderBy << kbd_dbms::CDbOrder("RTU_NO", kbd_dbms::CDbOrder::ORDER_ASC); + QList listOrderBy; + listOrderBy << iot_dbms::CDbOrder("RTU_NO", iot_dbms::CDbOrder::ORDER_ASC); if(!pReadDb->select("fes_rtu_para", listColName, listOrderBy, objQuery)) { @@ -172,7 +172,7 @@ void CDataManage::loadRtu(kbd_dbms::CDbApi *pReadDb) } } -void CDataManage::loadFesDevInfo(kbd_dbms::CDbApi *pReadDb) +void CDataManage::loadFesDevInfo(iot_dbms::CDbApi *pReadDb) { QSqlQuery objQuery; QList listColName; @@ -199,7 +199,7 @@ void CDataManage::loadFesDevInfo(kbd_dbms::CDbApi *pReadDb) } } -void CDataManage::loadFesDigitalTx(kbd_dbms::CDbApi *pReadDb) +void CDataManage::loadFesDigitalTx(iot_dbms::CDbApi *pReadDb) { QSqlQuery objQuery; diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.h b/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.h index 3acbd2e0..1776e1f8 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.h +++ b/product/src/gui/plugin/SerialDevStatusWidget/CDataManage.h @@ -25,11 +25,11 @@ public: private: CDataManage(); - void loadLocation(kbd_dbms::CDbApi *pReadDb); - void loadChan(kbd_dbms::CDbApi *pReadDb); - void loadRtu(kbd_dbms::CDbApi *pReadDb); - void loadFesDevInfo(kbd_dbms::CDbApi *pReadDb); - void loadFesDigitalTx(kbd_dbms::CDbApi *pReadDb); + void loadLocation(iot_dbms::CDbApi *pReadDb); + void loadChan(iot_dbms::CDbApi *pReadDb); + void loadRtu(iot_dbms::CDbApi *pReadDb); + void loadFesDevInfo(iot_dbms::CDbApi *pReadDb); + void loadFesDigitalTx(iot_dbms::CDbApi *pReadDb); private: static CDataManage * m_pInstance; diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.cpp b/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.cpp index 1ddfabee..b6a16ce8 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.cpp +++ b/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.cpp @@ -48,7 +48,7 @@ void CRealDataCollect::initMsg() { if(m_pMbComm == NULL) { - m_pMbComm = new kbd_net::CMbCommunicator("SerialDevStatusWidget"); + m_pMbComm = new iot_net::CMbCommunicator("SerialDevStatusWidget"); } } @@ -65,7 +65,7 @@ void CRealDataCollect::clearMsg() { if(m_pMbComm) { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; while(m_pMbComm->recvMsg(objMsg, 0)) {} } @@ -106,14 +106,14 @@ void CRealDataCollect::recvMessage() try { - kbd_net::CMbMessage objMsg; + iot_net::CMbMessage objMsg; for(int i = 0; i < 6; i++) { if(m_pMbComm->recvMsg(objMsg, 0)) { if(objMsg.isValid()) { - if(objMsg.getMsgType() != kbd_idlfile::MT_DP_CHANGE_DATA) + if(objMsg.getMsgType() != iot_idl::MT_DP_CHANGE_DATA) { continue; } @@ -165,16 +165,16 @@ void CRealDataCollect::processChangeData() } } -int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) +int CRealDataCollect::parserMsg(const iot_net::CMbMessage &msg) { - kbd_idlfile::SRealTimeDataPkg changeDataPackage; + iot_idl::SRealTimeDataPkg changeDataPackage; try { changeDataPackage.ParseFromArray(msg.getDataPtr(),(int)msg.getDataSize()); int aiSize = changeDataPackage.stairtd_size(); if(aiSize > 0) { - kbd_idlfile::SAiRealTimeData aiStru; + iot_idl::SAiRealTimeData aiStru; QString tagName; float value; uint status; @@ -191,7 +191,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int diSize = changeDataPackage.stdirtd_size(); if(diSize > 0) { - kbd_idlfile::SDiRealTimeData diStu; + iot_idl::SDiRealTimeData diStu; QString tagName; int value; uint status; @@ -208,7 +208,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int piSize = changeDataPackage.stpirtd_size(); if(piSize > 0) { - kbd_idlfile::SPiRealTimeData piStu; + iot_idl::SPiRealTimeData piStu; QString tagName; double value; uint status; @@ -225,7 +225,7 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int miSize = changeDataPackage.stmirtd_size(); if(miSize > 0) { - kbd_idlfile::SMiRealTimeData miStu; + iot_idl::SMiRealTimeData miStu; QString tagName; int value; uint status; @@ -242,44 +242,44 @@ int CRealDataCollect::parserMsg(const kbd_net::CMbMessage &msg) int utSize = changeDataPackage.sttblrtd_size(); if(utSize > 0) { - kbd_idlfile::STableRealTimeData uiStu; + iot_idl::STableRealTimeData uiStu; QString tagName; QVariant value; for(int i = 0;i < utSize; i++) { uiStu = changeDataPackage.sttblrtd(i); tagName = QString::fromStdString(uiStu.strtagname()); - kbd_idlfile::SVariable temp = uiStu.varvalue(); - if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_BOOL) + iot_idl::SVariable temp = uiStu.varvalue(); + if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_BOOL) { value = QVariant::fromValue(temp.bvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_UINT32) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_UINT32) { value = QVariant::fromValue(temp.uvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_INT32) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_INT32) { value = QVariant::fromValue(temp.nvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_UINT64) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_UINT64) { value = QVariant::fromValue(temp.ulvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_INT64) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_INT64) { value = QVariant::fromValue(temp.lvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_FLOAT) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_FLOAT) { value = QVariant::fromValue(temp.fvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_DOUBLE) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_DOUBLE) { value = QVariant::fromValue(temp.dvalue()); } - else if(temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_STRING || - temp.edatatype() == kbd_idlfile::DataType::CN_DATATYPE_BYTES) + else if(temp.edatatype() == iot_idl::DataType::CN_DATATYPE_STRING || + temp.edatatype() == iot_idl::DataType::CN_DATATYPE_BYTES) { QString str = QString::fromStdString(temp.strvalue()); value = QVariant::fromValue(str); diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.h b/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.h index d8f1bea9..00e67155 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.h +++ b/product/src/gui/plugin/SerialDevStatusWidget/CRealDataCollect.h @@ -26,7 +26,7 @@ private: bool addSub(); bool delSub(); - int parserMsg(const kbd_net::CMbMessage &); + int parserMsg(const iot_net::CMbMessage &); private slots: void recvMessage(); @@ -40,7 +40,7 @@ signals: void signal_updateUi(QMap uiMap); private: - kbd_net::CMbCommunicator *m_pMbComm; + iot_net::CMbCommunicator *m_pMbComm; QTimer * m_pTimer; int m_nTimeCount; QMap> m_aiMap; diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.cpp b/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.cpp index 0832ed6a..aa282340 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.cpp +++ b/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.cpp @@ -141,7 +141,7 @@ void CSerialDevStatusWidget::soltExportExcel() void CSerialDevStatusWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -150,7 +150,7 @@ void CSerialDevStatusWidget::initStyle() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("serialStatus.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("serialStatus.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -245,7 +245,7 @@ void CSerialDevStatusWidget::initData() void CSerialDevStatusWidget::initConnect() { - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); connect(m_pTreeWidget, &QTreeWidget::itemClicked, this, &CSerialDevStatusWidget::slotItemClicked); connect(CRealDataCollect::instance(), &CRealDataCollect::signal_updateDi, this, &CSerialDevStatusWidget::slotUpdateDi); diff --git a/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.h b/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.h index a7442eea..5cdf736f 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.h +++ b/product/src/gui/plugin/SerialDevStatusWidget/CSerialDevStatusWidget.h @@ -48,7 +48,7 @@ private: QTableView * m_pTableView; CSeriaDevTableModel * m_pTableModel; QPushButton * m_btnExport; - kbd_service::CDpcdaForApp *m_pDpcdaForApp; + iot_service::CDpcdaForApp *m_pDpcdaForApp; QMap m_serialStatusMap; }; diff --git a/product/src/gui/plugin/SerialDevStatusWidget/main.cpp b/product/src/gui/plugin/SerialDevStatusWidget/main.cpp index b6be7c08..81c6e4f4 100644 --- a/product/src/gui/plugin/SerialDevStatusWidget/main.cpp +++ b/product/src/gui/plugin/SerialDevStatusWidget/main.cpp @@ -6,13 +6,13 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { QApplication a(argc, argv); @@ -22,10 +22,10 @@ int main(int argc, char *argv[]) a.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/ShiftWidget/CRecordWidget.cpp b/product/src/gui/plugin/ShiftWidget/CRecordWidget.cpp index 8c526ffe..6d4905f2 100644 --- a/product/src/gui/plugin/ShiftWidget/CRecordWidget.cpp +++ b/product/src/gui/plugin/ShiftWidget/CRecordWidget.cpp @@ -2,7 +2,7 @@ #include "ui_CRecordWidget.h" #include -CRecordWidget::CRecordWidget(QWidget *parent, kbd_dbms::CDbApi *dbRead, kbd_dbms::CDbApi *dbWrite) : +CRecordWidget::CRecordWidget(QWidget *parent, iot_dbms::CDbApi *dbRead, iot_dbms::CDbApi *dbWrite) : QDialog(parent), ui(new Ui::CRecordWidget), m_pReadDb(dbRead), diff --git a/product/src/gui/plugin/ShiftWidget/CRecordWidget.h b/product/src/gui/plugin/ShiftWidget/CRecordWidget.h index 8a8771f6..a4a8a03c 100644 --- a/product/src/gui/plugin/ShiftWidget/CRecordWidget.h +++ b/product/src/gui/plugin/ShiftWidget/CRecordWidget.h @@ -14,7 +14,7 @@ class CRecordWidget : public QDialog Q_OBJECT public: - explicit CRecordWidget(QWidget *parent = 0, kbd_dbms::CDbApi *dbRead = NULL, kbd_dbms::CDbApi *dbWrite = NULL); + explicit CRecordWidget(QWidget *parent = 0, iot_dbms::CDbApi *dbRead = NULL, iot_dbms::CDbApi *dbWrite = NULL); ~CRecordWidget(); void Init(); @@ -24,8 +24,8 @@ private slots: private: Ui::CRecordWidget *ui; - kbd_dbms::CDbApi *m_pReadDb; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pWriteDb; std::vector Records; }; diff --git a/product/src/gui/plugin/ShiftWidget/CShiftWidget.cpp b/product/src/gui/plugin/ShiftWidget/CShiftWidget.cpp index f1433d2c..394752ce 100644 --- a/product/src/gui/plugin/ShiftWidget/CShiftWidget.cpp +++ b/product/src/gui/plugin/ShiftWidget/CShiftWidget.cpp @@ -6,7 +6,7 @@ #include #include #include "pub_utility_api/FileStyle.h" -//using namespace kbd_dbms; +//using namespace iot_dbms; CShiftWidget::CShiftWidget(QWidget *parent, bool editMode) : QWidget(parent), @@ -17,7 +17,7 @@ CShiftWidget::CShiftWidget(QWidget *parent, bool editMode) : { ui->setupUi(this); QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -27,7 +27,7 @@ CShiftWidget::CShiftWidget(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("shift.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("shift.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -96,10 +96,10 @@ CShiftWidget::~CShiftWidget() void CShiftWidget::InitDb() { - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_MODEL_READ); m_pReadDb->open(); - m_pWriteDb = new kbd_dbms::CDbApi(DB_CONN_MODEL_WRITE); + m_pWriteDb = new iot_dbms::CDbApi(DB_CONN_MODEL_WRITE); m_pWriteDb->open(); } diff --git a/product/src/gui/plugin/ShiftWidget/CShiftWidget.h b/product/src/gui/plugin/ShiftWidget/CShiftWidget.h index 1dd68196..61ac368a 100644 --- a/product/src/gui/plugin/ShiftWidget/CShiftWidget.h +++ b/product/src/gui/plugin/ShiftWidget/CShiftWidget.h @@ -50,8 +50,8 @@ private: bool m_isEditMode; - kbd_dbms::CDbApi *m_pReadDb; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pWriteDb; std::vector Records; std::vector Records_Inquire; diff --git a/product/src/gui/plugin/ShiftWidget/HandoverWidget.cpp b/product/src/gui/plugin/ShiftWidget/HandoverWidget.cpp index 4c90cc75..1594b043 100644 --- a/product/src/gui/plugin/ShiftWidget/HandoverWidget.cpp +++ b/product/src/gui/plugin/ShiftWidget/HandoverWidget.cpp @@ -9,9 +9,9 @@ #include "Common.h" #include "pub_logger_api/logger.h" -using namespace kbd_public; +using namespace iot_public; -HandoverWidget::HandoverWidget(QWidget *parent,kbd_dbms::CDbApi *dbRead,kbd_dbms::CDbApi *dbWrite,bool isFarm,QString begin_time) : +HandoverWidget::HandoverWidget(QWidget *parent,iot_dbms::CDbApi *dbRead,iot_dbms::CDbApi *dbWrite,bool isFarm,QString begin_time) : QDialog(parent), ui(new Ui::HandoverWidget), m_pReadDb(dbRead), @@ -443,7 +443,7 @@ void HandoverWidget::on_ConfirmButton_clicked() return; } - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { if(PERM_NORMAL>permMngPtr->CheckUserValid(ui->NameEdit->text().toStdString().data(),ui->PasswordEdit->text().toStdString().data())) @@ -560,7 +560,7 @@ void HandoverWidget::on_SignInButton_clicked() return; } - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { if(PERM_NORMAL != permMngPtr->CheckUserValid(ui->NameEdit->text().toStdString().data(),ui->PasswordEdit->text().toStdString().data())) diff --git a/product/src/gui/plugin/ShiftWidget/HandoverWidget.h b/product/src/gui/plugin/ShiftWidget/HandoverWidget.h index b7af3efc..45c039de 100644 --- a/product/src/gui/plugin/ShiftWidget/HandoverWidget.h +++ b/product/src/gui/plugin/ShiftWidget/HandoverWidget.h @@ -7,7 +7,7 @@ #include "perm_mng_api/PermMngApi.h" #include "QueryThread.h" -using namespace kbd_service; +using namespace iot_service; namespace Ui { class HandoverWidget; @@ -18,7 +18,7 @@ class HandoverWidget : public QDialog Q_OBJECT public: - explicit HandoverWidget(QWidget *parent = 0,kbd_dbms::CDbApi *dbRead = NULL,kbd_dbms::CDbApi *dbWrite = NULL,bool isFarm = true,QString begin_time=""); + explicit HandoverWidget(QWidget *parent = 0,iot_dbms::CDbApi *dbRead = NULL,iot_dbms::CDbApi *dbWrite = NULL,bool isFarm = true,QString begin_time=""); ~HandoverWidget(); void Init(); @@ -59,8 +59,8 @@ protected slots: private: Ui::HandoverWidget *ui; - kbd_dbms::CDbApi *m_pReadDb; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pWriteDb; bool m_isFarm; QString m_begin_time; diff --git a/product/src/gui/plugin/ShiftWidget/QueryThread.cpp b/product/src/gui/plugin/ShiftWidget/QueryThread.cpp index 828c8125..b19c4107 100644 --- a/product/src/gui/plugin/ShiftWidget/QueryThread.cpp +++ b/product/src/gui/plugin/ShiftWidget/QueryThread.cpp @@ -3,7 +3,7 @@ #include "Common.h" #include "pub_logger_api/logger.h" -using namespace kbd_public; +using namespace iot_public; QueryThread::QueryThread() { @@ -11,7 +11,7 @@ QueryThread::QueryThread() isEvent=false; isEvent_Operate=false; loadXml(); - m_pReadDb = new kbd_dbms::CDbApi(DB_CONN_HIS_READ); + m_pReadDb = new iot_dbms::CDbApi(DB_CONN_HIS_READ); m_pReadDb->open(); } diff --git a/product/src/gui/plugin/ShiftWidget/QueryThread.h b/product/src/gui/plugin/ShiftWidget/QueryThread.h index dc70dbba..4794a3ad 100644 --- a/product/src/gui/plugin/ShiftWidget/QueryThread.h +++ b/product/src/gui/plugin/ShiftWidget/QueryThread.h @@ -35,7 +35,7 @@ private: std::vector m_Events; std::vector m_Events_Operates; - kbd_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pReadDb; QList m_keyAlmLevelList; }; diff --git a/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.cpp b/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.cpp index 228355fb..ac084af1 100644 --- a/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.cpp +++ b/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.cpp @@ -2,7 +2,7 @@ #include "ui_SelectGroupWidget.h" #include -SelectGroupWidget::SelectGroupWidget(QWidget *parent, kbd_dbms::CDbApi *dbRead, kbd_dbms::CDbApi *dbWrite) : +SelectGroupWidget::SelectGroupWidget(QWidget *parent, iot_dbms::CDbApi *dbRead, iot_dbms::CDbApi *dbWrite) : QDialog(parent), m_pReadDb(dbRead), m_pWriteDb(dbWrite), diff --git a/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.h b/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.h index 8815a22e..f1eeca87 100644 --- a/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.h +++ b/product/src/gui/plugin/ShiftWidget/SelectGroupWidget.h @@ -14,7 +14,7 @@ class SelectGroupWidget : public QDialog Q_OBJECT public: - explicit SelectGroupWidget(QWidget *parent = 0,kbd_dbms::CDbApi *dbRead = NULL,kbd_dbms::CDbApi *dbWrite = NULL); + explicit SelectGroupWidget(QWidget *parent = 0,iot_dbms::CDbApi *dbRead = NULL,iot_dbms::CDbApi *dbWrite = NULL); ~SelectGroupWidget(); private slots: void on_OkButton_clicked(); @@ -25,8 +25,8 @@ private: private: Ui::SelectGroupWidget *ui; - kbd_dbms::CDbApi *m_pReadDb; - kbd_dbms::CDbApi *m_pWriteDb; + iot_dbms::CDbApi *m_pReadDb; + iot_dbms::CDbApi *m_pWriteDb; std::vector m_Groups; std::vector m_Date_Groups; std::vector Users; diff --git a/product/src/gui/plugin/SimOptWidget/CSimOptWidget.cpp b/product/src/gui/plugin/SimOptWidget/CSimOptWidget.cpp index 3c6facce..93cf85de 100644 --- a/product/src/gui/plugin/SimOptWidget/CSimOptWidget.cpp +++ b/product/src/gui/plugin/SimOptWidget/CSimOptWidget.cpp @@ -11,9 +11,9 @@ #include "pub_sysinfo_api/SysInfoApi.h" #include "dbms/db_api_ex/CDbApi.h" -using namespace kbd_dbms; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_dbms; +using namespace iot_public; +using namespace iot_service; CSimOptWidget::CSimOptWidget(bool editMode, QWidget *parent) : QWidget(parent), @@ -43,7 +43,7 @@ CSimOptWidget::~CSimOptWidget() void CSimOptWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -52,7 +52,7 @@ void CSimOptWidget::initStyleSheet() qssfile1.close(); } -// strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; +// strFullPath = iot_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; // QFile qssfile2(QString::fromStdString(strFullPath)); // qssfile2.open(QFile::ReadOnly); // if (qssfile2.isOpen()) @@ -73,7 +73,7 @@ void CSimOptWidget::initView() bool CSimOptWidget::permCheck(int location, int region) { -// kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); +// iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); // QString mess; // if(permMngPtr != NULL) // { @@ -146,7 +146,7 @@ bool CSimOptWidget::checkFilterFilePath(const QString &file) void CSimOptWidget::refeshTree() { - kbd_dbms::CDbApi * m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); + iot_dbms::CDbApi * m_pReadDb = new CDbApi(DB_CONN_MODEL_READ); if(! m_pReadDb->open()) { delete m_pReadDb; @@ -177,7 +177,7 @@ void CSimOptWidget::refeshTree() bool CSimOptWidget::checkUserPerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); diff --git a/product/src/gui/plugin/SimOptWidget/main.cpp b/product/src/gui/plugin/SimOptWidget/main.cpp index 4efa32b0..719d7734 100644 --- a/product/src/gui/plugin/SimOptWidget/main.cpp +++ b/product/src/gui/plugin/SimOptWidget/main.cpp @@ -8,12 +8,12 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); -// kbd_public::StartLogSystem("HMI", "hmi"); -// if (!(kbd_net::initMsgBus("HMI", "HMI"))) +// iot_public::StartLogSystem("HMI", "hmi"); +// if (!(iot_net::initMsgBus("HMI", "HMI"))) // { // return -1; // } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) a.exec(); } //<释放消息总线 -// kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); +// iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.cpp b/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.cpp index 0013ac58..e86de10e 100644 --- a/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.cpp +++ b/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.cpp @@ -41,7 +41,7 @@ void CRelaySettingMsgMng::slotcmd(const QList &keyList, const QList &keyList, const QListrecvMsg(msg, 50)) { if(msg.getMsgType() != MT_OPT_COMMON_UP) @@ -129,7 +129,7 @@ void CRelaySettingMsgMng::initMsg() { if(m_communicator == Q_NULLPTR) { - m_communicator = new kbd_net::CMbCommunicator(); + m_communicator = new iot_net::CMbCommunicator(); } } @@ -157,7 +157,7 @@ bool CRelaySettingMsgMng::delSub(int appID, int channel) { m_communicator->delSub(appID, channel); } - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; while (m_communicator->recvMsg(msg, 0)) { } diff --git a/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.h b/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.h index 97dca3e5..5fd3a39b 100644 --- a/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.h +++ b/product/src/gui/plugin/TelBookWidget/CRelaySettingMsgMng.h @@ -12,8 +12,8 @@ #include "pub_sysinfo_api/SysInfoApi.h" #include "perm_mng_api/PermMngApi.h" -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_service; class CRelaySettingMsgMng : public QObject { @@ -65,10 +65,10 @@ private: void affirmTest(RelayCmdReply &relayCmdReply,const QString &cmd); void editGroupTest(RelayCmdReply &relayCmdReply,const QString &cmd); private: - kbd_net::CMbCommunicator *m_communicator; + iot_net::CMbCommunicator *m_communicator; QTimer *m_timer; - kbd_public::CSysInfoInterfacePtr m_ptrSysInfo; + iot_public::CSysInfoInterfacePtr m_ptrSysInfo; CPermMngApiPtr m_permMng; std::string m_curRtu; diff --git a/product/src/gui/plugin/TelBookWidget/CTelBookWidget.cpp b/product/src/gui/plugin/TelBookWidget/CTelBookWidget.cpp index eafa2422..85c5861f 100644 --- a/product/src/gui/plugin/TelBookWidget/CTelBookWidget.cpp +++ b/product/src/gui/plugin/TelBookWidget/CTelBookWidget.cpp @@ -39,7 +39,7 @@ CTelBookWidget::~CTelBookWidget() void CTelBookWidget::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -49,7 +49,7 @@ void CTelBookWidget::initStyleSheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("relaySetting.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/TelBookWidget/CTelBookWidget.h b/product/src/gui/plugin/TelBookWidget/CTelBookWidget.h index 989e97f5..4b57a238 100644 --- a/product/src/gui/plugin/TelBookWidget/CTelBookWidget.h +++ b/product/src/gui/plugin/TelBookWidget/CTelBookWidget.h @@ -31,8 +31,8 @@ enum EN_RELAY_TREE_TYPE EN_RELAY_TREE_CHANL = 20002 }; -using namespace kbd_public; -using namespace kbd_service; +using namespace iot_public; +using namespace iot_service; class CTelBookWidget : public QWidget { diff --git a/product/src/gui/plugin/TelBookWidget/main.cpp b/product/src/gui/plugin/TelBookWidget/main.cpp index b6f90ce9..84295aae 100644 --- a/product/src/gui/plugin/TelBookWidget/main.cpp +++ b/product/src/gui/plugin/TelBookWidget/main.cpp @@ -7,13 +7,13 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - kbd_public::StartLogSystem("HMI", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("HMI", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) } //<释放消息总线 - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/TrendCurves/CHisDataManage.cpp b/product/src/gui/plugin/TrendCurves/CHisDataManage.cpp index 89ae3420..7918993d 100644 --- a/product/src/gui/plugin/TrendCurves/CHisDataManage.cpp +++ b/product/src/gui/plugin/TrendCurves/CHisDataManage.cpp @@ -3,7 +3,7 @@ #include "sample_server_api/SampleDefine.h" #include "CTrendInfoManage.h" #include "pub_logger_api/logger.h" -using namespace kbd_dbms; +using namespace iot_dbms; int CHisDataManage::m_nProcessNumber = 0; @@ -98,10 +98,10 @@ void CHisDataManage::release() delete this; } -bool CHisDataManage::getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr) +bool CHisDataManage::getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr) { //< 不使用getOneUseableConn()返回的正式库测试 - // ptr.reset(new kbd_dbms::CTsdbConn("127.0.0.1", -1, "iscs6000", "", "")); + // ptr.reset(new iot_dbms::CTsdbConn("127.0.0.1", -1, "iscs6000", "", "")); // return true; if(m_tsdbConnPtr != NULL) { @@ -196,7 +196,7 @@ void CHisDataManage::queryHistoryOriginalData(std::vector *vecMpK double nIntervalSecs = SAMPLE_CYC_MIN * 60 * 1000; std::vector *> *vecResult = new std::vector *>(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { for(size_t nIndex(0); nIndex < vecMpKey->size(); nIndex++) @@ -235,7 +235,7 @@ void CHisDataManage::queryHistoryPolymericData(std::vector *vecMp double nIntervalSecs = SAMPLE_CYC_MIN * 60 * 1000; std::vector *> *vecResult = new std::vector *>(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { for(size_t nIndex(0); nIndex < vecMpKey->size(); nIndex++) @@ -271,9 +271,9 @@ void CHisDataManage::queryHistoryComputeData(std::vector *vecMpKe m_TsdbExcuting = true; } - std::vector *> *> > cmResult; + std::vector *> *> > cmResult; - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { for(size_t nCmIndex(0); nCmIndex < vecCM.size(); nCmIndex++) @@ -289,7 +289,7 @@ void CHisDataManage::queryHistoryComputeData(std::vector *vecMpKe { LOGINFO("TrendCurve CHisDataManage::queryHistoryComputeData: 查询超时!"); } - std::pair *> *> tmp; + std::pair *> *> tmp; tmp.first = vecCM[nCmIndex]; tmp.second = vecResult; cmResult.push_back(tmp); @@ -319,7 +319,7 @@ void CHisDataManage::queryHistoryEvents(std::vector *vecMpKey, do std::vector *> *vecResult = new std::vector *>(); - kbd_dbms::CTsdbConnPtr tsdbConnPtr; + iot_dbms::CTsdbConnPtr tsdbConnPtr; if(getValidTsdbConnPtr(tsdbConnPtr)) { for(size_t nIndex(0); nIndex < vecMpKey->size(); nIndex++) diff --git a/product/src/gui/plugin/TrendCurves/CHisDataManage.h b/product/src/gui/plugin/TrendCurves/CHisDataManage.h index 5e672711..bcfdf675 100644 --- a/product/src/gui/plugin/TrendCurves/CHisDataManage.h +++ b/product/src/gui/plugin/TrendCurves/CHisDataManage.h @@ -25,7 +25,7 @@ enum E_His_Type struct MeasurementPoint { - kbd_dbms::EnMeasPiontType type; //< 测点类型 + iot_dbms::EnMeasPiontType type; //< 测点类型 const QString strTagName; //< 测点TAG名 }; @@ -38,14 +38,14 @@ struct TsdbCommand lower = -1.; upper = -1.; nGroupBySec = -1; - vecMethod = std::vector{kbd_dbms::CM_NULL}; + vecMethod = std::vector{iot_dbms::CM_NULL}; } E_His_Type type; - std::vector * pVecMpKey; + std::vector * pVecMpKey; double lower; double upper; int nGroupBySec; - std::vector vecMethod; + std::vector vecMethod; }; class CHisDataManage : public QObject @@ -58,50 +58,50 @@ public: bool isTsdbExuting(); signals: - void sigupdateHisOriginalData(std::vector *vecMpKey, - std::vector *> *vecResult, + void sigupdateHisOriginalData(std::vector *vecMpKey, + std::vector *> *vecResult, E_Data_Type type = E_HISTORY); - void sigHistoryPolymericData(std::vector *vecMpKey, - std::vector *> *vecResult, + void sigHistoryPolymericData(std::vector *vecMpKey, + std::vector *> *vecResult, int nGroupBySec); - void sigHistoryComputeData(std::vector *vecMpKey, - std::vector *> *> > cmResult); + void sigHistoryComputeData(std::vector *vecMpKey, + std::vector *> *> > cmResult); - void sigHistoryEvent(std::vector *vecMpKey, - std::vector *> *vecResult); + void sigHistoryEvent(std::vector *vecMpKey, + std::vector *> *vecResult); void sigHisSearch(bool enable); public slots: void release(); - void postTsdbCommandQueue(E_His_Type type, std::vector *vecMpKey, + void postTsdbCommandQueue(E_His_Type type, std::vector *vecMpKey, double lower, double upper, int nGroupBySec = -1, - std::vector vecCM = std::vector{kbd_dbms::CM_NULL}); + std::vector vecCM = std::vector{iot_dbms::CM_NULL}); - void queryHistoryOriginalData(std::vector *vecMpKey, + void queryHistoryOriginalData(std::vector *vecMpKey, double lower, double upper, E_Data_Type type = E_HISTORY); - void queryHistoryPolymericData(std::vector *vecMpKey, + void queryHistoryPolymericData(std::vector *vecMpKey, double lower, double upper, int nGroupBySec, - const kbd_dbms::EnComputeMethod &enCm); + const iot_dbms::EnComputeMethod &enCm); - void queryHistoryComputeData(std::vector *vecMpKey, + void queryHistoryComputeData(std::vector *vecMpKey, double lower, double upper, - const std::vector &vecCM); + const std::vector &vecCM); - void queryHistoryEvents(std::vector *vecMpKey, + void queryHistoryEvents(std::vector *vecMpKey, double lower, double upper, - const kbd_dbms::EnComputeMethod &enCM, + const iot_dbms::EnComputeMethod &enCM, int nGroupBySec); protected: - bool getValidTsdbConnPtr(kbd_dbms::CTsdbConnPtr &ptr); + bool getValidTsdbConnPtr(iot_dbms::CTsdbConnPtr &ptr); void checkTsdbCommandQueue(); void checkTsdbCommandQueue(bool &bHasPend, QList &listCommand); @@ -110,7 +110,7 @@ private: bool m_bHasPendingCommandCurve; bool m_bHasPendingCommandEvent; bool m_bHasPendingCommandCompute; - kbd_dbms::CTsdbConnPtr m_tsdbConnPtr; + iot_dbms::CTsdbConnPtr m_tsdbConnPtr; QList m_listCommandCurve; QList m_listCommandEvent; diff --git a/product/src/gui/plugin/TrendCurves/CHisEventManage.h b/product/src/gui/plugin/TrendCurves/CHisEventManage.h index 4008b8b1..228a072a 100644 --- a/product/src/gui/plugin/TrendCurves/CHisEventManage.h +++ b/product/src/gui/plugin/TrendCurves/CHisEventManage.h @@ -3,7 +3,7 @@ #include "dbms/db_api_ex/CDbApi.h" -using namespace kbd_dbms; +using namespace iot_dbms; class CHisEventManage : public QObject { Q_OBJECT diff --git a/product/src/gui/plugin/TrendCurves/CPlotWidget.cpp b/product/src/gui/plugin/TrendCurves/CPlotWidget.cpp index 42041b21..dc062909 100644 --- a/product/src/gui/plugin/TrendCurves/CPlotWidget.cpp +++ b/product/src/gui/plugin/TrendCurves/CPlotWidget.cpp @@ -13,7 +13,7 @@ #include "CMyListWidget.h" #include "model_excel/xlsx/xlsxdocument.h" -using namespace kbd_dbms; +using namespace iot_dbms; CPlotWidget::CPlotWidget(QWidget *parent) : QWidget(parent), @@ -45,12 +45,12 @@ CPlotWidget::CPlotWidget(QWidget *parent) : setContentsMargins(1, 1, 1, 1); qRegisterMetaType< E_Point_Type >("E_Point_Type"); qRegisterMetaType< E_Data_Type >("E_Data_Type"); - qRegisterMetaType< kbd_dbms::EnComputeMethod >("kbd_dbms::EnComputeMethod"); - qRegisterMetaType< std::vector >("std::vector"); - qRegisterMetaType< std::vector >("std::vector"); - qRegisterMetaType< std::vector *> >("std::vector *>"); - qRegisterMetaType< std::vector *> *> > >( - "std::vector *> *> >"); + qRegisterMetaType< iot_dbms::EnComputeMethod >("iot_dbms::EnComputeMethod"); + qRegisterMetaType< std::vector >("std::vector"); + qRegisterMetaType< std::vector >("std::vector"); + qRegisterMetaType< std::vector *> >("std::vector *>"); + qRegisterMetaType< std::vector *> *> > >( + "std::vector *> *> >"); } CPlotWidget::~CPlotWidget() @@ -253,7 +253,7 @@ void CPlotWidget::initialize() connect(m_pTimer, &QTimer::timeout, this, &CPlotWidget::realTimeElapsed); } - m_pDpcdaForApp = new kbd_service::CDpcdaForApp(); + m_pDpcdaForApp = new iot_service::CDpcdaForApp(); m_rtDataCollect = new CRealTimeDataCollect(this); connect(m_rtDataCollect, &CRealTimeDataCollect::finished, m_rtDataCollect, &CRealTimeDataCollect::deleteLater); connect(m_rtDataCollect, &CRealTimeDataCollect::realTimeTrendDataArrived, this, &CPlotWidget::recvRealTimeTrendData, Qt::QueuedConnection); @@ -1403,7 +1403,7 @@ void CPlotWidget::updateHistoryCurveRecord(double lower, double upper) } else { - emit sigQueryHistoryPolymericData(vecMpKey, lower, upper, currentGroupByMinute() * 60, kbd_dbms::CM_FIRST); + emit sigQueryHistoryPolymericData(vecMpKey, lower, upper, currentGroupByMinute() * 60, iot_dbms::CM_FIRST); } } else @@ -1414,12 +1414,12 @@ void CPlotWidget::updateHistoryCurveRecord(double lower, double upper) } else { - m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower, upper, currentGroupByMinute() * 60, std::vector{kbd_dbms::CM_FIRST}); + m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower, upper, currentGroupByMinute() * 60, std::vector{iot_dbms::CM_FIRST}); } } QPair range = getFatureDataTime(m_type, ui->date->dateTime()); - std::vector vecMethod{kbd_dbms::CM_MAX, kbd_dbms::CM_MIN}; + std::vector vecMethod{iot_dbms::CM_MAX, iot_dbms::CM_MIN}; updateComputeValue(range.first, range.second, vecMethod); } @@ -1795,7 +1795,7 @@ void CPlotWidget::updateCurveHisData(double lower, double upper, QCPGraph *graph m_pTrendGraph->setCurveHisDataValue(graph->name(), max, min, maxTime, minTime, average, accuml, *range); } -void CPlotWidget::updatePhaseTracer(std::vector *vecMpKey, std::vector *> *vecResult) +void CPlotWidget::updatePhaseTracer(std::vector *vecMpKey, std::vector *> *vecResult) { ui->plot->clearItems(); m_listTracer.clear(); @@ -1804,8 +1804,8 @@ void CPlotWidget::updatePhaseTracer(std::vector *vecMpK { for(size_t tagIndex(0); tagIndex < vecResult->size(); tagIndex++) { - std::vector *evetVector = vecResult->at(tagIndex); - std::vector::iterator iter = evetVector->begin(); + std::vector *evetVector = vecResult->at(tagIndex); + std::vector::iterator iter = evetVector->begin(); for(; iter != evetVector->end(); iter++) { if(m_alarmStatusList.contains(iter->m_nAlmStatus)) @@ -1866,7 +1866,7 @@ void CPlotWidget::updatePhaseTracer(std::vector *vecMpK hidePoint.clear(); } //< 释放结果集 - std::vector *>::iterator res = vecResult->begin(); + std::vector *>::iterator res = vecResult->begin(); while(res != vecResult->end()) { delete (*res); @@ -3159,11 +3159,11 @@ void CPlotWidget::groupQueryHistoryEvent() { if(g_groupByDuration == 0) { - emit sigQueryHistoryEvent(vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, kbd_dbms::CM_NULL, g_groupByDuration); + emit sigQueryHistoryEvent(vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, iot_dbms::CM_NULL, g_groupByDuration); } else { - emit sigQueryHistoryEvent(vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, kbd_dbms::CM_SAMPLE, g_groupByDuration); + emit sigQueryHistoryEvent(vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, iot_dbms::CM_SAMPLE, g_groupByDuration); } } else @@ -3171,12 +3171,12 @@ void CPlotWidget::groupQueryHistoryEvent() if(g_groupByDuration == 0) { m_pHisDataManage->postTsdbCommandQueue(E_EVENTPOINT, vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, g_groupByDuration, - std::vector{kbd_dbms::CM_NULL}); + std::vector{iot_dbms::CM_NULL}); } else { m_pHisDataManage->postTsdbCommandQueue(E_EVENTPOINT, vecMpKey, ui->plot->xAxis->range().lower, ui->plot->xAxis->range().upper, g_groupByDuration, - std::vector{kbd_dbms::CM_SAMPLE}); + std::vector{iot_dbms::CM_SAMPLE}); } } @@ -3547,7 +3547,7 @@ void CPlotWidget::slotCustomSearch(bool isForce) } enableSearch(false); - std::vector vecMethod{kbd_dbms::CM_MAX, kbd_dbms::CM_MIN}; + std::vector vecMethod{iot_dbms::CM_MAX, iot_dbms::CM_MIN}; updateComputeValue(lower, upper, vecMethod); std::vector * vecMpKey = new std::vector(); for(int nIndex(0); nIndex < ui->plot->graphCount(); ++nIndex) @@ -3566,12 +3566,12 @@ void CPlotWidget::slotCustomSearch(bool isForce) double nIntervalSecs = SAMPLE_CYC_MIN * 60 * 1000; // if(!m_pHisDataManage->isTsdbExuting()) // { -// emit sigQueryHistoryPolymericData(vecMpKey, lower + nIntervalSecs, upper - nIntervalSecs, sec, kbd_dbms::CM_FIRST); +// emit sigQueryHistoryPolymericData(vecMpKey, lower + nIntervalSecs, upper - nIntervalSecs, sec, iot_dbms::CM_FIRST); // } // else { //< 添加多条曲线时,可能存在顺序混乱,导致显示列缺失,因此都使用post的方式查询 - m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower + nIntervalSecs, upper - nIntervalSecs, sec, std::vector{kbd_dbms::CM_FIRST}); + m_pHisDataManage->postTsdbCommandQueue(E_POLYMERIC, vecMpKey, lower + nIntervalSecs, upper - nIntervalSecs, sec, std::vector{iot_dbms::CM_FIRST}); } } diff --git a/product/src/gui/plugin/TrendCurves/CPlotWidget.h b/product/src/gui/plugin/TrendCurves/CPlotWidget.h index c3ce1a66..294e8bb9 100644 --- a/product/src/gui/plugin/TrendCurves/CPlotWidget.h +++ b/product/src/gui/plugin/TrendCurves/CPlotWidget.h @@ -123,20 +123,20 @@ signals: void releaseHisDataThread(); void releaseHisEventThread(); - void sigQueryHistoryOriginalData(std::vector *vecMpKey, + void sigQueryHistoryOriginalData(std::vector *vecMpKey, double lower, double upper, E_Data_Type type = E_HISTORY); - void sigQueryHistoryPolymericData(std::vector *vecMpKey, - double lower, double upper, int nGroupByMinute, kbd_dbms::EnComputeMethod method); + void sigQueryHistoryPolymericData(std::vector *vecMpKey, + double lower, double upper, int nGroupByMinute, iot_dbms::EnComputeMethod method); - void sigQueryHistoryComputeData(std::vector *vecMpKey, + void sigQueryHistoryComputeData(std::vector *vecMpKey, double lower, double upper, - std::vector method); + std::vector method); - void sigQueryHistoryEvent(std::vector *vecMpKey, + void sigQueryHistoryEvent(std::vector *vecMpKey, double lower, double upper, - kbd_dbms::EnComputeMethod enCM, + iot_dbms::EnComputeMethod enCM, int nGroupByMinute); void sigAddCollect(int x, int y); void sigHideCollect(); @@ -165,7 +165,7 @@ private slots: void updateTrendShowMode(int nIndex, bool updateXAxisRange = true); - void updateComputeValue(double lower, double upper, std::vector vecMethod); + void updateComputeValue(double lower, double upper, std::vector vecMethod); void updateCurves(); @@ -173,22 +173,22 @@ private slots: void updateHistoryCurveRecord(double lower, double upper); - void updateHisOriginalData(std::vector *vecMpKey, - std::vector *> *vecResult, + void updateHisOriginalData(std::vector *vecMpKey, + std::vector *> *vecResult, E_Data_Type type = E_HISTORY); - void updateHisPolymericData(std::vector *vecMpKey, - std::vector *> *vecResult, + void updateHisPolymericData(std::vector *vecMpKey, + std::vector *> *vecResult, int nGroupBySec); - void updateHisComputeData(std::vector *vecMpKey, - std::vector *> *> > cmResult); + void updateHisComputeData(std::vector *vecMpKey, + std::vector *> *> > cmResult); - void updateHistoryGraph(std::vector *vecMpKey, + void updateHistoryGraph(std::vector *vecMpKey, std::vector< QSharedPointer > &vecContainer, std::vector< QSharedPointer > &vecRange); - void updateHistoryData(std::vector *vecMpKey, + void updateHistoryData(std::vector *vecMpKey, std::vector< QSharedPointer > &vecContainer, std::vector< QSharedPointer > &vecRange); @@ -197,8 +197,8 @@ private slots: QSharedPointer container, QSharedPointer range); - void updatePhaseTracer(std::vector *vecMpKey, - std::vector *> *vecResult); + void updatePhaseTracer(std::vector *vecMpKey, + std::vector *> *vecResult); void updateGraphEvent(const qint64 &time, QStringList contents); void updateAxisFormat(bool updateXAxisRange); @@ -241,7 +241,7 @@ private slots: private: void installMousePressEventFilter(); - kbd_dbms::EnMeasPiontType getMeasType(const QString &type); + iot_dbms::EnMeasPiontType getMeasType(const QString &type); E_Trend_Type getRangeType(const QCPRange &range); @@ -258,7 +258,7 @@ private: void setSliderRange(double lower, double upper, bool setValue = false); template - void updateHisData(std::vector *vecMpKey, + void updateHisData(std::vector *vecMpKey, std::vector*> *vecResult, std::vector< QSharedPointer > &vecRange, std::vector< QSharedPointer > &vecContainer, @@ -270,9 +270,9 @@ private: bool checkStatus(const _Tp &var, const int &nInvalid); template - bool checkStatus(const kbd_dbms::SVarHisSamplePoint &var, const int &nInvalid); + bool checkStatus(const iot_dbms::SVarHisSamplePoint &var, const int &nInvalid); - void setCurveStatisData(const QString &tag, kbd_dbms::EnComputeMethod method, bool reset, const double &value = 0, const double &time = 0); + void setCurveStatisData(const QString &tag, iot_dbms::EnComputeMethod method, bool reset, const double &value = 0, const double &time = 0); bool isMutation(const double &preValue, const double &curValue); @@ -301,7 +301,7 @@ private: CTrendGraph * m_pTrendGraph; QCPItemText * m_trendTitle; double m_rtRange; - kbd_service::CDpcdaForApp * m_pDpcdaForApp; + iot_service::CDpcdaForApp * m_pDpcdaForApp; CRealTimeDataCollect * m_rtDataCollect; QSharedPointer m_ptrPlotTricker; QThread * m_pHisDataThread; diff --git a/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.cpp b/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.cpp index 68ecffbf..33affd25 100644 --- a/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.cpp +++ b/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.cpp @@ -4,9 +4,9 @@ #include "pub_logger_api/logger.h" #include -using namespace kbd_net; -using namespace kbd_public; -using namespace kbd_idlfile; +using namespace iot_net; +using namespace iot_public; +using namespace iot_idl; CRealTimeDataCollect::CRealTimeDataCollect(QObject *parent) : QThread(parent) @@ -21,15 +21,15 @@ CRealTimeDataCollect::~CRealTimeDataCollect() void CRealTimeDataCollect::run() { - kbd_public::CSysInfoInterfacePtr sysInfo; - kbd_public::createSysInfoInstance(sysInfo); + iot_public::CSysInfoInterfacePtr sysInfo; + iot_public::createSysInfoInstance(sysInfo); // 初始化通讯器 CMbCommunicator * pCommunicator = new CMbCommunicator(); pCommunicator->addSub(0, CH_SCADA_TO_HMI_DATA_CHANGE); while(!isInterruptionRequested()) { - kbd_net::CMbMessage msg; + iot_net::CMbMessage msg; if (pCommunicator && pCommunicator->recvMsg(msg, 100) && !isInterruptionRequested()) { parseTrendDataMessage(msg); @@ -48,35 +48,35 @@ void CRealTimeDataCollect::parseTrendDataMessage(const CMbMessage &msg) int msgType = msg.getMsgType(); if(MT_DP_CHANGE_DATA == msgType) { - kbd_idlfile::SRealTimeDataPkg chgDataPkg; + iot_idl::SRealTimeDataPkg chgDataPkg; try { chgDataPkg.ParseFromArray(msg.getDataPtr(), (int)msg.getDataSize()); int aiSize = chgDataPkg.stairtd_size(); for(int i = 0;i < aiSize; i++) { - const kbd_idlfile::SAiRealTimeData &aiStru = chgDataPkg.stairtd(i); + const iot_idl::SAiRealTimeData &aiStru = chgDataPkg.stairtd(i); msgNotify(aiStru.strtagname(), aiStru.fvalue(), aiStru.ustatus(), E_ANALOG); } int diSize = chgDataPkg.stdirtd_size(); for(int i = 0;i < diSize; i++) { - const kbd_idlfile::SDiRealTimeData &diStru = chgDataPkg.stdirtd(i); + const iot_idl::SDiRealTimeData &diStru = chgDataPkg.stdirtd(i); msgNotify(diStru.strtagname(), diStru.nvalue(), diStru.ustatus(), E_DIGITAL); } int piSize = chgDataPkg.stpirtd_size(); for(int i = 0;i < piSize; i++) { - const kbd_idlfile::SPiRealTimeData &piStru = chgDataPkg.stpirtd(i); + const iot_idl::SPiRealTimeData &piStru = chgDataPkg.stpirtd(i); msgNotify(piStru.strtagname(), (qint64)piStru.dvalue(), piStru.ustatus(), E_ACCUML); } int miSize = chgDataPkg.stmirtd_size(); for(int i = 0;i < miSize; i++) { - const kbd_idlfile::SMiRealTimeData &miStru = chgDataPkg.stmirtd(i); + const iot_idl::SMiRealTimeData &miStru = chgDataPkg.stmirtd(i); msgNotify(miStru.strtagname(), miStru.nvalue(), miStru.ustatus(), E_MIX); } } diff --git a/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.h b/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.h index 7447c4fc..c2ca4818 100644 --- a/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.h +++ b/product/src/gui/plugin/TrendCurves/CRealTimeDataCollect.h @@ -38,7 +38,7 @@ private: * @brief parseTrendDataMessage 解析实时数据 * @param msg */ - void parseTrendDataMessage(const kbd_net::CMbMessage &msg); + void parseTrendDataMessage(const iot_net::CMbMessage &msg); void msgNotify(const std::string &strTagName, const QVariant &value, const int &status, E_Point_Type pointType); }; diff --git a/product/src/gui/plugin/TrendCurves/CTrendEditDialog.cpp b/product/src/gui/plugin/TrendCurves/CTrendEditDialog.cpp index 33bd2237..799c6de7 100644 --- a/product/src/gui/plugin/TrendCurves/CTrendEditDialog.cpp +++ b/product/src/gui/plugin/TrendCurves/CTrendEditDialog.cpp @@ -5,7 +5,7 @@ #include "GraphTool/Retriever/CRetriever.h" #include "pub_utility_api/FileUtil.h" -using namespace kbd_dbms; +using namespace iot_dbms; CTrendEditDialog::CTrendEditDialog(QWidget *parent) : QDialog(parent), diff --git a/product/src/gui/plugin/TrendCurves/CTrendFavTreeWidget.cpp b/product/src/gui/plugin/TrendCurves/CTrendFavTreeWidget.cpp index 0c60912c..a44f2cbb 100644 --- a/product/src/gui/plugin/TrendCurves/CTrendFavTreeWidget.cpp +++ b/product/src/gui/plugin/TrendCurves/CTrendFavTreeWidget.cpp @@ -62,7 +62,7 @@ void CTrendFavTreeWidget::contextMenuEvent(QContextMenuEvent *event) { //< 权限处理--暂不处理 // bool bIsEditable = false; -// kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); +// iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); // if(permMngPtr == NULL) // { // return; @@ -233,7 +233,7 @@ void CTrendFavTreeWidget::loadTrendGraph(const QString &filePath) QString strFileName; if(filePath.isEmpty()) { - strFileName = QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); + strFileName = QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + QString("../../data/model/trendgraph.xml"); } else { @@ -317,13 +317,13 @@ void CTrendFavTreeWidget::savaTrendGraph(const QString &filePath, const QListgetLocalNodeInfo(stNodeInfo); - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { if(0 == permMngPtr->PermDllInit()) @@ -257,7 +257,7 @@ QMap CTrendInfoManage::getAlarmOtherStatus() void CTrendInfoManage::loadRTLocation() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -279,8 +279,8 @@ void CTrendInfoManage::loadRTLocation() id_value.second = "description"; if(m_rtdbAccess->open(strApplicationName.c_str(), strTableName.c_str())) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back(id_value.first); columns.push_back(id_value.second); @@ -293,8 +293,8 @@ void CTrendInfoManage::loadRTLocation() m_locationOrderList.clear(); for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); @@ -466,7 +466,7 @@ void CTrendInfoManage::loadStateDefine() { if(m_rtdbAccess->open("base", "dict_menu_info")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); CRdbQueryResult result; std::vector columns; @@ -491,8 +491,8 @@ void CTrendInfoManage::loadAlarmStatusDefine() { if(m_rtdbAccess->open("base", "alarm_status_define")) { - kbd_dbms::CTableLockGuard locker(*m_rtdbAccess); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CTableLockGuard locker(*m_rtdbAccess); + iot_dbms::CRdbQueryResult result; std::vector columns; columns.emplace_back("status_value"); columns.emplace_back("display_name"); @@ -501,8 +501,8 @@ void CTrendInfoManage::loadAlarmStatusDefine() { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - kbd_dbms::CVarType key; - kbd_dbms::CVarType value; + iot_dbms::CVarType key; + iot_dbms::CVarType value; result.getColumnValue(nIndex, 0, key); result.getColumnValue(nIndex, 1, value); m_alarmStatusDefineMap[key.toInt()] = QString::fromStdString(value.toStdString()); @@ -514,7 +514,7 @@ void CTrendInfoManage::loadAlarmStatusDefine() void CTrendInfoManage::loadAlarmStatus() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmStatus.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try @@ -552,7 +552,7 @@ void CTrendInfoManage::loadAlarmStatus() void CTrendInfoManage::loadAlarmOtherStatus() { - const std::string strConfFullPath = kbd_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); + const std::string strConfFullPath = iot_public::CFileUtil::getPathOfCfgFile("alarmOther.xml"); boost::property_tree::ptree pt; namespace xml = boost::property_tree::xml_parser; try diff --git a/product/src/gui/plugin/TrendCurves/CTrendInfoManage.h b/product/src/gui/plugin/TrendCurves/CTrendInfoManage.h index 5c0a724e..7ab066e3 100644 --- a/product/src/gui/plugin/TrendCurves/CTrendInfoManage.h +++ b/product/src/gui/plugin/TrendCurves/CTrendInfoManage.h @@ -66,10 +66,10 @@ private: CTrendInfoManage(); void loadRTLocation(); - void loadDevGroupInfo(kbd_dbms::CDbApi *pReadDb); //新增设备组 - void loadDeviceInfo(kbd_dbms::CDbApi *pReadDb); //新增设备组时修改 - void loadTagInfo(kbd_dbms::CDbApi *pReadDb); - void loadUnit(kbd_dbms::CDbApi *pReadDb); + void loadDevGroupInfo(iot_dbms::CDbApi *pReadDb); //新增设备组 + void loadDeviceInfo(iot_dbms::CDbApi *pReadDb); //新增设备组时修改 + void loadTagInfo(iot_dbms::CDbApi *pReadDb); + void loadUnit(iot_dbms::CDbApi *pReadDb); void loadStateDefine(); void loadAlarmStatusDefine(); void loadAlarmStatus(); @@ -77,7 +77,7 @@ private: void initInvalidStatus(); private: - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; QMap m_locationInfo; //< LocationID-LocationDesc QMap > m_devGroupInfo; //< LocationID- 新增设备组 QMap > > m_devGroupInfoMap; diff --git a/product/src/gui/plugin/TrendCurves/CTrendWindow.cpp b/product/src/gui/plugin/TrendCurves/CTrendWindow.cpp index 6928e868..ed7cc732 100644 --- a/product/src/gui/plugin/TrendCurves/CTrendWindow.cpp +++ b/product/src/gui/plugin/TrendCurves/CTrendWindow.cpp @@ -32,7 +32,7 @@ CTrendWindow::CTrendWindow(bool editMode, QVector ptrVec, QWidget *paren Q_UNUSED(ptrVec) QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -42,7 +42,7 @@ CTrendWindow::CTrendWindow(bool editMode, QVector ptrVec, QWidget *paren qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("trendCurves.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("trendCurves.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -84,7 +84,7 @@ void CTrendWindow::initialize(const int &mode) if(m_plotWidget) { QString strColorConfig; - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("curveColor.cfg") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("curveColor.cfg") ; QFile colorFile(QString::fromStdString(strFullPath)); if (colorFile.open(QIODevice::ReadOnly)) { diff --git a/product/src/gui/plugin/TrendCurves/main.cpp b/product/src/gui/plugin/TrendCurves/main.cpp index 789f8667..f3ccb082 100644 --- a/product/src/gui/plugin/TrendCurves/main.cpp +++ b/product/src/gui/plugin/TrendCurves/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) return -1; } - kbd_service::CDpcdaForApp::initGlobalThread(); + iot_service::CDpcdaForApp::initGlobalThread(); { LOGINFO("===========================Trend Curve==========================="); @@ -37,10 +37,10 @@ int main(int argc, char *argv[]) app.exec(); } - kbd_service::CDpcdaForApp::releaseGlobalThread(); + iot_service::CDpcdaForApp::releaseGlobalThread(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/UserManageWidget/UserManageWidget.cpp b/product/src/gui/plugin/UserManageWidget/UserManageWidget.cpp index b24fda25..c0e7998c 100644 --- a/product/src/gui/plugin/UserManageWidget/UserManageWidget.cpp +++ b/product/src/gui/plugin/UserManageWidget/UserManageWidget.cpp @@ -33,7 +33,7 @@ UserManageWidget::UserManageWidget(QWidget *parent, bool editMode) : ui(new Ui::UserManageWidget) { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -43,7 +43,7 @@ UserManageWidget::UserManageWidget(QWidget *parent, bool editMode) : qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("usermng.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("usermng.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) @@ -137,7 +137,7 @@ void UserManageWidget::init() void UserManageWidget::initPerm() { - m_ptrPerm = kbd_service::getPermMngInstance("base"); + m_ptrPerm = iot_service::getPermMngInstance("base"); if(!m_ptrPerm || m_ptrPerm->PermDllInit() != 0) { QMessageBox::warning(this, tr("提示"), tr("用户管理插件用户权限认证库调用失败!"), QMessageBox::Ok); diff --git a/product/src/gui/plugin/UserManageWidget/UserManageWidget.h b/product/src/gui/plugin/UserManageWidget/UserManageWidget.h index f7a99011..dceb4201 100644 --- a/product/src/gui/plugin/UserManageWidget/UserManageWidget.h +++ b/product/src/gui/plugin/UserManageWidget/UserManageWidget.h @@ -52,7 +52,7 @@ private: private: Ui::UserManageWidget *ui; - kbd_service::CPermMngApiPtr m_ptrPerm; + iot_service::CPermMngApiPtr m_ptrPerm; KbdUserWidget *m_stack; UserDbOpt *m_dbOpt; bool m_bIsEditMode; diff --git a/product/src/gui/plugin/UserManageWidget/main.cpp b/product/src/gui/plugin/UserManageWidget/main.cpp index 7e9f738f..4888b866 100644 --- a/product/src/gui/plugin/UserManageWidget/main.cpp +++ b/product/src/gui/plugin/UserManageWidget/main.cpp @@ -10,10 +10,10 @@ int main(int argc, char *argv[]) std::string name="admin"; std::string password ="kbdct"; - kbd_public::StartLogSystem("HMI", "hmi"); - kbd_net::initMsgBus("HMI", "HMI"); + iot_public::StartLogSystem("HMI", "hmi"); + iot_net::initMsgBus("HMI", "HMI"); int group =1; - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) w.show(); a.exec(); } - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/WaveAnalyzeWidget/CFileTableWidget.cpp b/product/src/gui/plugin/WaveAnalyzeWidget/CFileTableWidget.cpp index 575f94c4..9a0ef7ba 100644 --- a/product/src/gui/plugin/WaveAnalyzeWidget/CFileTableWidget.cpp +++ b/product/src/gui/plugin/WaveAnalyzeWidget/CFileTableWidget.cpp @@ -21,14 +21,14 @@ CFileTableWidget::~CFileTableWidget() QString CFileTableWidget::getRootPath() { - std::string strCurModuleDir = kbd_public::CFileUtil::getCurModuleDir(); + std::string strCurModuleDir = iot_public::CFileUtil::getCurModuleDir(); strCurModuleDir += "../../data/rec"; return QString::fromStdString(strCurModuleDir); } bool CFileTableWidget::checkDeletePerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { return false; diff --git a/product/src/gui/plugin/WaveAnalyzeWidget/CWaveAnalyzeWidget.cpp b/product/src/gui/plugin/WaveAnalyzeWidget/CWaveAnalyzeWidget.cpp index a964dda7..db83f683 100644 --- a/product/src/gui/plugin/WaveAnalyzeWidget/CWaveAnalyzeWidget.cpp +++ b/product/src/gui/plugin/WaveAnalyzeWidget/CWaveAnalyzeWidget.cpp @@ -144,7 +144,7 @@ void CWaveAnalyzeWidget::showComtradeFile() void CWaveAnalyzeWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -153,7 +153,7 @@ void CWaveAnalyzeWidget::initStyle() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("waveAnalyze.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("waveAnalyze.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.cpp b/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.cpp index 0b46dc2d..03212af0 100644 --- a/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.cpp +++ b/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.cpp @@ -3,13 +3,13 @@ #include "pub_logger_api/logger.h" #include "CBiCookieManage.h" -using namespace kbd_service; -using namespace kbd_public; +using namespace iot_service; +using namespace iot_public; CBiCookieManage::CBiCookieManage() : m_strNode(""), m_nDomainId(CN_InvalidDomainId) { - m_ptrPermMngApi = kbd_service::getPermMngInstance("base"); + m_ptrPermMngApi = iot_service::getPermMngInstance("base"); if(PERM_NORMAL != m_ptrPermMngApi->PermDllInit()) { LOGERROR("权限接口初始化失败!"); @@ -60,7 +60,7 @@ bool CBiCookieManage::createCookie(QString &strCookie, int &nUserId) bool CBiCookieManage::isAuthExist(const QString &strCookie) { - kbd_idlfile::RdbRet objRet; + iot_idl::RdbRet objRet; bool bRet = m_objRdbNetApi.queryByKey(WEB_AUTH, strCookie.toStdString(), WEB_AUTH_EXPIRED_TIME, objRet); if(false == bRet) { @@ -82,7 +82,7 @@ bool CBiCookieManage::isAuthExist(const QString &strCookie) bool CBiCookieManage::addWebAuth(const QString &strCookie, const int &nUserId) { - kbd_idlfile::RdbInsert rdbInsert; + iot_idl::RdbInsert rdbInsert; rdbInsert.set_strtablename(WEB_AUTH); rdbInsert.add_strcolumnname(WEB_AUTH_ID); @@ -92,17 +92,17 @@ bool CBiCookieManage::addWebAuth(const QString &strCookie, const int &nUserId) rdbInsert.add_msgdata(); rdbInsert.mutable_msgdata(0); rdbInsert.mutable_msgdata(0)->add_msgvaluearray(); - rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(0)->set_edatatype(kbd_idlfile::CN_DATATYPE_STRING); + rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(0)->set_edatatype(iot_idl::CN_DATATYPE_STRING); rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(0)->set_strvalue(strCookie.toStdString()); rdbInsert.mutable_msgdata(0)->add_msgvaluearray(); - rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(1)->set_edatatype(kbd_idlfile::CN_DATATYPE_INT32); + rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(1)->set_edatatype(iot_idl::CN_DATATYPE_INT32); rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(1)->set_nvalue(nUserId); QDateTime expired = QDateTime::currentDateTime().addDays(EXPIRED_TIME); int64 expiredDate = expired.toMSecsSinceEpoch(); rdbInsert.mutable_msgdata(0)->add_msgvaluearray(); - rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(2)->set_edatatype(kbd_idlfile::CN_DATATYPE_INT64); + rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(2)->set_edatatype(iot_idl::CN_DATATYPE_INT64); rdbInsert.mutable_msgdata(0)->mutable_msgvaluearray(2)->set_lvalue(expiredDate); bool bRc = false; @@ -126,14 +126,14 @@ bool CBiCookieManage::addWebAuth(const QString &strCookie, const int &nUserId) bool CBiCookieManage::removeWebAuth(const QString &strCookie) { - kbd_idlfile::RdbRemove rdbremove; + iot_idl::RdbRemove rdbremove; rdbremove.set_strtablename(WEB_AUTH); rdbremove.add_msgcondtionarray(); - rdbremove.mutable_msgcondtionarray(0)->set_enlogic(kbd_idlfile::enumCondAnd); - rdbremove.mutable_msgcondtionarray(0)->set_enrelation(kbd_idlfile::enumCondEqual); + rdbremove.mutable_msgcondtionarray(0)->set_enlogic(iot_idl::enumCondAnd); + rdbremove.mutable_msgcondtionarray(0)->set_enrelation(iot_idl::enumCondEqual); rdbremove.mutable_msgcondtionarray(0)->set_strcolumnname(WEB_AUTH_ID); - rdbremove.mutable_msgcondtionarray(0)->mutable_msgvalue()->set_edatatype(kbd_idlfile::CN_DATATYPE_STRING); + rdbremove.mutable_msgcondtionarray(0)->mutable_msgvalue()->set_edatatype(iot_idl::CN_DATATYPE_STRING); rdbremove.mutable_msgcondtionarray(0)->mutable_msgvalue()->set_strvalue(strCookie.toStdString()); bool bRet = false; diff --git a/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.h b/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.h index d2544bfd..1f17dbd1 100644 --- a/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.h +++ b/product/src/gui/plugin/WebBrowserWidget/CBiCookieManage.h @@ -29,8 +29,8 @@ public: private: std::string m_strNode; int m_nDomainId; - kbd_service::CPermMngApiPtr m_ptrPermMngApi; - kbd_dbms::CRdbNetApi m_objRdbNetApi; + iot_service::CPermMngApiPtr m_ptrPermMngApi; + iot_dbms::CRdbNetApi m_objRdbNetApi; }; #endif // CBICOOKIEMANAGE_H diff --git a/product/src/gui/plugin/WebBrowserWidget/CBiTabWidget.cpp b/product/src/gui/plugin/WebBrowserWidget/CBiTabWidget.cpp index 81554000..2016a302 100644 --- a/product/src/gui/plugin/WebBrowserWidget/CBiTabWidget.cpp +++ b/product/src/gui/plugin/WebBrowserWidget/CBiTabWidget.cpp @@ -12,7 +12,7 @@ CBiTabWidget::CBiTabWidget(QWidget *parent) m_strCookie("") { m_networkCookie.setName("id"); - m_strStyle = std::move(kbd_public::CFileStyle::getCurStyle()); + m_strStyle = std::move(iot_public::CFileStyle::getCurStyle()); } void CBiTabWidget::setUrl(const QUrl &url) diff --git a/product/src/gui/plugin/WebBrowserWidget/CBrowserWidget.cpp b/product/src/gui/plugin/WebBrowserWidget/CBrowserWidget.cpp index ecce4980..6f697808 100644 --- a/product/src/gui/plugin/WebBrowserWidget/CBrowserWidget.cpp +++ b/product/src/gui/plugin/WebBrowserWidget/CBrowserWidget.cpp @@ -138,7 +138,7 @@ void CBrowserWidget::initialize() void CBrowserWidget::initStyle() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -147,7 +147,7 @@ void CBrowserWidget::initStyle() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("WebBrowserWidget.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("WebBrowserWidget.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/WebBrowserWidget/CEnergyTabWidget.cpp b/product/src/gui/plugin/WebBrowserWidget/CEnergyTabWidget.cpp index 5f9f966c..2bd5d562 100644 --- a/product/src/gui/plugin/WebBrowserWidget/CEnergyTabWidget.cpp +++ b/product/src/gui/plugin/WebBrowserWidget/CEnergyTabWidget.cpp @@ -7,7 +7,7 @@ CEnergyTabWidget::CEnergyTabWidget(QWidget *parent) : CWebTabWidget(parent) { - m_strStyle = std::move(kbd_public::CFileStyle::getCurStyle()); + m_strStyle = std::move(iot_public::CFileStyle::getCurStyle()); } void CEnergyTabWidget::setUrl(const QUrl &url) diff --git a/product/src/gui/plugin/WebBrowserWidget/main.cpp b/product/src/gui/plugin/WebBrowserWidget/main.cpp index ec4b71a4..0955b106 100644 --- a/product/src/gui/plugin/WebBrowserWidget/main.cpp +++ b/product/src/gui/plugin/WebBrowserWidget/main.cpp @@ -7,12 +7,12 @@ int main(int argc, char *argv[]) { qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "5566"); - kbd_public::StartLogSystem("", "hmi"); - if (!(kbd_net::initMsgBus("HMI", "HMI"))) + iot_public::StartLogSystem("", "hmi"); + if (!(iot_net::initMsgBus("HMI", "HMI"))) { return -1; } - kbd_service::CPermMngApiPtr perm = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base"); if(!perm || PERM_NORMAL != perm->PermDllInit()) { return -1; @@ -30,8 +30,8 @@ int main(int argc, char *argv[]) w.loadHtml("http://192.168.77.189:1120/platform/pageManage"); app.exec(); - kbd_net::releaseMsgBus(); - kbd_public::StopLogSystem(); + iot_net::releaseMsgBus(); + iot_public::StopLogSystem(); return 0; } diff --git a/product/src/gui/plugin/WorkTicket/CWorkTicketManage.cpp b/product/src/gui/plugin/WorkTicket/CWorkTicketManage.cpp index aca8822b..2bd51317 100644 --- a/product/src/gui/plugin/WorkTicket/CWorkTicketManage.cpp +++ b/product/src/gui/plugin/WorkTicket/CWorkTicketManage.cpp @@ -96,7 +96,7 @@ void CWorkTicketManage::readTempInfo() bool CWorkTicketManage::omPermCheck() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { //LOGERROR("权限接口初始化失败!"); @@ -171,7 +171,7 @@ void CWorkTicketManage::on_m_delete_clicked() void CWorkTicketManage::initStyleSheet() { QString qss = QString(); - std::string strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("public.qss") ; + std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("public.qss") ; QFile qssfile1(QString::fromStdString(strFullPath)); qssfile1.open(QFile::ReadOnly); if (qssfile1.isOpen()) @@ -181,7 +181,7 @@ void CWorkTicketManage::initStyleSheet() qssfile1.close(); } - strFullPath = kbd_public::CFileStyle::getPathOfStyleFile("workTicket.qss") ; + strFullPath = iot_public::CFileStyle::getPathOfStyleFile("workTicket.qss") ; QFile qssfile2(QString::fromStdString(strFullPath)); qssfile2.open(QFile::ReadOnly); if (qssfile2.isOpen()) diff --git a/product/src/gui/plugin/WorkTicket/WorkTicketWidget.cpp b/product/src/gui/plugin/WorkTicket/WorkTicketWidget.cpp index c302de7a..7dad3da2 100644 --- a/product/src/gui/plugin/WorkTicket/WorkTicketWidget.cpp +++ b/product/src/gui/plugin/WorkTicket/WorkTicketWidget.cpp @@ -31,7 +31,7 @@ WorkTicketWidget::WorkTicketWidget(QWidget *parent) : QDialog(parent) m_editFilePath = ""; m_tempFilePath = ""; initLayout(); - m_rtdbAccess = new kbd_dbms::CRdbAccess(); + m_rtdbAccess = new iot_dbms::CRdbAccess(); // initTableModel(); } @@ -235,7 +235,7 @@ QString WorkTicketWidget::copyHisToHistory(const QString &tempFileName) bool WorkTicketWidget::updateUser() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); @@ -253,7 +253,7 @@ bool WorkTicketWidget::updateUser() bool WorkTicketWidget::omPermCheck() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr == NULL || (PERM_NORMAL != permMngPtr->PermDllInit())) { LOGERROR("权限接口初始化失败!"); diff --git a/product/src/gui/plugin/WorkTicket/WorkTicketWidget.h b/product/src/gui/plugin/WorkTicket/WorkTicketWidget.h index 7e7f270c..d53186e5 100644 --- a/product/src/gui/plugin/WorkTicket/WorkTicketWidget.h +++ b/product/src/gui/plugin/WorkTicket/WorkTicketWidget.h @@ -12,8 +12,8 @@ namespace QXlsx { class QPushButton; class QCheckBox; -using namespace kbd_service; -using namespace kbd_dbms; +using namespace iot_service; +using namespace iot_dbms; class WorkTicketWidget : public QDialog { Q_OBJECT @@ -66,8 +66,8 @@ private: QCheckBox *m_sign; QPushButton *m_save; QPushButton *m_btPrint; - kbd_dbms::CRdbAccess * m_rtdbAccess; - kbd_sys::FilesyncApi m_fileApi; + iot_dbms::CRdbAccess * m_rtdbAccess; + iot_sys::FilesyncApi m_fileApi; private slots: void onSave(); diff --git a/product/src/gui/plugin/iDongOpsWidget/CCfgParser.cpp b/product/src/gui/plugin/iDongOpsWidget/CCfgParser.cpp index 81908828..f95ead38 100644 --- a/product/src/gui/plugin/iDongOpsWidget/CCfgParser.cpp +++ b/product/src/gui/plugin/iDongOpsWidget/CCfgParser.cpp @@ -25,7 +25,7 @@ A_GLOBAL_CFG CCfgParser::g_global_cfg; bool CCfgParser::g_isValid=false; -bool CCfgParser::loadGlobal(kbd_public::CCommonConfigParse &cfg) +bool CCfgParser::loadGlobal(iot_public::CCommonConfigParse &cfg) { if( cfg.getBoolValue(CN_GLOBAL, CN_IS_PERM_CHECKED , g_global_cfg.is_perm_checked ) == kbdFailed){ LOGERROR( " is_perm_checked option parser err"); return false;} if( cfg.getStringValue(CN_GLOBAL, CN_DEFAULT_USER , g_global_cfg.default_user ) == kbdFailed){ LOGERROR( " default_user option parser err"); return false;} @@ -51,7 +51,7 @@ bool CCfgParser::isValid() bool CCfgParser::loadCfg(const std::string &cfgPath) { - kbd_public::CCommonConfigParse cfgP; + iot_public::CCommonConfigParse cfgP; if( cfgP.load(cfgPath) == kbdFailed) { LOGERROR("config failed to load, please check config syntax!"); diff --git a/product/src/gui/plugin/iDongOpsWidget/CCfgParser.h b/product/src/gui/plugin/iDongOpsWidget/CCfgParser.h index 92238499..21dfdcc8 100644 --- a/product/src/gui/plugin/iDongOpsWidget/CCfgParser.h +++ b/product/src/gui/plugin/iDongOpsWidget/CCfgParser.h @@ -31,9 +31,9 @@ class CCfgParser public: static A_GLOBAL_CFG g_global_cfg; static bool isValid(); - static bool loadCfg(const std::string& cfgPath = kbd_public::CFileUtil::getPathOfCfgFile(IDONG_CFG_FILENAME)); + static bool loadCfg(const std::string& cfgPath = iot_public::CFileUtil::getPathOfCfgFile(IDONG_CFG_FILENAME)); private: - static bool loadGlobal( kbd_public::CCommonConfigParse &cfg); + static bool loadGlobal( iot_public::CCommonConfigParse &cfg); static bool g_isValid; }; diff --git a/product/src/gui/plugin/iDongOpsWidget/CReportWidget.cpp b/product/src/gui/plugin/iDongOpsWidget/CReportWidget.cpp index 377fa175..643e4313 100644 --- a/product/src/gui/plugin/iDongOpsWidget/CReportWidget.cpp +++ b/product/src/gui/plugin/iDongOpsWidget/CReportWidget.cpp @@ -58,7 +58,7 @@ CReportWidget::~CReportWidget() void CReportWidget::init() { -// m_rtdbAccess = new kbd_dbms::CRdbAccess(); +// m_rtdbAccess = new iot_dbms::CRdbAccess(); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); stackedWidget = new CReportStackedWidget(this); @@ -113,10 +113,10 @@ void CReportWidget::setNicAddr(int appId) std::string ipAddr2 = ""; std::string node1 = ""; std::string node2 = ""; - std::vector> vector = getRunRedundancyInfoByAppid(appId); + std::vector> vector = getRunRedundancyInfoByAppid(appId); for(int i=0; i vec = vector.at(i); + std::vector vec = vector.at(i); std::string node_name = vec.at(0).toStdString(); int is_active = vec.at(1).toInt(); int is_master = vec.at(2).toInt(); @@ -182,21 +182,21 @@ std::string CReportWidget::getAnotherIp(const std::string &node) return ret; } -std::vector> CReportWidget::getRunRedundancyInfoByAppid(int appId) +std::vector> CReportWidget::getRunRedundancyInfoByAppid(int appId) { - std::vector> vector; + std::vector> vector; if(m_rtdbAccess->open("base", "sys_run_redundancy_info")) { - kbd_dbms::CONDINFO condition; + iot_dbms::CONDINFO condition; memcpy(condition.name, "app_id", strlen("app_id")); condition.logicalop = ATTRCOND_AND; condition.relationop = ATTRCOND_EQU; condition.conditionval = appId; - std::vector vecCondInfo; + std::vector vecCondInfo; vecCondInfo.push_back(condition); - kbd_dbms::CRdbQueryResult result; + iot_dbms::CRdbQueryResult result; std::vector columns; columns.push_back("node_name"); columns.push_back("is_active"); @@ -211,15 +211,15 @@ std::vector> CReportWidget::getRunRedundancyInfo { for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) { - std::vector temp; - kbd_dbms::CVarType node_name; - kbd_dbms::CVarType is_active; - kbd_dbms::CVarType is_master; - kbd_dbms::CVarType is_slave; - kbd_dbms::CVarType ip1; - kbd_dbms::CVarType ip1_active; - kbd_dbms::CVarType ip2; - kbd_dbms::CVarType ip2_active; + std::vector temp; + iot_dbms::CVarType node_name; + iot_dbms::CVarType is_active; + iot_dbms::CVarType is_master; + iot_dbms::CVarType is_slave; + iot_dbms::CVarType ip1; + iot_dbms::CVarType ip1_active; + iot_dbms::CVarType ip2; + iot_dbms::CVarType ip2_active; result.getColumnValue(nIndex, 0, node_name); result.getColumnValue(nIndex, 1, is_active); result.getColumnValue(nIndex, 2, is_master); @@ -246,7 +246,7 @@ std::vector> CReportWidget::getRunRedundancyInfo void CReportWidget::updateUserInfo() { - m_permMngPtr = kbd_service::getPermMngInstance("base"); + m_permMngPtr = iot_service::getPermMngInstance("base"); m_permMngPtr->PermDllInit(); if (m_permMngPtr != NULL) { @@ -277,7 +277,7 @@ void CReportWidget::loadPage() { if(!checkReportEditPerm()) { - std::string path = kbd_public::CFileUtil::getCurModuleDir(); + std::string path = iot_public::CFileUtil::getCurModuleDir(); stackedWidget->view->load(QUrl::fromLocalFile(QString::fromStdString(path)+"../../data/report/PERM_FORBIT_EDIT.html")); return; } @@ -303,7 +303,7 @@ void CReportWidget::slotLoadFinish(bool ok) { if (!ok) { - stackedWidget->view->load(QUrl::fromLocalFile(QString::fromStdString(kbd_public::CFileUtil::getCurModuleDir()) + stackedWidget->view->load(QUrl::fromLocalFile(QString::fromStdString(iot_public::CFileUtil::getCurModuleDir()) + CCfgParser::g_global_cfg.local_static_page_path.c_str() + CCfgParser::g_global_cfg.err_page.c_str() )); } @@ -408,7 +408,7 @@ void CReportWidget::UserChanged() bool CReportWidget::checkReportEditPerm() { - kbd_service::CPermMngApiPtr permMngPtr = kbd_service::getPermMngInstance("base"); + iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); if(permMngPtr != NULL) { permMngPtr->PermDllInit(); diff --git a/product/src/gui/plugin/iDongOpsWidget/CReportWidget.h b/product/src/gui/plugin/iDongOpsWidget/CReportWidget.h index c5994d7a..9b87d180 100644 --- a/product/src/gui/plugin/iDongOpsWidget/CReportWidget.h +++ b/product/src/gui/plugin/iDongOpsWidget/CReportWidget.h @@ -22,8 +22,8 @@ #include "dbms/rdb_api/CRdbAccess.h" #include "idong_common.h" -using namespace kbd_service; -using namespace kbd_public; +using namespace iot_service; +using namespace iot_public; class CReportWebView; class CReportStackedWidget; @@ -46,14 +46,14 @@ public slots: void loadPageByName(const QString &name); private: - bool parseSiteMap(const std::string& jsonDir= kbd_public::CFileUtil::getCurModuleDir() + CN_FilePath_Model, + bool parseSiteMap(const std::string& jsonDir= iot_public::CFileUtil::getCurModuleDir() + CN_FilePath_Model, const std::string& jsonFileName = IDONG_SITEMAP_FILENAME); QString getFirstUrl(const QString& baseUrl); QString getUrl(const QString& baseUrl); CReportStackedWidget *stackedWidget; - kbd_dbms::CRdbAccess * m_rtdbAccess; + iot_dbms::CRdbAccess * m_rtdbAccess; CPermMngApiPtr m_permMngPtr; CSysInfoInterfacePtr m_sysInfoPtr; QTimer * m_updateTimer; @@ -68,7 +68,7 @@ private: void initSysInfo(); void setNicAddr(int appId); std::string getAnotherIp(const std::string &node); - std::vector > getRunRedundancyInfoByAppid(int appId); + std::vector > getRunRedundancyInfoByAppid(int appId); void updateUserInfo(); void loadPage(); void slotLoadFinish(bool ok);