Loading src/MetadataImporter.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,13 @@ void MetadataImporter::init_device() m_client_sp = SSLClient::create(this, m_configuration_sp); else m_client_sp = PlainClient::create(this, m_configuration_sp); //Start device if auto start enabled if(autoStart) { INFO_STREAM << "FitsImporter::init_device() auto start enabled " << endl; on(); } } catch(std::exception& ex) { Loading Loading @@ -209,6 +216,7 @@ void MetadataImporter::get_device_property() dev_prop.push_back(Tango::DbDatum("DatabaseTable")); dev_prop.push_back(Tango::DbDatum("RefreshTime")); dev_prop.push_back(Tango::DbDatum("Timeout")); dev_prop.push_back(Tango::DbDatum("AutoStart")); // is there at least one property to be read ? if (dev_prop.size()>0) Loading Loading @@ -377,6 +385,17 @@ void MetadataImporter::get_device_property() // And try to extract Timeout value from database if (dev_prop[i].is_empty()==false) dev_prop[i] >> timeout; // Try to initialize AutoStart from class property cl_prop = ds_class->get_class_property(dev_prop[++i].name); if (cl_prop.is_empty()==false) cl_prop >> autoStart; else { // Try to initialize AutoStart from default device value def_prop = ds_class->get_default_device_property(dev_prop[i].name); if (def_prop.is_empty()==false) def_prop >> autoStart; } // And try to extract AutoStart value from database if (dev_prop[i].is_empty()==false) dev_prop[i] >> autoStart; } /*----- PROTECTED REGION ID(MetadataImporter::get_device_property_after) ENABLED START -----*/ Loading src/MetadataImporter.h +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,8 @@ public: Tango::DevULong refreshTime; // Timeout: Connection timeout (seconds) Tango::DevULong timeout; // AutoStart: Exec On command after init if state is not fault Tango::DevBoolean autoStart; // Constructors and destructors Loading src/MetadataImporter.xmi +5 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,11 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>60</DefaultPropValue> </deviceProperties> <deviceProperties name="AutoStart" description="Exec On command after init if state is not fault"> <type xsi:type="pogoDsl:BooleanType"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>false</DefaultPropValue> </deviceProperties> <commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0"> <argin description="none"> <type xsi:type="pogoDsl:VoidType"/> Loading src/MetadataImporterClass.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,20 @@ void MetadataImporterClass::set_default_property() } else add_wiz_dev_prop(prop_name, prop_desc); prop_name = "AutoStart"; prop_desc = "Exec On command after init if state is not fault"; prop_def = "false"; vect_data.clear(); vect_data.push_back("false"); if (prop_def.length()>0) { Tango::DbDatum data(prop_name); data << vect_data ; dev_def_prop.push_back(data); add_wiz_dev_prop(prop_name, prop_desc, prop_def); } else add_wiz_dev_prop(prop_name, prop_desc); } //-------------------------------------------------------- Loading Loading
src/MetadataImporter.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,13 @@ void MetadataImporter::init_device() m_client_sp = SSLClient::create(this, m_configuration_sp); else m_client_sp = PlainClient::create(this, m_configuration_sp); //Start device if auto start enabled if(autoStart) { INFO_STREAM << "FitsImporter::init_device() auto start enabled " << endl; on(); } } catch(std::exception& ex) { Loading Loading @@ -209,6 +216,7 @@ void MetadataImporter::get_device_property() dev_prop.push_back(Tango::DbDatum("DatabaseTable")); dev_prop.push_back(Tango::DbDatum("RefreshTime")); dev_prop.push_back(Tango::DbDatum("Timeout")); dev_prop.push_back(Tango::DbDatum("AutoStart")); // is there at least one property to be read ? if (dev_prop.size()>0) Loading Loading @@ -377,6 +385,17 @@ void MetadataImporter::get_device_property() // And try to extract Timeout value from database if (dev_prop[i].is_empty()==false) dev_prop[i] >> timeout; // Try to initialize AutoStart from class property cl_prop = ds_class->get_class_property(dev_prop[++i].name); if (cl_prop.is_empty()==false) cl_prop >> autoStart; else { // Try to initialize AutoStart from default device value def_prop = ds_class->get_default_device_property(dev_prop[i].name); if (def_prop.is_empty()==false) def_prop >> autoStart; } // And try to extract AutoStart value from database if (dev_prop[i].is_empty()==false) dev_prop[i] >> autoStart; } /*----- PROTECTED REGION ID(MetadataImporter::get_device_property_after) ENABLED START -----*/ Loading
src/MetadataImporter.h +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,8 @@ public: Tango::DevULong refreshTime; // Timeout: Connection timeout (seconds) Tango::DevULong timeout; // AutoStart: Exec On command after init if state is not fault Tango::DevBoolean autoStart; // Constructors and destructors Loading
src/MetadataImporter.xmi +5 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,11 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>60</DefaultPropValue> </deviceProperties> <deviceProperties name="AutoStart" description="Exec On command after init if state is not fault"> <type xsi:type="pogoDsl:BooleanType"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <DefaultPropValue>false</DefaultPropValue> </deviceProperties> <commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0"> <argin description="none"> <type xsi:type="pogoDsl:VoidType"/> Loading
src/MetadataImporterClass.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,20 @@ void MetadataImporterClass::set_default_property() } else add_wiz_dev_prop(prop_name, prop_desc); prop_name = "AutoStart"; prop_desc = "Exec On command after init if state is not fault"; prop_def = "false"; vect_data.clear(); vect_data.push_back("false"); if (prop_def.length()>0) { Tango::DbDatum data(prop_name); data << vect_data ; dev_def_prop.push_back(data); add_wiz_dev_prop(prop_name, prop_desc, prop_def); } else add_wiz_dev_prop(prop_name, prop_desc); } //-------------------------------------------------------- Loading