Commit 8718dd6b authored by Jean-Luc Pons's avatar Jean-Luc Pons

Allow to start empty device

parent f58c5db9
......@@ -158,12 +158,7 @@ void AttributeCombiner::init_device()
// Create BLM group
deviceGroup = new Tango::Group("DEVGROUP");
if(deviceList.size()==0) {
cerr << "ERROR: DeviceList device property not defined" << endl;
exit(0);
}
errorStack.clear();
for (int i = 0; i < (int)deviceList.size(); i++) {
// Populate error vector
......@@ -453,11 +448,13 @@ void AttributeCombiner::add_dynamic_attributes()
}
// States attribute
vector<string> stateName;
stateName.push_back("State");
DynSpectrumAttribute *stateAtt = new DynSpectrumAttribute("States", Tango::DEV_STATE, deviceList.size(), Tango::READ, false);
add_attribute(stateAtt);
attMap.add("States", stateName, false, Tango::DEV_STATE, Tango::READ, false, "None", false);
if( deviceList.size()>0 ) {
vector<string> stateName;
stateName.push_back("State");
DynSpectrumAttribute *stateAtt = new DynSpectrumAttribute("States", Tango::DEV_STATE, deviceList.size(),Tango::READ, false);
add_attribute(stateAtt);
attMap.add("States", stateName, false, Tango::DEV_STATE, Tango::READ, false, "None", false);
}
/*----- PROTECTED REGION END -----*/ // AttributeCombiner::add_dynamic_attributes
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment