diff --git a/src/Client.cpp b/src/Client.cpp index 94969ef483703909bfc0de346b5fdaba67b8de5d..57d2f47e97aae3fd227ff920363275e35059bdd0 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -249,9 +249,7 @@ void Client::handleUpdateLists(const boost::system::error_code& errorCode) } else if(errorCode == boost::asio::error::operation_aborted) { - DEBUG_STREAM << "Client::handleUpdateLists() STOP" << endl; - - //TODO: change state and status + DEBUG_STREAM << "Client::handleUpdateLists() stopping" << endl; } else { diff --git a/src/DataImporter.cpp b/src/DataImporter.cpp index d280a4522367950625e55d673dba5167c928a496..1d4180a3c5aea0ec918bda2f2832455763b56823 100644 --- a/src/DataImporter.cpp +++ b/src/DataImporter.cpp @@ -178,7 +178,7 @@ void DataImporter::init_device() { set_state(Tango::FAULT); std::stringstream error_stream; - error_stream << "DataImporter::init_device() " << ex.what() << std::endl; + error_stream << "DataImporter::init_device() " << ex.what(); set_status(error_stream.str()); } catch(...) @@ -734,7 +734,6 @@ void DataImporter::on() set_status("DataImporter::On() unknown error"); } - /*----- PROTECTED REGION END -----*/ // DataImporter::on } //-------------------------------------------------------- diff --git a/src/DataImporter.h b/src/DataImporter.h index 73563c521840d77d52de3d3cea45d330c667eaf7..2e3cca7e5669f992b3a0667d5c60ceb8cf5de861 100644 --- a/src/DataImporter.h +++ b/src/DataImporter.h @@ -95,173 +95,173 @@ class DataImporter : public TANGO_BASE_CLASS // Device property data members public: - // CertificateFile: Absolute path to certificate chain file - string certificateFile; - // StoragePath: Absolute path to storage - string storagePath; - // RemoteHost: Metadata exporter remote host - string remoteHost; - // RemotePort: Metadata exporter remote port - Tango::DevULong remotePort; - // RemoteUsername: Metadata exporter login username - string remoteUsername; - // RemotePassword: Metadata exporter remote password - string remotePassword; - // EnableSSL: Enable or disable SSL connections - Tango::DevBoolean enableSSL; - // DatabaseHost: Metadata local database host - string databaseHost; - // DatabasePort: Metadata local database port - Tango::DevULong databasePort; - // DatabaseUsername: Metadata local database username - string databaseUsername; - // DatabasePassword: Metadata local database password - string databasePassword; - // DatabaseSchema: Metadata local database schema - string databaseSchema; - // DatabaseTable: Metadata local database table - string databaseTable; - // RefreshTime: Local database request period (seconds) - Tango::DevULong refreshTime; - // Timeout: Connection timeout (seconds) - Tango::DevULong timeout; - // RecoveryTime: Time between failed file download attempt - Tango::DevULong recoveryTime; - // AutoStart: Exec On command after init if state is not fault - Tango::DevBoolean autoStart; - // AuxDatabaseHost: File transfer auxiliary database host - string auxDatabaseHost; - // AuxDatabasePort: File transfer auxiliary database port - Tango::DevULong auxDatabasePort; - // AuxDatabaseUsername: File transfer auxiliary database username - string auxDatabaseUsername; - // AuxDatabasePassword: File transfer auxiliary database password - string auxDatabasePassword; - // AuxDatabaseSchema: File transfer auxiliary database schema - string auxDatabaseSchema; - // AuxDatabaseTimestampTable: File transfer auxiliary database device timestamp table - string auxDatabaseTimestampTable; - // AuxDatabaseFailedTable: File transfer auxiliary database failed transfer table - string auxDatabaseFailedTable; - -// Attribute data members + // CertificateFile: Absolute path to certificate chain file + string certificateFile; + // StoragePath: Absolute path to storage + string storagePath; + // RemoteHost: Metadata exporter remote host + string remoteHost; + // RemotePort: Metadata exporter remote port + Tango::DevULong remotePort; + // RemoteUsername: Metadata exporter login username + string remoteUsername; + // RemotePassword: Metadata exporter remote password + string remotePassword; + // EnableSSL: Enable or disable SSL connections + Tango::DevBoolean enableSSL; + // DatabaseHost: Metadata local database host + string databaseHost; + // DatabasePort: Metadata local database port + Tango::DevULong databasePort; + // DatabaseUsername: Metadata local database username + string databaseUsername; + // DatabasePassword: Metadata local database password + string databasePassword; + // DatabaseSchema: Metadata local database schema + string databaseSchema; + // DatabaseTable: Metadata local database table + string databaseTable; + // RefreshTime: Local database request period (seconds) + Tango::DevULong refreshTime; + // Timeout: Connection timeout (seconds) + Tango::DevULong timeout; + // RecoveryTime: Time between failed file download attempt + Tango::DevULong recoveryTime; + // AutoStart: Exec On command after init if state is not fault + Tango::DevBoolean autoStart; + // AuxDatabaseHost: File transfer auxiliary database host + string auxDatabaseHost; + // AuxDatabasePort: File transfer auxiliary database port + Tango::DevULong auxDatabasePort; + // AuxDatabaseUsername: File transfer auxiliary database username + string auxDatabaseUsername; + // AuxDatabasePassword: File transfer auxiliary database password + string auxDatabasePassword; + // AuxDatabaseSchema: File transfer auxiliary database schema + string auxDatabaseSchema; + // AuxDatabaseTimestampTable: File transfer auxiliary database device timestamp table + string auxDatabaseTimestampTable; + // AuxDatabaseFailedTable: File transfer auxiliary database failed transfer table + string auxDatabaseFailedTable; + +// Attribute data members public: - Tango::DevULong *attr_RegularFileCounter_read; - Tango::DevULong *attr_FailedFileCounter_read; + Tango::DevULong *attr_RegularFileCounter_read; + Tango::DevULong *attr_FailedFileCounter_read; -// Constructors and destructors +// Constructors and destructors public: - /** - * Constructs a newly device object. - * - * @param cl Class. - * @param s Device Name - */ - DataImporter(Tango::DeviceClass *cl,string &s); - /** - * Constructs a newly device object. - * - * @param cl Class. - * @param s Device Name - */ - DataImporter(Tango::DeviceClass *cl,const char *s); - /** - * Constructs a newly device object. - * - * @param cl Class. - * @param s Device name - * @param d Device description. - */ - DataImporter(Tango::DeviceClass *cl,const char *s,const char *d); - /** - * The device object destructor. - */ - ~DataImporter() {delete_device();}; - - -// Miscellaneous methods + /** + * Constructs a newly device object. + * + * @param cl Class. + * @param s Device Name + */ + DataImporter(Tango::DeviceClass *cl,string &s); + /** + * Constructs a newly device object. + * + * @param cl Class. + * @param s Device Name + */ + DataImporter(Tango::DeviceClass *cl,const char *s); + /** + * Constructs a newly device object. + * + * @param cl Class. + * @param s Device name + * @param d Device description. + */ + DataImporter(Tango::DeviceClass *cl,const char *s,const char *d); + /** + * The device object destructor. + */ + ~DataImporter() {delete_device();}; + + +// Miscellaneous methods public: - /* - * will be called at device destruction or at init command. - */ - void delete_device(); - /* - * Initialize the device - */ - virtual void init_device(); - /* - * Read the device properties from database - */ - void get_device_property(); - /* - * Always executed method before execution command method. - */ - virtual void always_executed_hook(); - - -// Attribute methods + /* + * will be called at device destruction or at init command. + */ + void delete_device(); + /* + * Initialize the device + */ + virtual void init_device(); + /* + * Read the device properties from database + */ + void get_device_property(); + /* + * Always executed method before execution command method. + */ + virtual void always_executed_hook(); + + +// Attribute methods public: - //-------------------------------------------------------- - /* - * Method : DataImporter::read_attr_hardware() - * Description : Hardware acquisition for attributes. - */ - //-------------------------------------------------------- - virtual void read_attr_hardware(vector &attr_list); - -/** - * Attribute RegularFileCounter related methods - * Description: - * - * Data type: Tango::DevULong - * Attr type: Scalar - */ - virtual void read_RegularFileCounter(Tango::Attribute &attr); - virtual bool is_RegularFileCounter_allowed(Tango::AttReqType type); -/** - * Attribute FailedFileCounter related methods - * Description: - * - * Data type: Tango::DevULong - * Attr type: Scalar - */ - virtual void read_FailedFileCounter(Tango::Attribute &attr); - virtual bool is_FailedFileCounter_allowed(Tango::AttReqType type); - - - //-------------------------------------------------------- - /** - * Method : DataImporter::add_dynamic_attributes() - * Description : Add dynamic attributes if any. - */ - //-------------------------------------------------------- - void add_dynamic_attributes(); - - - -// Command related methods + //-------------------------------------------------------- + /* + * Method : DataImporter::read_attr_hardware() + * Description : Hardware acquisition for attributes. + */ + //-------------------------------------------------------- + virtual void read_attr_hardware(vector &attr_list); + + /** + * Attribute RegularFileCounter related methods + * Description: + * + * Data type: Tango::DevULong + * Attr type: Scalar + */ + virtual void read_RegularFileCounter(Tango::Attribute &attr); + virtual bool is_RegularFileCounter_allowed(Tango::AttReqType type); + /** + * Attribute FailedFileCounter related methods + * Description: + * + * Data type: Tango::DevULong + * Attr type: Scalar + */ + virtual void read_FailedFileCounter(Tango::Attribute &attr); + virtual bool is_FailedFileCounter_allowed(Tango::AttReqType type); + + + //-------------------------------------------------------- + /** + * Method : DataImporter::add_dynamic_attributes() + * Description : Add dynamic attributes if any. + */ + //-------------------------------------------------------- + void add_dynamic_attributes(); + + + +// Command related methods public: - /** - * Command On related method - * Description: Activate data importer - * - */ - virtual void on(); - virtual bool is_On_allowed(const CORBA::Any &any); - /** - * Command Off related method - * Description: Deactivate data importer - * - */ - virtual void off(); - virtual bool is_Off_allowed(const CORBA::Any &any); - /** - * Command ResetCounter related method - * Description: - * - */ - virtual void reset_counter(); - virtual bool is_ResetCounter_allowed(const CORBA::Any &any); + /** + * Command On related method + * Description: Activate data importer + * + */ + virtual void on(); + virtual bool is_On_allowed(const CORBA::Any &any); + /** + * Command Off related method + * Description: Deactivate data importer + * + */ + virtual void off(); + virtual bool is_Off_allowed(const CORBA::Any &any); + /** + * Command ResetCounter related method + * Description: + * + */ + virtual void reset_counter(); + virtual bool is_ResetCounter_allowed(const CORBA::Any &any); /*----- PROTECTED REGION ID(DataImporter::Additional Method prototypes) ENABLED START -----*/