38 lines
832 B
C++
Raw Normal View History

2025-03-17 11:05:15 +08:00
#include "AlarmManageForm.h"
2025-03-14 17:05:48 +08:00
#include <QApplication>
#include "pub_logger_api/logger.h"
#include "service/perm_mng_api/PermMngApi.h"
#include "net_msg_bus_api/MsgBusApi.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
std::string name="admin";
2025-03-17 11:05:15 +08:00
std::string password ="admin";
2025-03-17 09:23:17 +08:00
iot_public::StartLogSystem("HMI", "hmi");
2025-03-14 17:05:48 +08:00
2025-03-17 09:23:17 +08:00
iot_net::initMsgBus("HMI", "HMI");
2025-03-14 17:05:48 +08:00
int group =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;
}
if(perm->SysLogin(name, password, group, 12*60*60, "hmi") != 0)
{
return -1;
}
{
AlarmManageForm w;
w.show();
a.exec();
}
2025-03-17 09:23:17 +08:00
iot_net::releaseMsgBus();
2025-03-14 17:05:48 +08:00
2025-03-17 09:23:17 +08:00
iot_public::StopLogSystem();
2025-03-14 17:05:48 +08:00
return 0;
}