Tango Core Classes Reference
9.3.3
|
A high level object which contains the link to the database. More...
#include "tango.h"
Public Member Functions | |
Constructors | |
Database (CORBA::ORB *orb=NULL) | |
Create a TANGO Database object. More... | |
General methods | |
string | get_info () |
Get database info. More... | |
Device oriented methods | |
void | add_device (DbDevInfo &dev_info) |
Add a device into the database. More... | |
void | delete_device (string dev_name) |
Delete a device from the database. More... | |
DbDevImportInfo | import_device (string &dev_name) |
Import a device from the database. More... | |
void | export_device (DbDevExportInfo &info) |
Export a device into the database. More... | |
void | unexport_device (string dev_name) |
Unexport a device in the database. More... | |
DbDevFullInfo | get_device_info (string &dev_name) |
Get device information. More... | |
string | get_class_for_device (string &dev_name) |
Get class name for a device. More... | |
DbDatum | get_class_inheritance_for_device (string &dev_name) |
Get device inheritance scheme. More... | |
Server oriented methods | |
void | add_server (string &ds_name, DbDevInfos &devs) |
Create a device server process in database. More... | |
void | delete_server (string &ds_name) |
Delete a device server process from the database. More... | |
void | export_server (DbDevExportInfos &devs) |
Delete a device server process from the database. More... | |
void | unexport_server (string &ds_name) |
Unexport all devices from a device server in the database. More... | |
void | rename_server (const string &old_ds_name, const string &new_ds_name) |
Rename a device server in the database. More... | |
Services oriented methods | |
DbDatum | get_services (string &service_name, string &inst_name) |
Get services list from database. More... | |
DbDatum | get_device_service_list (string &service_name) |
Get services list from database. More... | |
void | register_service (string &service_name, string &inst_name, string &dev_name) |
Register a service in the database. More... | |
void | unregister_service (string &service_name, string &inst_name) |
Unregister a service from the database. More... | |
Object property oriented methods | |
void | get_property (string obj_name, DbData &db) |
Get object property value. More... | |
void | put_property (string obj_name, DbData &db) |
Put object property value in database. More... | |
void | delete_property (string obj_name, DbData &db) |
Delete object property from database. More... | |
vector< DbHistory > | get_property_history (string &obj_name, string &prop_name) |
Get object property history from database. More... | |
Device property oriented methods | |
void | get_device_property (string dev_name, DbData &db) |
Get device property value. More... | |
void | put_device_property (string dev_name, DbData &db) |
Put device property value in database. More... | |
void | delete_device_property (string dev_name, DbData &db) |
Delete device property from database. More... | |
vector< DbHistory > | get_device_property_history (string &dev_name, string &prop_name) |
Get device property history from database. More... | |
Device attribute property oriented methods | |
void | get_device_attribute_property (string dev_name, DbData &db) |
Get device attribute property value. More... | |
void | put_device_attribute_property (string dev_name, DbData &db) |
Put device attribute property value in database. More... | |
void | delete_device_attribute_property (string dev_name, DbData &db) |
Delete device attribute property from database. More... | |
vector< DbHistory > | get_device_attribute_property_history (string &dev_name, string &prop_name, string &att_name) |
Get device attribute property history from database. More... | |
void | get_device_attribute_list (string &dev_name, vector< string > &att_list) |
Get list of attribute with data in database for a specific device. More... | |
void | get_device_pipe_list (const string &dev_name, vector< string > &pipe_list) |
Get list of pipe with data in database for a specific device. More... | |
Device pipe property oriented methods | |
void | get_device_pipe_property (string dev_name, DbData &db) |
Get device pipe property value. More... | |
void | put_device_pipe_property (string dev_name, DbData &db) |
Put device pipe property value in database. More... | |
void | delete_device_pipe_property (string dev_name, DbData &db) |
Delete device pipe property from database. More... | |
vector< DbHistory > | get_device_pipe_property_history (string &dev_name, string &pipe_name, string &prop_name) |
Get device pipe property history from database. More... | |
Class property oriented methods | |
void | get_class_property (string class_name, DbData &db) |
Get class property value. More... | |
void | put_class_property (string class_name, DbData &db) |
Put class property value in database. More... | |
void | delete_class_property (string class_name, DbData &db) |
Delete class property from database. More... | |
vector< DbHistory > | get_class_property_history (string &class_name, string &prop_name) |
Get class property history from database. More... | |
Class attribute property oriented methods | |
void | get_class_attribute_property (string class_name, DbData &db) |
Get class attribute property value. More... | |
void | put_class_attribute_property (string class_name, DbData &db) |
Put class attribute property value in database. More... | |
void | delete_class_attribute_property (string class_name, DbData &db) |
Delete class attribute property from database. More... | |
vector< DbHistory > | get_class_attribute_property_history (string &class_name, string &att_name, string &prop_name) |
Get class attribute property history from database. More... | |
Class pipe property oriented methods | |
void | get_class_pipe_property (string class_name, DbData &db) |
Get class pipe property value. More... | |
void | put_class_pipe_property (string class_name, DbData &db) |
Put class pipe property value in database. More... | |
void | delete_class_pipe_property (string class_name, DbData &db) |
Delete class pipe property from database. More... | |
vector< DbHistory > | get_class_pipe_property_history (string &class_name, string &pipe_name, string &prop_name) |
Get class pipe property history from database. More... | |
Alias oriented methods | |
void | get_device_from_alias (string alias, string &dev_name) |
Get device name from its alias. More... | |
void | get_alias_from_device (string dev_name, string &alias) |
Get device alias form its name. More... | |
void | get_alias (string dev_name, string &dev_alias) |
Get device alias from its name. More... | |
void | get_device_alias (string dev_alias, string &dev_name) |
Get device name from its alias. More... | |
void | put_device_alias (string &dev_name, string &dev_alias) |
Define device alias. More... | |
void | delete_device_alias (string &dev_alias) |
Delete device alias. More... | |
void | get_attribute_from_alias (string alias, string &att_name) |
Get attribute name from its alias. More... | |
void | get_alias_from_attribute (string att_name, string &alias) |
Get attribute alias form its name. More... | |
void | get_attribute_alias (string att_alias, string &att_name) |
Get attribute name from its alias. More... | |
void | put_attribute_alias (string &att_name, string &att_alias) |
Define attribute alias. More... | |
void | delete_attribute_alias (string &att_alias) |
Delete attribute alias. More... | |
Database browsing oriented methods | |
DbDatum | get_host_list () |
Get host list. More... | |
DbDatum | get_host_list (string &wildcard) |
Get host list with name matching a wildcard. More... | |
DbDatum | get_server_class_list (string &ds_name) |
Get list of Tango classes embedded in a device server proess. More... | |
DbDatum | get_server_name_list () |
Get list of all Tango device server process. More... | |
DbDatum | get_instance_name_list (string &ds_name) |
Get list of instances. More... | |
DbDatum | get_server_list () |
Get list of device server processes. More... | |
DbDatum | get_server_list (string &wildcard) |
Get list of device server processes with a wildcard. More... | |
DbDatum | get_host_server_list (string &host_name) |
Get list of device server processes running on a host. More... | |
DbDatum | get_device_name (string &ds_name, string &class_name) |
Get list of devices served by a device server process. More... | |
DbDatum | get_device_exported (string &filter) |
Get list of exported devices. More... | |
DbDatum | get_device_domain (string &wildcard) |
Get list of device domain names. More... | |
DbDatum | get_device_family (string &wildcard) |
Get list of device family name. More... | |
DbDatum | get_device_member (string &wildcard) |
Get list of device member name. More... | |
DbDatum | get_device_class_list (string &ds_name) |
Get list of devices/classes for a specified device server. More... | |
DbDatum | get_device_exported_for_class (string &class_name) |
Get list of exported device for a class. More... | |
DbDatum | get_object_list (string &wildcard) |
Get object (free property) list. More... | |
DbDatum | get_object_property_list (string &obj_name, string &wildcard) |
Get object property list. More... | |
DbDatum | get_class_list (string &wildcard) |
Get Tango class list. More... | |
DbDatum | get_class_property_list (string &class_name) |
Get class property list. More... | |
DbDatum | get_class_attribute_list (string &class_name, string &wildcard) |
Get class attribute list. More... | |
DbDatum | get_class_pipe_list (const string &class_name, const string &wildcard) |
Get class pipe list. More... | |
DbDatum | get_device_alias_list (string &filter) |
Get device alias list. More... | |
DbDatum | get_attribute_alias_list (string &filter) |
Get attribute alias list. More... | |
Public Member Functions inherited from Tango::Connection | |
virtual void | set_timeout_millis (int timeout) |
Set device timeout. More... | |
virtual int | get_timeout_millis () |
Get device timeout. More... | |
int | get_idl_version () |
Get device IDL version. More... | |
virtual Tango::DevSource | get_source () |
Get device source. More... | |
virtual void | set_source (Tango::DevSource sou) |
Set device source. More... | |
virtual void | set_transparency_reconnection (bool val) |
Set device transparency (reconnection) mode. More... | |
virtual bool | get_transparency_reconnection () |
Get device transparency (reconnection) mode. More... | |
virtual DeviceData | command_inout (string &cmd_name) |
Execute a command (without input data) More... | |
virtual DeviceData | command_inout (const char *cmd_name) |
Execute a command (without input data) More... | |
virtual DeviceData | command_inout (string &cmd_name, DeviceData &d_in) |
Execute a command (with input data) More... | |
virtual DeviceData | command_inout (const char *cmd_name, DeviceData &d_in) |
Execute a command (with input data) More... | |
virtual long | command_inout_asynch (const char *cmd_name, DeviceData &argin, bool forget=false) |
Execute a command asynchronously (with input argument) More... | |
virtual long | command_inout_asynch (string &cmd_name, DeviceData &argin, bool forget=false) |
Execute a command asynchronously (with input argument) More... | |
virtual long | command_inout_asynch (const char *cmd_name, bool forget=false) |
Execute a command asynchronously. More... | |
virtual long | command_inout_asynch (string &cmd_name, bool forget=false) |
Execute a command asynchronously. More... | |
virtual DeviceData | command_inout_reply (long id) |
Check an asynchronous command_inout answer is arrived. More... | |
virtual DeviceData | command_inout_reply (long id, long timeout) |
Check an asynchronous command_inout answer is arrived with timeout. More... | |
virtual void | command_inout_asynch (string &cmd_name, CallBack &cb) |
Execute a command asynchronously with callback. More... | |
virtual void | command_inout_asynch (const char *cmd_name, CallBack &cb) |
Execute a command asynchronously with callback. More... | |
virtual void | command_inout_asynch (string &cmd_name, DeviceData &argin, CallBack &cb) |
Execute a command asynchronously with input value and callback. More... | |
virtual void | command_inout_asynch (const char *cmd_name, DeviceData &argin, CallBack &cb) |
Execute a command asynchronously with input value and callback. More... | |
virtual void | get_asynch_replies () |
Fire callback methods. More... | |
virtual void | get_asynch_replies (long timeout) |
Fire callback methds with timeout. More... | |
virtual void | cancel_asynch_request (long id) |
Cancel a pending asynchronous request. More... | |
virtual void | cancel_all_polling_asynch_request () |
Cancel all pending asynchronous request. More... | |
A high level object which contains the link to the database.
This class has methods for all database commands e.g. get_device_property(), device_list(), info(), etc.
Tango::Database::Database | ( | CORBA::ORB * | orb = NULL | ) |
void Tango::Database::add_device | ( | DbDevInfo & | dev_info | ) |
Add a device into the database.
Add a device to the database. The device name, server and class are specified in the DbDevInfo structure. Example :
[in] | dev_info | A reference to a DbDevInfo instance with all device info. |
ConnectionFailed,CommunnicationFailed,DevFailed |
void Tango::Database::add_server | ( | string & | ds_name, |
DbDevInfos & | devs | ||
) |
Create a device server process in database.
Add a group of devices to the database. The device names, server names and classes are specified in a vector of DbDevInfo structures.
[in] | ds_name | The full device server process name |
[in] | devs | Vector of DbDevInfo instances |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::delete_attribute_alias | ( | string & | att_alias | ) |
Delete attribute alias.
Remove the alias associated to an attribute name.
[in] | att_alias | The attribute alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_class_attribute_property | ( | string | class_name, |
DbData & | db | ||
) |
Delete class attribute property from database.
Delete a list of attribute properties for the specified class. The attribute names are specified by the vector of DbDatum structures. All properties belonging to the listed attributes are deleted. Here is an example of how to delete the unit property of the velocity attribute of the StepperMotor class from the database using this method :
[in] | class_name | The class name |
[in] | db | The property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_class_pipe_property | ( | string | class_name, |
DbData & | db | ||
) |
Delete class pipe property from database.
Delete a list of pipe properties for the specified class. The pipe names are specified by the vector of DbDatum structures. All properties belonging to the listed pipes are deleted. Here is an example of how to delete the unit property of the velocity pipe of the StepperMotor class from the database using this method :
[in] | class_name | The class name |
[in] | db | The pipe/property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_class_property | ( | string | class_name, |
DbData & | db | ||
) |
Delete class property from database.
Delete a list of properties for the specified class. The property names are specified by the vector of Db- Datum structures. Here is an example of how to delete properties from the database using this method
[in] | class_name | The class name |
[in] | db | The property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_device | ( | string | dev_name | ) |
Delete a device from the database.
Delete the device of the specified name from the database. Example
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError, DB_DeviceNotDefined) |
void Tango::Database::delete_device_alias | ( | string & | dev_alias | ) |
Delete device alias.
Delete a device alias.
[in] | dev_alias | The device alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_device_attribute_property | ( | string | dev_name, |
DbData & | db | ||
) |
Delete device attribute property from database.
Delete a list of attribute properties for the specified device. The attribute names are specified by the vector of DbDatum structures. Here is an example of how to delete the unit property of the velocity attribute of the id11/motor/1 device using this method :
[in] | dev_name | The device name |
[in] | db | The property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_device_pipe_property | ( | string | dev_name, |
DbData & | db | ||
) |
Delete device pipe property from database.
Delete a list of pipe properties for the specified device. The pipe names are specified by the vector of DbDatum structures. Here is an example of how to delete the unit property of the velocity pipe of the id11/motor/1 device using this method :
[in] | dev_name | The device name |
[in] | db | The pipe/property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_device_property | ( | string | dev_name, |
DbData & | db | ||
) |
Delete device property from database.
Delete a list of properties for the specified device. The property names are specified by the vector of DbDatum structures. Here is an example of how to delete properties from the database using this method :
[in] | dev_name | The device name |
[in] | db | The property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_property | ( | string | obj_name, |
DbData & | db | ||
) |
Delete object property from database.
Delete a list of properties for the specified object. The property names are specified by the vector of DbDatum structures. Here is an example of how to delete properties from the database using this method :
[in] | obj_name | The object (free property) name |
[in] | db | The property names |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::delete_server | ( | string & | ds_name | ) |
Delete a device server process from the database.
Delete the device server and its associated devices from the database.
[in] | ds_name | The full device server process name |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::export_device | ( | DbDevExportInfo & | info | ) |
Export a device into the database.
Update the export info for this device in the database. Device name, server, class, pid and version are specified in the DbDevExportInfo structure. Example :
[in] | info | The device export information |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError, DB_DeviceNotDefined) |
void Tango::Database::export_server | ( | DbDevExportInfos & | devs | ) |
Delete a device server process from the database.
Export a group of devices to the database. The device names, IOR, class, server name, pid etc. are specified in the vector of DbDevExportInfo structures.
[in] | devs | Devices information in a vector of DbDevExportInfo |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::get_alias | ( | string | dev_name, |
string & | dev_alias | ||
) |
Get device alias from its name.
Get the device alias name from its name. The device name is specified by dev_name and the device alias name is returned in dev_alias. If there is no alias defined for the device, a DevFailed exception is thrown.
[in] | dev_name | The device name |
[out] | dev_alias | The device alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_alias_from_attribute | ( | string | att_name, |
string & | alias | ||
) |
Get attribute alias form its name.
Get the attribute alias from its name. The attribute name is specified by att_name and the attribute alias is returned in alias. If there is no alias defined for the attribute, a DevFailed exception is thrown.
[in] | att_name | The attribute name |
[out] | alias | The attribute alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_alias_from_device | ( | string | dev_name, |
string & | alias | ||
) |
Get device alias form its name.
Get the device alias from its name. The device name is specified by dev_name and the device alias is returned in alias. If there is no alias defined for the device, a DevFailed exception is thrown.
[in] | dev_name | The device name |
[out] | alias | The device alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_attribute_alias | ( | string | att_alias, |
string & | att_name | ||
) |
Get attribute name from its alias.
Get the full attribute name from an alias. The attribute alias is specified by att_alias and the full attribute name is returned in att_name. If there is no attribute with the given alias, a DevFailed exception is thrown.
[in] | att_alias | The attribute alias |
[out] | att_name | The attribute name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_attribute_alias_list | ( | string & | filter | ) |
Get attribute alias list.
Get attribute alias list. The parameter is a string to filter the alias list returned. Wildcard (*) is supported. For instance, if the string passed as the method parameter is initialised with only the
[in] | filter | The filter |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_attribute_from_alias | ( | string | alias, |
string & | att_name | ||
) |
Get attribute name from its alias.
Get the attribute name from its alias. The attribute alias is specified by alias and the attribute name is returned in att_name. If there is no attribute defined with the given alias, a DevFailed exception is thrown.
[in] | alias | The attribute alias |
[out] | att_name | The attribute name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_class_attribute_list | ( | string & | class_name, |
string & | wildcard | ||
) |
Get class attribute list.
Query the database for a list of attributes defined for the specified class which match the specified wildcard.
[in] | class_name | The class name |
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get class attribute property value.
Query the database for a list of class attribute properties for the specified object. The attribute names are specified by the vector of DbDatum structures. The method returns all the properties for the specified attributes. The attribute names are returned with the number of properties specified as their value. The first DbDatum element of the returned DbData vector contains the first attribute name and the first attribute property number. The following DbDatum element contains the first attribute property name and property values. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract attribute properties :
[in] | class_name | The class name |
[in,out] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_class_attribute_property_history | ( | string & | class_name, |
string & | att_name, | ||
string & | prop_name | ||
) |
Get class attribute property history from database.
Get the list of the last 10 modifications of the specifed class attribute property. Note that prop_name and att_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | class_name | The class name |
[in] | att_name | The attribute name |
[in] | prop_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
string Tango::Database::get_class_for_device | ( | string & | dev_name | ) |
Get class name for a device.
Return the class of the specified device.
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_class_inheritance_for_device | ( | string & | dev_name | ) |
Get device inheritance scheme.
Return the class inheritance scheme of the specified device
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_class_list | ( | string & | wildcard | ) |
Get Tango class list.
Query the database for a list of classes which match the specified wildcard.
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_class_pipe_list | ( | const string & | class_name, |
const string & | wildcard | ||
) |
Get class pipe list.
Query the database for a list of pipes defined for the specified class which match the specified wildcard.
[in] | class_name | The class name |
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get class pipe property value.
Query the database for a list of class pipe properties for the specified object. The pipe names are specified by the vector of DbDatum structures. The method returns all the properties for the specified pipes. The pipe names are returned with the number of properties specified as their value. The first DbDatum element of the returned DbData vector contains the first pipe name and the first pipe property number. The following DbDatum element contains the first pipe property name and property values. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract pipe properties :
[in] | class_name | The class name |
[in,out] | db | The pipe/property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_class_pipe_property_history | ( | string & | class_name, |
string & | pipe_name, | ||
string & | prop_name | ||
) |
Get class pipe property history from database.
Get the list of the last 10 modifications of the specifed class pipe property. Note that prop_name and pipe_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | class_name | The class name |
[in] | pipe_name | The pipe name |
[in] | prop_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get class property value.
Query the database for a list of class properties. The property names are specified by the vector of DbDatum structures. The method returns the properties in the same DbDatum structures. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract properties :
[in] | class_name | The class name |
[in,out] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_class_property_history | ( | string & | class_name, |
string & | prop_name | ||
) |
Get class property history from database.
Get the list of the last 10 modifications of the specifed class property. Note that prop_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | class_name | The class name |
[in] | prop_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_class_property_list | ( | string & | class_name | ) |
Get class property list.
Query the database for a list of properties defined for the specified class.
[in] | class_name | The class name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_device_alias | ( | string | dev_alias, |
string & | dev_name | ||
) |
Get device name from its alias.
Get the device name from an alias. The device alias is specified by dev_alias and the device name is returned in dev_name. If there is no device with the given alias, a DevFailed exception is thrown.
[in] | dev_alias | The device alias |
[out] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_alias_list | ( | string & | filter | ) |
Get device alias list.
Get device alias list. The parameter is a string to filter the alias list returned. Wildcard (*) is supported. For instance, if the string passed as the method parameter is initialised with only the * character, all the defined device alias will be returned. The DbDatum returned by this method is initialised with an array of strings and must be extracted into a vector<string>. If there is no alias with the given filter, the returned array will have a 0 size.
[in] | filter | The filter |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_device_attribute_list | ( | string & | dev_name, |
vector< string > & | att_list | ||
) |
Get list of attribute with data in database for a specific device.
Get the list of attribute(s) with some data defined in database for a specified device. Note that this is not the list of all device attributes because not all attribute(s) have some data in database
[in] | dev_name | The device name |
[in] | att_list | The attribute name list |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get device attribute property value.
Query the database for a list of device attribute properties for the specified object. The attribute names are specified by the vector of DbDatum structures. The method returns all the properties for the specified attributes. The attribute names are returned with the number of properties specified as their value. The first DbDatum element of the returned DbData vector contains the first attribute name and the first attribute property number. The following DbDatum element contains the first attribute property name and property values. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract attribute properties :
[in] | dev_name | The device name |
[in,out] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_device_attribute_property_history | ( | string & | dev_name, |
string & | prop_name, | ||
string & | att_name | ||
) |
Get device attribute property history from database.
Get the list of the last 10 modifications of the specifed device attribute property. Note that prop_name and att_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | dev_name | The device name |
[in] | prop_name | The property name |
[in] | att_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_class_list | ( | string & | ds_name | ) |
Get list of devices/classes for a specified device server.
Query the database for a list of devices and classes served by the specified server. Return a list with the following structure: {device name,class name,device name,class name,...}
[in] | ds_name | The full device server process name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_domain | ( | string & | wildcard | ) |
Get list of device domain names.
Query the database for a list of device domain names which match the wildcard provided. Wildcard character * matches any number of characters. Domain names are case insensitive.
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_exported | ( | string & | filter | ) |
Get list of exported devices.
Query the database for a list of exported devices whose names satisfy the supplied filter (* is wildcard for any character(s)).
[in] | filter | The filter |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_exported_for_class | ( | string & | class_name | ) |
Get list of exported device for a class.
Query database for list of exported devices for the specified class.
[in] | class_name | The Tango device class name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_family | ( | string & | wildcard | ) |
Get list of device family name.
Query the database for a list of device family names which match the wildcard provided. Wildcard character * matches any number of characters. Family names are case insensitive.
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_device_from_alias | ( | string | alias, |
string & | dev_name | ||
) |
Get device name from its alias.
Get the device name from its alias. The device alias is specified by alias and the device name is returned in dev_name. If there is no device defined with the given alias, a DevFailed exception is thrown.
[in] | alias | The device alias |
[out] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDevFullInfo Tango::Database::get_device_info | ( | string & | dev_name | ) |
Get device information.
Return miscellaneous device information from the database (not from the device itself)
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_member | ( | string & | wildcard | ) |
Get list of device member name.
Query the database for a list of device member names which match the wildcard provided. Wildcard character * matches any number of characters. Member names are case insensitive.
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_name | ( | string & | ds_name, |
string & | class_name | ||
) |
Get list of devices served by a device server process.
Query the database for a list of devices served by the specified server (1st parameter) and of the specified class (2nd parameter).
[in] | ds_name | The device server name (executable/instance) |
[in] | class_name | The class name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::get_device_pipe_list | ( | const string & | dev_name, |
vector< string > & | pipe_list | ||
) |
Get list of pipe with data in database for a specific device.
Get the list of pipe(s) with some data defined in database for a specified device. Note that this is not the list of all device pipes because not all pipe(s) have some data in database
[in] | dev_name | The device name |
[in] | pipe_list | The pipe name list |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get device pipe property value.
Query the database for a list of device pipe properties for the specified object. The pipe names are specified by the vector of DbDatum structures. The method returns all the properties for the specified pipes. The pipe names are returned with the number of properties specified as their value. The first DbDatum element of the returned DbData vector contains the first pipe name and the first pipe property number. The following DbDatum element contains the first pipe property name and property values. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract pipe properties :
[in] | dev_name | The device name |
[in,out] | db | The pipe/property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_device_pipe_property_history | ( | string & | dev_name, |
string & | pipe_name, | ||
string & | prop_name | ||
) |
Get device pipe property history from database.
Get the list of the last 10 modifications of the specifed device pipe property. Note that prop_name and pipe_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | dev_name | The device name |
[in] | pipe_name | The property name |
[in] | prop_name | The pipe name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get device property value.
Query the database for a list of device properties for the specified object. The property names are specified by the vector of DbDatum structures. The method returns the properties in the same DbDatum structures. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract properties :
[in] | dev_name | The device name |
[in,out] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_device_property_history | ( | string & | dev_name, |
string & | prop_name | ||
) |
Get device property history from database.
Get the list of the last 10 modifications of the specifed device property. Note that prop_name can contain a wildcard character (eg: "prop*"). An example of usage of a similar function can be found in the documentation of the get_property_history() function.
[in] | dev_name | The device name |
[in] | prop_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_device_service_list | ( | string & | service_name | ) |
Get services list from database.
Query database for specified services. The vector of strings returned in the DbDatum object contains pair of strings <instance_name> followed by <device name>.
[in] | service_name | The service name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_host_list | ( | ) |
Get host list.
Returns the list of all host names registered in the database.
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_host_list | ( | string & | wildcard | ) |
Get host list with name matching a wildcard.
Returns the list of all host names registered in the database which match the specified wildcard (eg: "lc0*")
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_host_server_list | ( | string & | host_name | ) |
Get list of device server processes running on a host.
Query the database for a list of servers registred on the specified host.
[in] | host_name | The host name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
string Tango::Database::get_info | ( | ) |
Get database info.
Query the database for some general info about the tables in the database. Result is returned as a string. Example :
will return information like this:
ConnectionFailed,CommunnicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_instance_name_list | ( | string & | ds_name | ) |
Get list of instances.
Return the list of all instance names existing in the database for the specifed server.
[in] | ds_name | The device server process executable name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_object_list | ( | string & | wildcard | ) |
Get object (free property) list.
Query the database for a list of object (free properties) for which properties are defined and which match the specified wildcard.
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_object_property_list | ( | string & | obj_name, |
string & | wildcard | ||
) |
Get object property list.
Query the database for a list of properties defined for the specified object and which match the specified wildcard.
[in] | obj_name | The object (free property) name |
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
|
inline |
Get object property value.
Query the database for a list of object (i.e. non-device) properties for the specified object. The property names are specified by the vector of DbDatum structures. The method returns the properties in the same DbDatum structures. To retrieve the properties use the extract operator >>. Here is an example of how to use the DbData type to specify and extract properties :
[in] | obj_name | The object (free property) name |
[in,out] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
vector<DbHistory> Tango::Database::get_property_history | ( | string & | obj_name, |
string & | prop_name | ||
) |
Get object property history from database.
Get the list of the last 10 modifications of the specifed object property. Note that propname can contain a wildcard character (eg: "prop*").
[in] | obj_name | The object (free property) name |
[in] | prop_name | The property name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_server_class_list | ( | string & | ds_name | ) |
Get list of Tango classes embedded in a device server proess.
Query the database for a list of classes instancied by the specified server. The DServer class exists in all TANGO servers and for this reason this class is removed from the returned list.
[in] | ds_name | The full device server process name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_server_list | ( | ) |
Get list of device server processes.
Return the list of all servers registered in the database.
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_server_list | ( | string & | wildcard | ) |
Get list of device server processes with a wildcard.
Return the list of all servers registered in the database which match the specified wildcard (eg: "Serial/l*").
[in] | wildcard | The wildcard |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_server_name_list | ( | ) |
Get list of all Tango device server process.
Return the list of all server names registered in the database.
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDatum Tango::Database::get_services | ( | string & | service_name, |
string & | inst_name | ||
) |
Get services list from database.
Query database for specified services. The instname parameter can be a wildcard character ("*").
[in] | service_name | The service name |
[in] | inst_name | The instance name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
DbDevImportInfo Tango::Database::import_device | ( | string & | dev_name | ) |
Import a device from the database.
Query the database for the export info of the specified device. The command returns the information in a DbDevImportInfo structure. Example :
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed |
void Tango::Database::put_attribute_alias | ( | string & | att_name, |
string & | att_alias | ||
) |
Define attribute alias.
Set an alias for an attribute name. The attribute alias is specified by att_alias and the attribute name is specifed by att_name. If the given alias already exists, a DevFailed exception is thrown.
[in] | att_name | The attribute name |
[in] | att_alias | The attribute alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_class_attribute_property | ( | string | class_name, |
DbData & | db | ||
) |
Put class attribute property value in database.
Insert or update a list of attribute properties for the specified class. The attribute property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert/update min, max properties for attribute velocity and min, max properties for attribute acceleration properties belonging to class StepperMotor into the database using this method :
[in] | class_name | The class name |
[in] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_class_pipe_property | ( | string | class_name, |
DbData & | db | ||
) |
Put class pipe property value in database.
Insert or update a list of pipe properties for the specified class. The pipe property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert/update min, max properties for pipe velocity and min, max properties for pipe acceleration properties belonging to class StepperMotor into the database using this method :
[in] | class_name | The class name |
[in] | db | The pipe/property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_class_property | ( | string | class_name, |
DbData & | db | ||
) |
Put class property value in database.
Insert or update a list of properties for the specified class. The property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert properties into the database using this method :
[in] | class_name | The class name |
[in] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_device_alias | ( | string & | dev_name, |
string & | dev_alias | ||
) |
Define device alias.
Create a device alias. Alias name has to be uniq within a Tango control system and you will receive an exception if the alias is already defined.
[in] | dev_name | The device name |
[in] | dev_alias | The device alias |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_device_attribute_property | ( | string | dev_name, |
DbData & | db | ||
) |
Put device attribute property value in database.
Insert or update a list of attribute properties for the specified device. The attribute property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert/update properties min, max for attribute velocity and properties min, max for attribute acceleration of device id11/motor/1 into the database using this method :
[in] | dev_name | The device name |
[in] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_device_pipe_property | ( | string | dev_name, |
DbData & | db | ||
) |
Put device pipe property value in database.
Insert or update a list of pipe properties for the specified device. The pipe property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert/update properties min, max for pipe velocity and properties min, max for pipe acceleration of device id11/motor/1 into the database using this method :
[in] | dev_name | The device name |
[in] | db | The pipe/property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_device_property | ( | string | dev_name, |
DbData & | db | ||
) |
Put device property value in database.
Insert or update a list of properties for the specified device. The property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert properties into the database using this method :
[in] | dev_name | The device name |
[in] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::put_property | ( | string | obj_name, |
DbData & | db | ||
) |
Put object property value in database.
Insert or update a list of properties for the specified object. The property names and their values are specified by the vector of DbDatum structures. Use the insert operator >> to insert the properties into the DbDatum structures. Here is an example of how to insert properties into the database using this method :
[in] | obj_name | The object (free property) name |
[in] | db | The property names and values |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::register_service | ( | string & | service_name, |
string & | inst_name, | ||
string & | dev_name | ||
) |
Register a service in the database.
Register the specified service wihtin the database.
[in] | service_name | The service name |
[in] | inst_name | The instance name |
[in] | dev_name | The device name implementing the service |
ConnectionFailed,CommunicationFailed,DevFailed | from device |
void Tango::Database::rename_server | ( | const string & | old_ds_name, |
const string & | new_ds_name | ||
) |
Rename a device server in the database.
Rename a device server process in the database.
[in] | old_ds_name | The old device server process name |
[in] | new_ds_name | The new device server process name |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::unexport_device | ( | string | dev_name | ) |
Unexport a device in the database.
Mark the specified device as un-exported in the database. Example :
[in] | dev_name | The device name |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::unexport_server | ( | string & | ds_name | ) |
Unexport all devices from a device server in the database.
Mark all devices exported for this device server process as unexported.
[in] | ds_name | The full device server process name |
ConnectionFailed,CommunicationFailed,DevFailed | from device (DB_SQLError) |
void Tango::Database::unregister_service | ( | string & | service_name, |
string & | inst_name | ||
) |
Unregister a service from the database.
Unregister the specified service from the database.
[in] | service_name | The service name |
[in] | inst_name | The instance name |
ConnectionFailed,CommunicationFailed,DevFailed | from device |