From bf3130376308a01ba9d34bcf1b6ed27d134f51de Mon Sep 17 00:00:00 2001 From: jfmartel Date: Thu, 2 Jan 2025 09:04:49 -0500 Subject: [PATCH] Interface chalet LTE fonctionnelle --- Configuration/Settings.mcs | Bin 126 -> 126 bytes MasterCtrl.pro | 8 +-- ...{ChaletLoraDevice.cpp => ChaletDevice.cpp} | 49 ++++++++++-------- .../{ChaletLoraDevice.h => ChaletDevice.h} | 15 +++--- Sources/Chalet/ChaletInterface.cpp | 2 +- Sources/Chalet/ChaletInterface.h | 6 +-- Sources/Chalet/ChaletModbusServer.h | 2 +- Sources/Chalet/ThingsBoardInterface.cpp | 2 +- Sources/Chalet/ThingsBoardInterface.h | 4 +- Sources/EthernetNetworkCommIF.cpp | 3 ++ Sources/EthernetNetworkServer.cpp | 14 +++++ Sources/MasterCtrl.cpp | 14 ++++- Sources/MasterCtrl.h | 5 +- Sources/NetworkDevice.cpp | 7 ++- Sources/NetworkDevicesMgr.cpp | 10 +++- Sources/NetworkDevicesMgr.h | 6 ++- 16 files changed, 97 insertions(+), 50 deletions(-) rename Sources/Chalet/{ChaletLoraDevice.cpp => ChaletDevice.cpp} (92%) rename Sources/Chalet/{ChaletLoraDevice.h => ChaletDevice.h} (90%) diff --git a/Configuration/Settings.mcs b/Configuration/Settings.mcs index 752ca24622c4656dc886405cfe0a7344628bfe11..40c89a7841b1d1da66c60afff1e5ceea3fea91b6 100644 GIT binary patch delta 10 Rcmb=cn^4JW&cN=-000vE0*U|t delta 10 Rcmb=cn^4JW#=!2#000v90*L?s diff --git a/MasterCtrl.pro b/MasterCtrl.pro index ca3107a..a627b3d 100644 --- a/MasterCtrl.pro +++ b/MasterCtrl.pro @@ -8,7 +8,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets HEADERS += \ Sources/Chalet/ChaletData.h \ Sources/Chalet/ChaletInterface.h \ - Sources/Chalet/ChaletLoraDevice.h \ Sources/Ispindel/IspindelData.h \ Sources/LoraNetworkCommIF.h \ Sources/MasterCtrl.h \ @@ -58,12 +57,12 @@ HEADERS += \ Sources/LoraModuleInterface/LoraModuleInterface.h \ Sources/NetworkCommIFSurrogate.h \ Sources/LoraModuleInterface/LoraModuleInterfaceData.h \ - Sources/LoraModuleInterface/LoraModuleInterfaceInterface.h + Sources/LoraModuleInterface/LoraModuleInterfaceInterface.h \ + Sources/Chalet/ChaletDevice.h SOURCES += \ Sources/Chalet/ChaletData.cpp \ Sources/Chalet/ChaletInterface.cpp \ - Sources/Chalet/ChaletLoraDevice.cpp \ Sources/Ispindel/IspindelData.cpp \ Sources/LoraNetworkCommIF.cpp \ Sources/main.cpp \ @@ -109,7 +108,8 @@ SOURCES += \ Sources/LoraModuleInterface/LoraModuleInterface.cpp \ Sources/NetworkCommIFSurrogate.cpp \ Sources/LoraModuleInterface/LoraModuleInterfaceData.cpp \ - Sources/LoraModuleInterface/LoraModuleInterfaceInterface.cpp + Sources/LoraModuleInterface/LoraModuleInterfaceInterface.cpp \ + Sources/Chalet/ChaletDevice.cpp DEFINES -= Q_OS_UNIX diff --git a/Sources/Chalet/ChaletLoraDevice.cpp b/Sources/Chalet/ChaletDevice.cpp similarity index 92% rename from Sources/Chalet/ChaletLoraDevice.cpp rename to Sources/Chalet/ChaletDevice.cpp index ea45094..96ceec8 100644 --- a/Sources/Chalet/ChaletLoraDevice.cpp +++ b/Sources/Chalet/ChaletDevice.cpp @@ -1,8 +1,8 @@ -#include "ChaletLoraDevice.h" +#include "ChaletDevice.h" #include "GlobalDefine.h" -CChaletLoraDevice::CChaletLoraDevice(int Address, CAbstractNetworkCommIF *NetworkInterface): +CChaletDevice::CChaletDevice(int Address, CAbstractNetworkCommIF *NetworkInterface): CNetworkDevice(ID_CHALET_DEVICE,Address,NetworkInterface) { NetworkInterface->mDevicePtr = this; @@ -27,12 +27,12 @@ CChaletLoraDevice::CChaletLoraDevice(int Address, CAbstractNetworkCommIF *Networ ResetCommStats(); } -CChaletLoraDevice::~CChaletLoraDevice() +CChaletDevice::~CChaletDevice() { delete mChaletStatusTimer; } -int CChaletLoraDevice::Start() +int CChaletDevice::Start() { ScheduleChaletStatusRequest(); mChaletStatusTimer->start(1000); @@ -40,7 +40,7 @@ int CChaletLoraDevice::Start() return RET_OK; } -int CChaletLoraDevice::NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data) +int CChaletDevice::NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data) { Q_UNUSED(DeviceID) Q_UNUSED(DeviceAddress) @@ -245,7 +245,7 @@ int CChaletLoraDevice::NewDeviceFrameReceived(int DeviceID, int DeviceAddress, i return RET_OK; } -void CChaletLoraDevice::CommTimerExpired() +void CChaletDevice::CommTimerExpired() { if(mPendingNetworkMsgList.isEmpty()) { @@ -295,7 +295,7 @@ void CChaletLoraDevice::CommTimerExpired() // SendChaletCommand(CHALET_GENERAL_STATUS_REQUEST,0,QByteArray()); } -int CChaletLoraDevice::SendWiFiModuleSetState(bool State) +int CChaletDevice::SendWiFiModuleSetState(bool State) { QByteArray Data; Data.resize(1); @@ -311,7 +311,7 @@ int CChaletLoraDevice::SendWiFiModuleSetState(bool State) return ScheduleChaletCommand(CHALET_WIFI_SET_STATE_REQUEST,1,Data); } -int CChaletLoraDevice::SendInverterPowerRelayState(bool State) +int CChaletDevice::SendInverterPowerRelayState(bool State) { QByteArray Data; Data.resize(1); @@ -327,7 +327,7 @@ int CChaletLoraDevice::SendInverterPowerRelayState(bool State) return ScheduleChaletCommand(CHALET_AC_POWER_SET_STATE_REQUEST,Data); } -int CChaletLoraDevice::SendDOHarakiri() +int CChaletDevice::SendDOHarakiri() { QByteArray Data; //Magic word... Data.clear(); @@ -339,7 +339,7 @@ int CChaletLoraDevice::SendDOHarakiri() return ScheduleChaletCommand(CHALET_DO_HARAKIRI_REQUEST,Data); } -int CChaletLoraDevice::SendRebootCmd() +int CChaletDevice::SendRebootCmd() { QByteArray Data; //Magic word... Data.clear(); @@ -350,33 +350,38 @@ int CChaletLoraDevice::SendRebootCmd() return ScheduleChaletCommand(CHALET_REBOOT_CPU_REQUEST,Data); } -int CChaletLoraDevice::SendGetWifiParams() +int CChaletDevice::SendGetWifiParams() { return ScheduleChaletCommand(CHALET_GET_STORED_WIFI_SETTINGS_REQUEST,QByteArray()); } -int CChaletLoraDevice::SendSetWifiParams(QByteArray Data) +int CChaletDevice::SendSetWifiParams(QByteArray Data) { return ScheduleChaletCommand(CHALET_SET_STORED_WIFI_SETTINGS_REQUEST,Data); } -int CChaletLoraDevice::SendGetFirmwareVersion() +int CChaletDevice::SendGetFirmwareVersion() { return ScheduleChaletCommand(CHALET_GET_FIRMWARE_VERSION_REQUEST,QByteArray()); } -int CChaletLoraDevice::SendClearCommStatsRequest() +int CChaletDevice::SendClearCommStatsRequest() { return ScheduleChaletCommand(CHALET_CLEAR_COMMS_STATISTICS_REQUEST,QByteArray()); } -int CChaletLoraDevice::SendGetWifiStatusRequest() +int CChaletDevice::SendGetWifiStatusRequest() { return ScheduleChaletCommand(CHALET_WIFI_STATUS_REQUEST,QByteArray()); } -int CChaletLoraDevice::SendChaletCommand(int CmdID, int DataSize, QByteArray Data) +int CChaletDevice::SendChaletCommand(int CmdID, int DataSize, QByteArray Data) { + if(mNetworkInterfacePtr == 0) + { + return RET_ERROR; + } + mNetworkInterfacePtr->SendNetworkMessage(ID_CHALET_DEVICE,mDeviceAddress,CmdID,DataSize,&Data); mTotalNbRequest++; mChaletMainStatus.mTotalNbMasterTxCmds++; @@ -384,7 +389,7 @@ int CChaletLoraDevice::SendChaletCommand(int CmdID, int DataSize, QByteArray Dat return RET_OK; } -int CChaletLoraDevice::CmdResponseReceived(int CmdID) +int CChaletDevice::CmdResponseReceived(int CmdID) { Q_UNUSED(CmdID) @@ -423,12 +428,12 @@ int CChaletLoraDevice::CmdResponseReceived(int CmdID) -int CChaletLoraDevice::ScheduleChaletStatusRequest() +int CChaletDevice::ScheduleChaletStatusRequest() { return ScheduleChaletCommand(CHALET_GENERAL_STATUS_REQUEST,0,QByteArray()); } -int CChaletLoraDevice::ScheduleChaletCommand(int CmdID, int DataSize, QByteArray Data) +int CChaletDevice::ScheduleChaletCommand(int CmdID, int DataSize, QByteArray Data) { Q_UNUSED(DataSize) @@ -445,7 +450,7 @@ int CChaletLoraDevice::ScheduleChaletCommand(int CmdID, int DataSize, QByteArray return RET_OK; } -int CChaletLoraDevice::ScheduleChaletCommand(int CmdID, QByteArray Data) +int CChaletDevice::ScheduleChaletCommand(int CmdID, QByteArray Data) { // if(mChaletMainStatus.mIsOnline == false) // { @@ -471,7 +476,7 @@ int CChaletLoraDevice::ScheduleChaletCommand(int CmdID, QByteArray Data) return RET_OK; } -int CChaletLoraDevice::ResetCommStats() +int CChaletDevice::ResetCommStats() { mLostRequestPercentage = 0.0; mTotalNbRequest = 0; @@ -482,7 +487,7 @@ int CChaletLoraDevice::ResetCommStats() return RET_OK; } -int CChaletLoraDevice::ComputeCommStats() +int CChaletDevice::ComputeCommStats() { mLostRequestPercentage = ((float)mNbLostRequest/(float)mTotalNbRequest)*100; mChaletMainStatus.mLostRequestPercentage = mLostRequestPercentage; diff --git a/Sources/Chalet/ChaletLoraDevice.h b/Sources/Chalet/ChaletDevice.h similarity index 90% rename from Sources/Chalet/ChaletLoraDevice.h rename to Sources/Chalet/ChaletDevice.h index ee6aec5..f6d04a8 100644 --- a/Sources/Chalet/ChaletLoraDevice.h +++ b/Sources/Chalet/ChaletDevice.h @@ -1,9 +1,9 @@ -#ifndef CCHALETLORADEVICE_H -#define CCHALETLORADEVICE_H +#ifndef CCHALETDEVICE_H +#define CCHALETDEVICE_H #include #include #include -#include "LoraNetworkCommIF.h" +#include "NetworkProtocol.h" #include "NetworkDevice.h" #include #include "ChaletData.h" @@ -26,16 +26,17 @@ #define LORA_CHALET_STATUS_POWER_RELAY_MASK 0x01 #define LORA_CHALET_STATUS_CUR_SENSOR_MASK 0x02 -class CChaletLoraDevice : public QObject, public CNetworkDevice +class CChaletDevice : public QObject, public CNetworkDevice { Q_OBJECT public: - CChaletLoraDevice(int Address,CAbstractNetworkCommIF *NetworkInterface); - ~CChaletLoraDevice(); + CChaletDevice(int Address,CAbstractNetworkCommIF *NetworkInterface); + ~CChaletDevice(); virtual int NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data); + QString mChaletName; QTimer *mChaletStatusTimer; int Start(); @@ -93,4 +94,4 @@ public slots: }; -#endif // CCHALETLORADEVICE_H +#endif // CCHALETDEVICE_H diff --git a/Sources/Chalet/ChaletInterface.cpp b/Sources/Chalet/ChaletInterface.cpp index 579872f..64bd9af 100644 --- a/Sources/Chalet/ChaletInterface.cpp +++ b/Sources/Chalet/ChaletInterface.cpp @@ -1,7 +1,7 @@ #include "ChaletInterface.h" #include "ChaletDataLogger.h" -CChaletInterface::CChaletInterface(int Address, CAbstractNetworkCommIF *NetworkInterface, CChaletLoraDevice *DevicePtr): +CChaletInterface::CChaletInterface(int Address, CAbstractNetworkCommIF *NetworkInterface, CChaletDevice *DevicePtr): CNetworkDevice(ID_CHALET_INTERFACE,Address,NetworkInterface) { mChaletLoraDevice = DevicePtr; diff --git a/Sources/Chalet/ChaletInterface.h b/Sources/Chalet/ChaletInterface.h index 7258896..ef6bd6b 100644 --- a/Sources/Chalet/ChaletInterface.h +++ b/Sources/Chalet/ChaletInterface.h @@ -3,19 +3,19 @@ #include "NetworkDevice.h" -#include "ChaletLoraDevice.h" +#include "ChaletDevice.h" class CChaletInterface: public QObject, public CNetworkDevice { Q_OBJECT public: - CChaletInterface(int Address, CAbstractNetworkCommIF *NetworkInterface, CChaletLoraDevice *DevicePtr); + CChaletInterface(int Address, CAbstractNetworkCommIF *NetworkInterface, CChaletDevice *DevicePtr); virtual int NewDeviceFrameReceived(int DeviceID, int DeviceAddress, int MessageID, int DataSize, QByteArray Data); void SendChaletCommActivityBeacon(); private: - CChaletLoraDevice *mChaletLoraDevice; + CChaletDevice *mChaletLoraDevice; CChaletDataLogger *mChaletDataLogger; public slots: diff --git a/Sources/Chalet/ChaletModbusServer.h b/Sources/Chalet/ChaletModbusServer.h index f168dd8..7173be3 100644 --- a/Sources/Chalet/ChaletModbusServer.h +++ b/Sources/Chalet/ChaletModbusServer.h @@ -4,7 +4,7 @@ #include #include -class CChaletLoraDevice; +class CChaletDevice; class CChaletModbusServer : public CModbusBackend { diff --git a/Sources/Chalet/ThingsBoardInterface.cpp b/Sources/Chalet/ThingsBoardInterface.cpp index fc96a3d..34f2da3 100644 --- a/Sources/Chalet/ThingsBoardInterface.cpp +++ b/Sources/Chalet/ThingsBoardInterface.cpp @@ -2,7 +2,7 @@ #include #include #include -#include "ChaletLoraDevice.h" +#include "ChaletDevice.h" CThingsBoardInterface::CThingsBoardInterface() diff --git a/Sources/Chalet/ThingsBoardInterface.h b/Sources/Chalet/ThingsBoardInterface.h index de94c3f..4a978dc 100644 --- a/Sources/Chalet/ThingsBoardInterface.h +++ b/Sources/Chalet/ThingsBoardInterface.h @@ -1,7 +1,7 @@ #ifndef THINGSBOARDINTERFACE_H #define THINGSBOARDINTERFACE_H -class CChaletLoraDevice; +class CChaletDevice; #include #include @@ -14,7 +14,7 @@ public: CThingsBoardInterface(); ~CThingsBoardInterface(); - CChaletLoraDevice *mChaletLoraDevice; + CChaletDevice *mChaletLoraDevice; int RegisterThingsboardRPC(); void UpdateChaletVoltage(float Voltage); diff --git a/Sources/EthernetNetworkCommIF.cpp b/Sources/EthernetNetworkCommIF.cpp index 1e07e34..e38f17d 100644 --- a/Sources/EthernetNetworkCommIF.cpp +++ b/Sources/EthernetNetworkCommIF.cpp @@ -24,6 +24,8 @@ int CEthernetNetworkCommIF::SendNetworkMessage(int DeviceID, int DeviceAddress, // Q_UNUSED(MessageID) // Q_UNUSED(DataSize) // Q_UNUSED(Data) + if(mTCPSocket == 0) + return RET_ERROR; QByteArray Packet; if(Data != 0) @@ -34,6 +36,7 @@ int CEthernetNetworkCommIF::SendNetworkMessage(int DeviceID, int DeviceAddress, { Packet = GetTxPacket(MessageID,0,0,0,DeviceAddress,DeviceID); } + mTCPSocket->write(Packet); return RET_OK; diff --git a/Sources/EthernetNetworkServer.cpp b/Sources/EthernetNetworkServer.cpp index fb6681f..2ced754 100644 --- a/Sources/EthernetNetworkServer.cpp +++ b/Sources/EthernetNetworkServer.cpp @@ -222,6 +222,20 @@ void CEthernetNetworkServer::DeviceSocketDataAvail() } break; } + case ID_CHALET_DEVICE: + { + if(mDevicesMgrHandle->BindNetworkChaletDevice(DeviceAddress,(CAbstractNetworkCommIF*)NetworkIF) == RET_OK) + { + Result = RES_CREATION_SUCCESS; + qDebug("Created new Ethernet (LTE) Chalet Device in ethernet server"); + } + else + { + Result = RES_CREATION_FAILED; + qDebug("Could not create Ethernet (LTE) Chalet Device in ethernet server"); + } + break; + } default: { Result = RES_CREATION_UNKNOWN_DEVICE; diff --git a/Sources/MasterCtrl.cpp b/Sources/MasterCtrl.cpp index 58f413c..3ab9d57 100644 --- a/Sources/MasterCtrl.cpp +++ b/Sources/MasterCtrl.cpp @@ -1,5 +1,6 @@ #include "MasterCtrl.h" #include +#include "EthernetNetworkCommIF.h" // #include //#include @@ -28,14 +29,17 @@ CMasterCtrl::CMasterCtrl() if(mMasterCtrlSettings.mChaletUseLoraIF == true) { mChaletLoraModuleInterface = new CLoraModuleInterface(); //JFM LoraInterface Dev - mChaletLoraDevice = new CChaletLoraDevice(1,mChaletLoraModuleInterface); //JFM LoraInterface Dev + mChaletLoraDevice = new CChaletDevice(1,mChaletLoraModuleInterface); //JFM LoraInterface Dev } else { mChaletLoraNetworkCommInterface = new CLoraNetworkCommIF();//JFM LoraInterface Dev - mChaletLoraDevice = new CChaletLoraDevice(1,mChaletLoraNetworkCommInterface);//JFM LoraInterface Dev + mChaletLoraDevice = new CChaletDevice(1,mChaletLoraNetworkCommInterface);//JFM LoraInterface Dev } + CEthernetNetworkCommIF *Dummy = new CEthernetNetworkCommIF(NULL); //No memory leak here.. object will be deleted on reasignment. + mChaletLTEDevice = new CChaletDevice(1,(CAbstractNetworkCommIF*)Dummy); + // mChaletLoraInterface = new CChaletLoraInterface(mRooftopTowerLoraDevice); @@ -96,6 +100,7 @@ void CMasterCtrl::Start() mNetworkDevicesManager->mChaletLoraDevice = mChaletLoraDevice; mNetworkDevicesManager->mIspindelDevice = mIspindelDevice; mNetworkDevicesManager->mLoraModuleInterfaceDevice = mChaletLoraModuleInterface; + mNetworkDevicesManager->mChaletLTEDevice = mChaletLTEDevice; mEthernetNetworkServer->mDevicesMgrHandle = mNetworkDevicesManager; @@ -137,9 +142,14 @@ void CMasterCtrl::Start() // mChaletLoraNetworkCommInterface->SetLoraSerialPortSettings("COM5",QSerialPort::Baud9600); + mChaletLoraDevice->mChaletName = "Chalet Lora"; mChaletLoraDevice->Start(); + mChaletLTEDevice->mChaletName = "Chalet LTE"; + mChaletLTEDevice->Start(); + + diff --git a/Sources/MasterCtrl.h b/Sources/MasterCtrl.h index a965c37..956e7d5 100644 --- a/Sources/MasterCtrl.h +++ b/Sources/MasterCtrl.h @@ -12,7 +12,7 @@ #include "EthernetNetworkServer.h" #include "ContactRepository.h" #include "SprinklerMgr.h" -#include "ChaletLoraDevice.h" +#include "ChaletDevice.h" //#include "ChaletLoraInterface.h" #include "LoraNetworkCommIF.h" #include "HttpServer.h" @@ -41,7 +41,8 @@ public: CContactRepository *mContactsRepository; CSprinklerMgr *mSprinklerManager; - CChaletLoraDevice *mChaletLoraDevice; + CChaletDevice *mChaletLoraDevice; + CChaletDevice *mChaletLTEDevice; // CChaletLoraInterface *mChaletLoraInterface; CLoraNetworkCommIF *mChaletLoraNetworkCommInterface; CLoraModuleInterface *mChaletLoraModuleInterface; diff --git a/Sources/NetworkDevice.cpp b/Sources/NetworkDevice.cpp index 2bbf774..d9ca0f3 100644 --- a/Sources/NetworkDevice.cpp +++ b/Sources/NetworkDevice.cpp @@ -5,8 +5,9 @@ CNetworkDevice::CNetworkDevice(int DeviceID, int DeviceAddress, CAbstractNetwork { mDeviceAddress = DeviceAddress; mDeviceID = DeviceID; - SetNetworkInterface(Interface); mIsOnline = false; + mNetworkInterfacePtr = 0; + SetNetworkInterface(Interface); } CNetworkDevice::~CNetworkDevice() @@ -19,7 +20,9 @@ CNetworkDevice::~CNetworkDevice() void CNetworkDevice::SetNetworkInterface(CAbstractNetworkCommIF *Interface) { - mNetworkInterfacePtr = Interface; + if(mNetworkInterfacePtr != 0) + delete mNetworkInterfacePtr; + mNetworkInterfacePtr = Interface; if(Interface != 0) { mNetworkInterfacePtr->mDevicePtr = this; diff --git a/Sources/NetworkDevicesMgr.cpp b/Sources/NetworkDevicesMgr.cpp index d64b6fa..05a241d 100644 --- a/Sources/NetworkDevicesMgr.cpp +++ b/Sources/NetworkDevicesMgr.cpp @@ -102,7 +102,8 @@ int CNetworkDevicesMgr::CreateNewChaletInterface(int Address, CAbstractNetworkCo { return RET_ERROR; } - CChaletInterface *ChaletInterface = new CChaletInterface(Address, NetworkIF,mChaletLoraDevice); +// CChaletInterface *ChaletInterface = new CChaletInterface(Address, NetworkIF,mChaletLoraDevice); + CChaletInterface *ChaletInterface = new CChaletInterface(Address, NetworkIF,mChaletLTEDevice); mNetworkDevicesList.append((CNetworkDevice*)ChaletInterface); return RET_OK; } @@ -130,6 +131,13 @@ int CNetworkDevicesMgr::CreateNewLoraInterfaceInterface(int Address, CAbstractNe return RET_OK; } +int CNetworkDevicesMgr::BindNetworkChaletDevice(int Address, CAbstractNetworkCommIF *NetworkIF) +{ + mChaletLTEDevice->mDeviceAddress = Address; + mChaletLTEDevice->SetNetworkInterface(NetworkIF); + return RET_OK; +} + void CNetworkDevicesMgr::EthernetNetworkDeviceDisconnected(CNetworkDevice *Device) { qDebug("Device disconnected. ID: %d, Address: %d",Device->GetDeviceID(),Device->GetDeviceAddress()); diff --git a/Sources/NetworkDevicesMgr.h b/Sources/NetworkDevicesMgr.h index 6fe1845..f44092f 100644 --- a/Sources/NetworkDevicesMgr.h +++ b/Sources/NetworkDevicesMgr.h @@ -19,7 +19,7 @@ class CMasterCtrl; class CContactRepository; class CSprinklerMgr; class CAVReceiverDevice; -class CChaletLoraDevice; +class CChaletDevice; class CIspindelDevice; class CLoraModuleInterface; @@ -40,19 +40,21 @@ public: int CreateNewChaletInterface(int Address, CAbstractNetworkCommIF *NetworkIF); int CreateNewIspindleInterface(int Address, CAbstractNetworkCommIF *NetworkIF); int CreateNewLoraInterfaceInterface(int Address, CAbstractNetworkCommIF *NetworkIF); + int BindNetworkChaletDevice(int Address, CAbstractNetworkCommIF *NetworkIF); int FindDeviceByPtr(CNetworkDevice *Device); CNetworkDevice *GetDevice(int DeviceID, int Address); QList GetDevices(int DeviceID); CAVReceiverDevice *mAvReceiverDevice; - CChaletLoraDevice *mChaletLoraDevice; + CChaletDevice *mChaletLoraDevice; CIspindelDevice *mIspindelDevice; CVoipMsSMSClient *mVoipMSInterfaceHandle; CContactRepository *mContactRepositoryHandle; CMasterCtrl *mProgramHandle; CSprinklerMgr *mSprinklerMgrHandle; CLoraModuleInterface *mLoraModuleInterfaceDevice; + CChaletDevice *mChaletLTEDevice; int NewSMSMessagesReceived(QList NewMessages);