Commit f2f670aa authored by Nicolas Tappret's avatar Nicolas Tappret

fix CommandList not working and add check if DeviceList property is size > 0

parent bbf51d30
......@@ -167,6 +167,11 @@ void AttributeCombiner::init_device()
attr_DeviceList_read = new Tango::DevString[4096];
/*----- PROTECTED REGION ID(AttributeCombiner::init_device) ENABLED START -----*/
if (deviceList.size() == 0) {
cerr << device_name << ":deviceList is mandatory for the start of the device server" <<endl;
exit(1);
}
set_state(Tango::ON);
set_status("ON");
......@@ -1781,21 +1786,5 @@ void AttributeCombiner::add_dynamic_commands()
}
return Tango::ALARM;
}
// //--------------------------------------------------------
// /**
// * Command saveReference related method
// * Description: for create dynamicaly a commande for save live attribute to reference attribute
// *
// */
// //--------------------------------------------------------
// void AttributeCombiner::save_reference(Tango::Command &command)
// {
// DEBUG_STREAM << "AttributeCombiner::" << command.get_name() << " - " << device_name << endl;
//
// // Add your own code
//
// }
/*----- PROTECTED REGION END -----*/ // AttributeCombiner::namespace_ending
} // namespace
......@@ -560,6 +560,13 @@ void AttributeCombinerClass::device_factory(const Tango::DevVarStringArray *devl
/*----- PROTECTED REGION ID(AttributeCombinerClass::device_factory_after) ENABLED START -----*/
// Add your own code
for (unsigned long i=1 ; i<=devlist_ptr->length() ; i++)
{
// Add dynamic attributes if any
AttributeCombiner *dev = static_cast<AttributeCombiner *>(device_list[device_list.size()-i]);
dev->add_dynamic_commands();
}
/*----- PROTECTED REGION END -----*/ // AttributeCombinerClass::device_factory_after
}
......
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