45 lines
1.1 KiB
C++
Raw Normal View History

2025-03-17 11:07:28 +08:00
#include <QApplication>
2025-03-14 17:05:48 +08:00
#include "CMainWidget.h"
#include "pub_logger_api/logger.h"
//#include "dp_chg_data_api/CDpcdaForApp.h"
#include "net/net_msg_bus_api/MsgBusApi.h"
#include "service/perm_mng_api/PermMngApi.h"
int main(int argc, char *argv[])
{
2025-03-17 09:23:17 +08:00
iot_public::StartLogSystem("HMI", "AlarmStatisWidget");
if (!(iot_net::initMsgBus("HMI", "HMI")))
2025-03-14 17:05:48 +08:00
{
return -1;
}
2025-03-17 09:23:17 +08:00
iot_service::CPermMngApiPtr perm = iot_service::getPermMngInstance("base");
2025-03-14 17:05:48 +08:00
if(!perm || PERM_NORMAL != perm->PermDllInit())
{
return -1;
}
2025-03-17 11:07:28 +08:00
if(perm->SysLogin("admin", "admin", 1, 12*60*60, "hmi") != 0)
2025-03-14 17:05:48 +08:00
{
return -1;
}
2025-03-17 09:23:17 +08:00
// iot_service::CDpcdaForApp::initGlobalThread();
2025-03-14 17:05:48 +08:00
{
LOGINFO("=========================== AlarmStatisWidget ===========================");
QApplication app(argc, argv);
CMainWidget w(false, QVector<void *>());
w.show();
app.exec();
}
2025-03-17 09:23:17 +08:00
// iot_service::CDpcdaForApp::releaseGlobalThread();
2025-03-14 17:05:48 +08:00
2025-03-17 09:23:17 +08:00
iot_net::releaseMsgBus();
iot_public::StopLogSystem();
2025-03-14 17:05:48 +08:00
return 0;
}