|
@@ -88,18 +88,21 @@ void DataEngine::startup_DataAlarm(DeviceInfo di)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- DeviceController* pControler = new DeviceController();
|
|
|
- pControler->regConsumer(this);
|
|
|
- pControler->CreateDevice(di);
|
|
|
-
|
|
|
std::list<std::string> lstTopics;
|
|
|
std::vector<Setting>::iterator itr;
|
|
|
for( itr = di.ModuleInfo.vSettings.begin(); itr != di.ModuleInfo.vSettings.end(); ++itr )
|
|
|
{
|
|
|
- std::string topic = itr->Name;
|
|
|
+ std::string table = itr->Name;
|
|
|
+
|
|
|
+ DeviceInfo ditem = di;
|
|
|
+ ditem.ModuleInfo.vSettings.clear();
|
|
|
+ ditem.ModuleInfo.vSettings.push_back(*itr);
|
|
|
+ DeviceController* pControler = new DeviceController();
|
|
|
+ pControler->regConsumer(this);
|
|
|
+ pControler->CreateDevice(/*m_pTDengine,*/ditem);
|
|
|
|
|
|
- lstTopics.push_back(topic);
|
|
|
- m_mpDevControler[topic].push_back(pControler);
|
|
|
+ lstTopics.push_back(table);
|
|
|
+ m_mpDevControler[table].push_back(pControler);
|
|
|
}
|
|
|
if( lstTopics.begin() != lstTopics.end())
|
|
|
{
|