Added new device-type: DeviceGroup

This commit is contained in:
Micke Prag 2009-01-09 16:05:57 +00:00
parent e4e6da2918
commit e5fa83566f
7 changed files with 207 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#include "Manager.h"
#include "Device.h"
#include "DeviceGroup.h"
#include "DeviceNexa.h"
#include "DeviceWaveman.h"
#include "DeviceSartano.h"
@ -65,6 +66,10 @@ Device *Manager::getDevice(int intDeviceId){
std::string strCode = settings.getDeviceParameter(intDeviceId, "nexa_unit");
dev = new DeviceNexa(intModel, strHouse, strCode);
} else if (strcasecmp(protocol.c_str(), "group") == 0) {
std::string strDevices = settings.getDeviceParameter(intDeviceId, "devices");
dev = new DeviceGroup(intModel, strDevices);
} else if (strcasecmp(protocol.c_str(), "Waveman") == 0) {
std::string strHouse = settings.getDeviceParameter(intDeviceId, "nexa_house");
std::string strCode = settings.getDeviceParameter(intDeviceId, "nexa_unit");