Dev Modbus SEI
This commit is contained in:
parent
0d48aa67fd
commit
26877b7941
Binary file not shown.
6
ZT.pro
6
ZT.pro
@ -118,7 +118,8 @@ SOURCES += \
|
||||
sources/GuiElements/EthConnWidget.cpp \
|
||||
sources/GuiElements/ModbusSettingsPage.cpp \
|
||||
sources/Modbus/NetworkCfgMgr.cpp \
|
||||
sources/Modbus/ModbusSEIMgr.cpp
|
||||
sources/Modbus/ModbusSEIMgr.cpp \
|
||||
sources/GuiElements/SEISettingsPage.cpp
|
||||
|
||||
HEADERS += \
|
||||
sources/MainPanel.h \
|
||||
@ -237,7 +238,8 @@ HEADERS += \
|
||||
sources/GuiElements/ModbusSettingsPage.h \
|
||||
sources/Modbus/NetworkCfgMgr.h \
|
||||
sources/Modbus/ModbusSEIMgr.h \
|
||||
sources/Modbus/ModbusSEIDefs.h
|
||||
sources/Modbus/ModbusSEIDefs.h \
|
||||
sources/GuiElements/SEISettingsPage.h
|
||||
|
||||
#QMAKE_LIBDIR += ./ExtLib
|
||||
#QT += network
|
||||
|
||||
@ -55,7 +55,7 @@ CModbusSettingsPage::CModbusSettingsPage(QGraphicsWidget *Parent)
|
||||
QBrush BackgroundBrush(QColor(245, 245, 255));
|
||||
mBackgroundRect->setBrush(BackgroundBrush);
|
||||
|
||||
QGraphicsTextItem *Title = new QGraphicsTextItem("Paramètres Modbus",this);
|
||||
QGraphicsTextItem *Title = new QGraphicsTextItem("Paramètres Modbus de la Commande Centralisée",this);
|
||||
QFont font;
|
||||
font.setPointSize(18);
|
||||
Title->setFont(font);
|
||||
|
||||
@ -84,4 +84,4 @@ public slots:
|
||||
|
||||
};
|
||||
|
||||
#endif // GENERALSETTINGSPAGE_H
|
||||
#endif // MODBUSSETTINGSPAGE_H
|
||||
|
||||
@ -77,21 +77,24 @@ COptionsPage::COptionsPage(QGraphicsWidget *Parent)
|
||||
mZTGeneralSettingsButton->setPos(50,180);
|
||||
connect(mZTGeneralSettingsButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
mModbusSettingsButton = new CTextButtonWidget("Modbus");
|
||||
mModbusSettingsButton = new CTextButtonWidget("Modbus PCC");
|
||||
mModbusSettingsButton->setParentItem(this);
|
||||
mModbusSettingsButton->setPos(50,220);
|
||||
connect(mModbusSettingsButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
mSEIModbusSettingsButton = new CTextButtonWidget("SEI");
|
||||
mSEIModbusSettingsButton->setParentItem(this);
|
||||
mSEIModbusSettingsButton->setPos(50,260);
|
||||
connect(mSEIModbusSettingsButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
mZTLogViewButton = new CTextButtonWidget("Fichier LOG");
|
||||
mZTLogViewButton->setParentItem(this);
|
||||
mZTLogViewButton->setPos(50,260);
|
||||
mZTLogViewButton->setPos(50,300);
|
||||
connect(mZTLogViewButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
|
||||
mCancelButton = new CTextButtonWidget("Fermer");
|
||||
mCancelButton->setParentItem(this);
|
||||
mCancelButton->setPos(50,300);
|
||||
mCancelButton->setPos(300,340);
|
||||
connect(mCancelButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
}
|
||||
@ -129,7 +132,11 @@ void COptionsPage::ButtonClicked(CTextButtonWidget *BtnPtr)
|
||||
{
|
||||
mProgramHandle->OpenModbusSettingsPage();
|
||||
}
|
||||
else if(BtnPtr == mZTLogViewButton)
|
||||
else if(BtnPtr == mSEIModbusSettingsButton)
|
||||
{
|
||||
mProgramHandle->OpenSEISettingsPage();
|
||||
}
|
||||
else if(BtnPtr == mZTLogViewButton)
|
||||
{
|
||||
mProgramHandle->ShowZTLogViewerPage();
|
||||
}
|
||||
|
||||
@ -62,6 +62,7 @@ private:
|
||||
CTextButtonWidget *mZTEngineeringButton;
|
||||
CTextButtonWidget *mZTGeneralSettingsButton;
|
||||
CTextButtonWidget *mModbusSettingsButton;
|
||||
CTextButtonWidget *mSEIModbusSettingsButton;
|
||||
CTextButtonWidget *mZTLogViewButton;
|
||||
CTextButtonWidget *mCancelButton;
|
||||
|
||||
|
||||
229
sources/GuiElements/SEISettingsPage.cpp
Normal file
229
sources/GuiElements/SEISettingsPage.cpp
Normal file
@ -0,0 +1,229 @@
|
||||
#include "SEISettingsPage.h"
|
||||
|
||||
|
||||
#include "SEISettingsPage.h"
|
||||
#include <QPainter>
|
||||
#include "GlobalDefine.h"
|
||||
#include <QDialog>
|
||||
#include <QMainWindow>
|
||||
#include "Zonetest.h"
|
||||
#include <QDateTime>
|
||||
#include <QFont>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkInterface>
|
||||
//#include <sys/time.h>
|
||||
#include "ZTLog.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
|
||||
|
||||
CSEISettingsPage::CSEISettingsPage(QGraphicsWidget *Parent)
|
||||
{
|
||||
Q_UNUSED(Parent)
|
||||
|
||||
|
||||
mProgramHandle = 0;
|
||||
|
||||
mBackgroundRect = new QGraphicsRectItem(boundingRect(), this);
|
||||
QBrush BackgroundBrush(QColor(245, 245, 255));
|
||||
mBackgroundRect->setBrush(BackgroundBrush);
|
||||
|
||||
QGraphicsTextItem *Title = new QGraphicsTextItem("Paramètres SEI",this);
|
||||
QFont font;
|
||||
font.setPointSize(18);
|
||||
Title->setFont(font);
|
||||
Title->setPos(40,10);
|
||||
|
||||
mCancelButton = new CTextButtonWidget("Annuler");
|
||||
mCancelButton->setParentItem(this);
|
||||
mCancelButton->setPos(550,550);
|
||||
connect(mCancelButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
mApplyButton = new CTextButtonWidget("Appliquer");
|
||||
mApplyButton->setParentItem(this);
|
||||
mApplyButton->setPos(650,550);
|
||||
mApplyButton->hide();
|
||||
connect(mApplyButton,SIGNAL(TxtButtonClicked(CTextButtonWidget*)),this,SLOT(ButtonClicked(CTextButtonWidget*)));
|
||||
|
||||
|
||||
QGraphicsProxyWidget *Proxy = new QGraphicsProxyWidget(this);
|
||||
QGraphicsTextItem *Dot = new QGraphicsTextItem(".",this);
|
||||
Dot->setFont(font);
|
||||
|
||||
|
||||
int IpSettingsPosx = 100, IpSettingsPosy = 200;
|
||||
Title = new QGraphicsTextItem("Adresse IP",this);
|
||||
font.setPointSize(16);
|
||||
Title->setFont(font);
|
||||
Title->setPos(IpSettingsPosx,IpSettingsPosy-35);
|
||||
|
||||
mIPChunk1 = new QSpinBox();
|
||||
Proxy->setWidget(mIPChunk1);
|
||||
Proxy->setPos(IpSettingsPosx,IpSettingsPosy);
|
||||
mIPChunk1->resize(70,30);
|
||||
mIPChunk1->setMinimum(0);
|
||||
mIPChunk1->setMaximum(255);
|
||||
IpSettingsPosx += 90;
|
||||
Dot->setPos(IpSettingsPosx-17,IpSettingsPosy-5);
|
||||
connect(mIPChunk1,SIGNAL(valueChanged(int)),this,SLOT(SpinBoxValueChanged(int)));
|
||||
|
||||
Proxy = new QGraphicsProxyWidget(this);
|
||||
Dot = new QGraphicsTextItem(".",this);
|
||||
Dot->setFont(font);
|
||||
mIPChunk2 = new QSpinBox();
|
||||
Proxy->setWidget(mIPChunk2);
|
||||
Proxy->setPos(IpSettingsPosx,IpSettingsPosy);
|
||||
mIPChunk2->resize(70,30);
|
||||
mIPChunk2->setMinimum(0);
|
||||
mIPChunk2->setMaximum(255);
|
||||
IpSettingsPosx += 90;
|
||||
Dot->setPos(IpSettingsPosx-17,IpSettingsPosy-5);
|
||||
connect(mIPChunk2,SIGNAL(valueChanged(int)),this,SLOT(SpinBoxValueChanged(int)));
|
||||
|
||||
Proxy = new QGraphicsProxyWidget(this);
|
||||
Dot = new QGraphicsTextItem(".",this);
|
||||
Dot->setFont(font);
|
||||
mIPChunk3 = new QSpinBox();
|
||||
Proxy->setWidget(mIPChunk3);
|
||||
Proxy->setPos(IpSettingsPosx,IpSettingsPosy);
|
||||
mIPChunk3->resize(70,30);
|
||||
mIPChunk3->setMinimum(0);
|
||||
mIPChunk3->setMaximum(255);
|
||||
IpSettingsPosx += 90;
|
||||
Dot->setPos(IpSettingsPosx-17,IpSettingsPosy - 5);
|
||||
connect(mIPChunk3,SIGNAL(valueChanged(int)),this,SLOT(SpinBoxValueChanged(int)));
|
||||
|
||||
Proxy = new QGraphicsProxyWidget(this);
|
||||
mIPChunk4 = new QSpinBox();
|
||||
Proxy->setWidget(mIPChunk4);
|
||||
mIPChunk4->setMinimum(0);
|
||||
mIPChunk4->setMaximum(255);
|
||||
Proxy->setPos(IpSettingsPosx,IpSettingsPosy);
|
||||
mIPChunk4->resize(70,30);
|
||||
connect(mIPChunk4,SIGNAL(valueChanged(int)),this,SLOT(SpinBoxValueChanged(int)));
|
||||
|
||||
IpSettingsPosx = 100;
|
||||
IpSettingsPosy += 50;
|
||||
font.setPointSize(14);
|
||||
mModbusSEILinkState = new QGraphicsTextItem("Lien Modbus SEI: Non établi",this);
|
||||
mModbusSEILinkState->setFont(font);
|
||||
mModbusSEILinkState->setPos(IpSettingsPosx+30,IpSettingsPosy);
|
||||
|
||||
mSEIModbusLinkLED = new QGraphicsPixmapItem(QPixmap("./Images/red-led-on-md.png").scaled(25,25),this);
|
||||
mSEIModbusLinkLED->setPos(IpSettingsPosx,IpSettingsPosy+5);
|
||||
|
||||
IpSettingsPosy += 30;
|
||||
mModbusSEIConnectionState = new QGraphicsTextItem("Connection HPC: DÉCONNECTÉE",this);
|
||||
mModbusSEIConnectionState->setFont(font);
|
||||
mModbusSEIConnectionState->setPos(IpSettingsPosx+30,IpSettingsPosy);
|
||||
mSEIConnectionLED = new QGraphicsPixmapItem(QPixmap("./Images/red-led-on-md.png").scaled(25,25),this);
|
||||
mSEIConnectionLED->setPos(IpSettingsPosx,IpSettingsPosy+5);
|
||||
|
||||
|
||||
QGraphicsRectItem *Frame = new QGraphicsRectItem(80,70,600,400,this);
|
||||
QPen FramePen;
|
||||
FramePen.setWidth(3);
|
||||
Frame->setPen(FramePen);
|
||||
}
|
||||
|
||||
|
||||
void CSEISettingsPage::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
mBackgroundRect->setRect(boundingRect());
|
||||
}
|
||||
|
||||
void CSEISettingsPage::ButtonClicked(CTextButtonWidget *BtnPtr)
|
||||
{
|
||||
if(BtnPtr == mCancelButton)
|
||||
{
|
||||
mProgramHandle->CloseSEISettingsPage();
|
||||
hide();
|
||||
}
|
||||
else if(BtnPtr == mApplyButton)
|
||||
{
|
||||
qint32 Address = 0;
|
||||
Address = (mIPChunk1->value() & 0x000000FF);
|
||||
Address <<= 8;
|
||||
Address |= (mIPChunk2->value() & 0x000000FF);
|
||||
Address <<= 8;
|
||||
Address |= (mIPChunk3->value() & 0x000000FF);
|
||||
Address <<= 8;
|
||||
Address |= (mIPChunk4->value() & 0x000000FF);
|
||||
QHostAddress IPAddress(Address);
|
||||
|
||||
QString LogEntry = QString("Changement des paramètres Modbus SEI -> Adresse IP %1").arg(IPAddress.toString().toAscii().data());
|
||||
CZTLog::instance()->AddLogString(LogEntry,true);
|
||||
|
||||
mProgramHandle->ApplySEISettings();//TODO
|
||||
}
|
||||
}
|
||||
|
||||
void CSEISettingsPage::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
|
||||
int CSEISettingsPage::SetActualSettings(QHostAddress CCHostAdd)
|
||||
{
|
||||
qint32 add = CCHostAdd.toIPv4Address();
|
||||
mIPChunk4->setValue(add & 0x000000FF);
|
||||
add >>= 8;
|
||||
mIPChunk3->setValue(add & 0x000000FF);
|
||||
add >>= 8;
|
||||
mIPChunk2->setValue(add & 0x000000FF);
|
||||
add >>= 8;
|
||||
mIPChunk1->setValue(add & 0x000000FF);
|
||||
|
||||
mApplyButton->hide();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
void CSEISettingsPage::ModbusSEIConnected(qint32 LocalIP, qint32 RemoteIP)
|
||||
{
|
||||
mSEIConnectionLED->setPixmap(QPixmap("./Images/green-led-on-md.png").scaled(25,25));
|
||||
mModbusSEIConnectionState->setPlainText(QString("Connection NetTrac: Connectée. \nIP: Local[%1] - HPC[%2]").arg(QHostAddress(LocalIP).toString()).arg(QHostAddress(RemoteIP).toString()));
|
||||
}
|
||||
|
||||
void CSEISettingsPage::ModbusSEIDisconnected()
|
||||
{
|
||||
mSEIConnectionLED->setPixmap(QPixmap("./Images/red-led-on-md.png").scaled(25,25));
|
||||
mModbusSEIConnectionState->setPlainText("Connection NetTrac: DÉCONNECTÉE");
|
||||
}
|
||||
|
||||
void CSEISettingsPage::ModbusSEILinkUP()
|
||||
{
|
||||
mSEIModbusLinkLED->setPixmap(QPixmap("./Images/green-led-on-md.png").scaled(25,25));
|
||||
mModbusSEILinkState->setPlainText("Lien Modbus SEI: Établi");
|
||||
}
|
||||
|
||||
void CSEISettingsPage::ModbusSEILinkDown()
|
||||
{
|
||||
mSEIModbusLinkLED->setPixmap(QPixmap("./Images/red-led-on-md.png").scaled(25,25));
|
||||
mModbusSEILinkState->setPlainText("Lien Modbus SEI: Non établi");
|
||||
}
|
||||
|
||||
void CSEISettingsPage::SpinBoxValueChanged(int value)
|
||||
{
|
||||
Q_UNUSED(value)
|
||||
ShowApplyButton();
|
||||
}
|
||||
|
||||
void CSEISettingsPage::ShowApplyButton()
|
||||
{
|
||||
mApplyButton->show();
|
||||
}
|
||||
|
||||
//Grab the mouse if the user clicks outside buttons
|
||||
void CSEISettingsPage::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
void CSEISettingsPage::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
55
sources/GuiElements/SEISettingsPage.h
Normal file
55
sources/GuiElements/SEISettingsPage.h
Normal file
@ -0,0 +1,55 @@
|
||||
#ifndef SEISETTINGSPAGE_H
|
||||
#define SEISETTINGSPAGE_H
|
||||
#include "GlobalDefine.h"
|
||||
#include <QGraphicsWidget>
|
||||
#include "Guipage.h"
|
||||
#include <QString>
|
||||
#include "PushButton.h"
|
||||
#include "ZTSimulator.h"
|
||||
#include "TextButtonWidget.h"
|
||||
#include <QCheckBox>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QGraphicsPixmapItem>
|
||||
|
||||
|
||||
class CZoneTest;
|
||||
|
||||
class CSEISettingsPage : public CGuiPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSEISettingsPage(QGraphicsWidget *Parent = 0);
|
||||
|
||||
CZoneTest *mProgramHandle;
|
||||
|
||||
int SetActualSettings(QHostAddress CCHostAdd);
|
||||
|
||||
virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void showEvent ( QShowEvent * event );
|
||||
|
||||
|
||||
private:
|
||||
QGraphicsRectItem *mBackgroundRect;
|
||||
CTextButtonWidget *mCancelButton, *mApplyButton;
|
||||
QSpinBox *mIPChunk1, *mIPChunk2, *mIPChunk3, *mIPChunk4;
|
||||
QString mCurIP;
|
||||
QGraphicsTextItem *mModbusSEIConnectionState, *mModbusSEILinkState;
|
||||
QGraphicsPixmapItem *mSEIConnectionLED, *mSEIModbusLinkLED;
|
||||
|
||||
void ShowApplyButton();
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void ButtonClicked(CTextButtonWidget *);
|
||||
void ModbusSEIConnected(qint32 LocalIP, qint32 RemoteIP);
|
||||
void ModbusSEIDisconnected();
|
||||
void ModbusSEILinkUP();
|
||||
void ModbusSEILinkDown();
|
||||
void SpinBoxValueChanged(int);
|
||||
};
|
||||
|
||||
#endif // SEISETTINGSPAGE_H
|
||||
@ -102,6 +102,7 @@ Panel::Panel()
|
||||
mGeneralSettingsPage = new CGeneralSettingsPage();
|
||||
mZTLogViewerPage = new CZTLogViewerPage();
|
||||
mModbusSettingsPage = new CModbusSettingsPage();
|
||||
mSEISettingsPage = new CSEISettingsPage();
|
||||
|
||||
scene->addItem(mWelcomePage);
|
||||
scene->addItem(mZTMainPage);
|
||||
@ -113,6 +114,7 @@ Panel::Panel()
|
||||
scene->addItem(mMaintenancePage);
|
||||
scene->addItem(mGeneralSettingsPage);
|
||||
scene->addItem(mModbusSettingsPage);
|
||||
scene->addItem(mSEISettingsPage);
|
||||
scene->addItem(mZTLogViewerPage);
|
||||
|
||||
mZTMainPage->setPos(0,0);
|
||||
@ -165,6 +167,11 @@ Panel::Panel()
|
||||
mModbusSettingsPage->resize(800,600);
|
||||
mModbusSettingsPage->setZValue(1);
|
||||
|
||||
mSEISettingsPage->setPos(112,84);
|
||||
mSEISettingsPage->hide();
|
||||
mSEISettingsPage->resize(800,600);
|
||||
mSEISettingsPage->setZValue(1);
|
||||
|
||||
mZTLogViewerPage->setPos(112,84);
|
||||
mZTLogViewerPage->hide();
|
||||
mZTLogViewerPage->resize(800,600);
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
#include "GeneralSettingsPage.h"
|
||||
#include "ZTLogViewerPage.h"
|
||||
#include "ModbusSettingsPage.h"
|
||||
#include "SEISettingsPage.h"
|
||||
|
||||
class CZoneTest;
|
||||
|
||||
@ -86,6 +87,7 @@ public:
|
||||
CGeneralSettingsPage *mGeneralSettingsPage;
|
||||
CZTLogViewerPage *mZTLogViewerPage;
|
||||
CModbusSettingsPage *mModbusSettingsPage;
|
||||
CSEISettingsPage *mSEISettingsPage;
|
||||
};
|
||||
|
||||
#endif // PANEL_H
|
||||
|
||||
@ -364,6 +364,7 @@ class CZTSettingsData
|
||||
bool mUseNetworkTime;
|
||||
bool mUseModbusCC;
|
||||
QHostAddress mModbusCCHostAddress;
|
||||
QHostAddress mSEIModbusHostAddress;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -83,6 +83,7 @@ unsigned int CZTSettingsFileMgr::LoadSettings(CZTSettingsData *SettingsData)
|
||||
*InputStream >> SettingsData->mUseNetworkTime;
|
||||
*InputStream >> SettingsData->mUseModbusCC;
|
||||
*InputStream >> SettingsData->mModbusCCHostAddress;
|
||||
*InputStream >> SettingsData->mSEIModbusHostAddress;
|
||||
|
||||
|
||||
|
||||
@ -130,6 +131,7 @@ unsigned int CZTSettingsFileMgr::SaveSettings(CZTSettingsData *SettingsData)
|
||||
*OutputStream << SettingsData->mUseNetworkTime;
|
||||
*OutputStream << SettingsData->mUseModbusCC;
|
||||
*OutputStream << SettingsData->mModbusCCHostAddress;
|
||||
*OutputStream << SettingsData->mSEIModbusHostAddress;
|
||||
|
||||
SettingsFile->flush();
|
||||
SettingsFile->close();
|
||||
@ -172,6 +174,7 @@ void CZTSettingsFileMgr::LoadDefaultSettings(CZTSettingsData *SettingsData)
|
||||
|
||||
SettingsData->mUseModbusCC = false;
|
||||
SettingsData->mModbusCCHostAddress.setAddress("10.158.224.27");
|
||||
SettingsData->mSEIModbusHostAddress.setAddress("10.158.224.28");
|
||||
|
||||
}
|
||||
void CZTSettingsFileMgr::SetStationName(QString StationName)
|
||||
|
||||
@ -269,6 +269,7 @@ unsigned int CZoneTest::Start()
|
||||
panel.mMaintenancePage->mProgramHandle = this;
|
||||
panel.mGeneralSettingsPage->mProgramHandle = this;
|
||||
panel.mModbusSettingsPage->mProgramHandle = this;
|
||||
panel.mSEISettingsPage->mProgramHandle = this;
|
||||
panel.mZTLogViewerPage->mProgramHandle = this;
|
||||
panel.mEngineeringPage->mDisablePassword = mDisablePassword;
|
||||
mInternalWatchdog = new CWatchdogCtrl(mUseWatchdog);
|
||||
@ -593,14 +594,6 @@ unsigned int CZoneTest::InitZT()
|
||||
}
|
||||
mModbusCCMgr->StartModbusCCServer();
|
||||
|
||||
mSEIModbusRepository = new CModbusRepository;
|
||||
mSEIModbusRepository->AddHRDataMap(SEI_MODBUS_ZT_DATA_BASE_REG,SEI_MODBUS_ZT_TABLE_DATA_SIZE); //Add the ZT data map
|
||||
mSEIModbusRepository->AddHRDataMap(SEI_MODBUS_SEI_DATA_BASE_REG,SEI_MODBUS_SEI_TABLE_DATA_SIZE); //Add the SEI data map
|
||||
if(mModbusSEIMgr == 0)
|
||||
{
|
||||
mModbusSEIMgr = new CModbusSEIMgr(mSEIModbusRepository,ModbusSEIPort,SEIDevID);
|
||||
}
|
||||
|
||||
CModbusTKTransport *TransportInterface = new CModbusTKTransport(mCCModbusRepository);
|
||||
mTKTransportInterface = (CTKTransportInterface*)TransportInterface;
|
||||
connect(mModbusCCMgr,SIGNAL(RepoHasChanged()),TransportInterface,SLOT(ModbusCCUpdated()));
|
||||
@ -617,6 +610,17 @@ unsigned int CZoneTest::InitZT()
|
||||
panel.mZTMainPage->ModbusCCDisconnected();
|
||||
panel.mZTMainPage->mZT1Stats->Init(true);
|
||||
panel.mZTMainPage->mZT2Stats->Init(true);
|
||||
|
||||
|
||||
mSEIModbusRepository = new CModbusRepository;
|
||||
mSEIModbusRepository->AddHRDataMap(SEI_MODBUS_ZT_DATA_BASE_REG,SEI_MODBUS_ZT_TABLE_DATA_SIZE); //Add the ZT data map
|
||||
mSEIModbusRepository->AddHRDataMap(SEI_MODBUS_SEI_DATA_BASE_REG,SEI_MODBUS_SEI_TABLE_DATA_SIZE); //Add the SEI data map
|
||||
if(mModbusSEIMgr == 0)
|
||||
{
|
||||
mModbusSEIMgr = new CModbusSEIMgr(mSEIModbusRepository,ModbusSEIPort,SEIDevID);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1188,6 +1192,23 @@ void CZoneTest::ModbusSettingsChangedReboot(bool UseModbus, QHostAddress CCHostA
|
||||
|
||||
}
|
||||
|
||||
//Messages from SEI settings page
|
||||
void CZoneTest::OpenSEISettingsPage()
|
||||
{
|
||||
panel.mSEISettingsPage->show();
|
||||
panel.mOptionsPage->hide();
|
||||
}
|
||||
|
||||
void CZoneTest::CloseSEISettingsPage()
|
||||
{
|
||||
panel.mSEISettingsPage->hide();
|
||||
}
|
||||
|
||||
void CZoneTest::ApplySEISettings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
///Messages from ZTLog viewer page
|
||||
void CZoneTest::ShowZTLogViewerPage()
|
||||
{
|
||||
|
||||
@ -130,6 +130,10 @@ public:
|
||||
void CloseModbusSettingsPage();
|
||||
void ModbusSettingsChangedReboot(bool UseModbus, QHostAddress CCHostAdd);
|
||||
|
||||
void OpenSEISettingsPage();
|
||||
void CloseSEISettingsPage();
|
||||
void ApplySEISettings();
|
||||
|
||||
void ShowZTLogViewerPage();
|
||||
void HideZTLogViewerPage();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user