Tango Core Classes Reference  9.3.3
Tango::DbDevice Class Reference

A high level object for a device interface to the database. More...

#include "tango.h"

Public Member Functions

Constructors
 DbDevice (string &dev_name)
 Create a DbDevice object. More...
 
 DbDevice (string &dev_name, Database *db)
 Create a DbDevice object using a specified database. More...
 
Device oriented methods
DbDevImportInfo import_device ()
 Import the device from database. More...
 
void export_device (DbDevExportInfo &dev_info)
 Export device info to the database. More...
 
Property oriented methods
void get_property (DbData &db)
 Get device property from database. More...
 
void put_property (DbData &db)
 Update device property in database. More...
 
void delete_property (DbData &db)
 Remove device property from database. More...
 
void get_attribute_property (DbData &db)
 Get device attribute property from database. More...
 
void put_attribute_property (DbData &db)
 Update device attribute property in database. More...
 
void delete_attribute_property (DbData &db)
 Remove device attribute property from database. More...
 
void get_pipe_property (DbData &db)
 Get device pipe property from database. More...
 
void put_pipe_property (DbData &db)
 Update device pipe property in database. More...
 
void delete_pipe_property (DbData &db)
 Remove device pipe property from database. More...
 

Detailed Description

A high level object for a device interface to the database.

A database object for a device which can be used to query or modify properties, import and export information for a device. This class provides an easy to use interface for device objects in the database. It uses the methods of the Database class therefore the reader is referred to these for the exact calling syntax and examples. The following methods are defined for the DbDevice class :

Author
taurel
Revision
1

Constructor & Destructor Documentation

◆ DbDevice() [1/2]

Tango::DbDevice::DbDevice ( string &  dev_name)

Create a DbDevice object.

A constructor for a DbDevice object for a device in the TANGO database specified by the TANGO_HOST environment variable.

Parameters
[in]dev_nameThe device name

◆ DbDevice() [2/2]

Tango::DbDevice::DbDevice ( string &  dev_name,
Database db 
)

Create a DbDevice object using a specified database.

A constructor for a DbDevice object for the device in the specified database. This method reuses the Database supplied by the programmer.

Parameters
[in]dev_nameThe device name
[in]dbThe database object

Member Function Documentation

◆ delete_attribute_property()

void Tango::DbDevice::delete_attribute_property ( DbData &  db)

Remove device attribute property from database.

Delete all properties for the list of specified attributes for this device in the database. See Database::delete_device_attribute_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s)
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ delete_pipe_property()

void Tango::DbDevice::delete_pipe_property ( DbData &  db)

Remove device pipe property from database.

Delete all properties for the list of specified pipes for this device in the database. See Database::delete_device_pipe_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s)
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ delete_property()

void Tango::DbDevice::delete_property ( DbData &  db)

Remove device property from database.

Delete the list of specified properties for this device in the database. See Database::delete_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s)
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ export_device()

void Tango::DbDevice::export_device ( DbDevExportInfo dev_info)

Export device info to the database.

Update the export info for this device in the database.

Parameters
[in]dev_infoDevice export info
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ get_attribute_property()

void Tango::DbDevice::get_attribute_property ( DbData &  db)

Get device attribute property from database.

Query the database for the list of attribute properties of this device. See Database::get_device_attribute_property() for an example of how to specify and retrieve the properties.

Parameters
[in,out]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ get_pipe_property()

void Tango::DbDevice::get_pipe_property ( DbData &  db)

Get device pipe property from database.

Query the database for the list of pipe properties of this device. See Database::get_device_pipe_property() for an example of how to specify and retrieve the properties.

Parameters
[in,out]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ get_property()

void Tango::DbDevice::get_property ( DbData &  db)

Get device property from database.

Query the database for the list of properties of this device. See Database::get_device_property() for an example of how to specify and retrieve the properties.

Parameters
[in,out]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ import_device()

DbDevImportInfo Tango::DbDevice::import_device ( )

Import the device from database.

Query the database for the import info of this device. Returns a DbDevImportInfo structure.

Returns
[in] The device import information
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ put_attribute_property()

void Tango::DbDevice::put_attribute_property ( DbData &  db)

Update device attribute property in database.

Update the list of attribute properties for this device in the database. See Database::put_device_attribute_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ put_pipe_property()

void Tango::DbDevice::put_pipe_property ( DbData &  db)

Update device pipe property in database.

Update the list of pipe properties for this device in the database. See Database::put_device_pipe_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

◆ put_property()

void Tango::DbDevice::put_property ( DbData &  db)

Update device property in database.

Update the list of properties for this device in the database. See Database::put_device_property() for an example of how to specify the properties.

Parameters
[in]dbProperty name(s) and value
Exceptions
ConnectionFailed,CommunnicationFailed,DevFailedfrom device

The documentation for this class was generated from the following file: