TANGO Java API
( TangORB-7.3.3.jar)

fr.esrf.TangoApi
Class DbDevice

java.lang.Object
  extended by fr.esrf.TangoApi.DbDevice
All Implemented Interfaces:
java.io.Serializable

public class DbDevice
extends java.lang.Object
implements java.io.Serializable

Class Description: This class manage database connection for Tango device. It is an api between user and IDL Device object.

Version:
$Revision: 1.10 $
Author:
verdier
See Also:
Serialized Form

Constructor Summary
DbDevice(java.lang.String devname)
          DbDevice constructor.
DbDevice(java.lang.String devname, java.lang.String host, java.lang.String port)
          DbDevice constructor.
 
Method Summary
 void add_device(DbDevInfo devinfo)
          Add/update this device to the database
 void delete_attribute_property(DbAttribute attr)
          Delete a list of properties for this object.
 void delete_attribute_property(DbAttribute[] attr)
          Delete a list of properties for this object.
 void delete_attribute_property(java.lang.String attname, java.lang.String propname)
          Delete a property for this object.
 void delete_attribute_property(java.lang.String attname, java.lang.String[] propnames)
          Delete a list of properties for this object.
 void delete_attribute(java.lang.String attname)
          Delete an attribute for this object.
 void delete_device()
          Delete this device from the database
 void delete_property(DbDatum[] properties)
          Delete a list of properties for this device.
 void delete_property(java.lang.String propname)
          Delete a property for this device.
 void delete_property(java.lang.String[] propnames)
          Delete a list of properties for this device.
 void export_device(DbDevExportInfo devinfo)
          Update the export info for this device in the database.
 java.lang.String get_alias()
          Get an alias for a device name
 java.lang.String[] get_attribute_list()
          Query the database for a list of device attributes
 int get_attribute_polling_period(java.lang.String attname)
          Returns the polling period (in ms) for specified attribute.
 DbAttribute get_attribute_property(java.lang.String attname)
          Query the database for a device attribute property for this device.
 DbAttribute[] get_attribute_property(java.lang.String[] attnames)
          Query the database for a list of device attribute properties for this device.
 java.lang.String[] get_class_inheritance()
           
 java.lang.String get_class()
           
 int get_command_polling_period(java.lang.String cmdname)
          Returns the polling period (in ms) for specified command.
 DeviceInfo get_info()
          Query the database for the info of this device.
 java.lang.String[] get_property_list(java.lang.String wildcard)
          Query the database for a list of device properties for the pecified object.
 DbDatum[] get_property(DbDatum[] properties)
          Query the database for a list of device properties for this device.
 DbDatum get_property(java.lang.String propname)
          Query the database for a device property for this device.
 DbDatum[] get_property(java.lang.String[] propnames)
          Query the database for a list of device properties for this device.
 DbDevImportInfo import_device()
          Query the database for the export info of this device.
 java.lang.String name()
          return the device name.
 void put_alias(java.lang.String aliasname)
          Set an alias for a device name
 void put_attribute_property(DbAttribute attr)
          Insert or update an attribute properties for this device.
 void put_attribute_property(DbAttribute[] attr)
          Insert or update a list of attribute properties for this device.
 void put_property(DbDatum[] properties)
          Insert or update a list of properties for this device The property names and their values are specified by the DbDatum array.
 void unexport_device()
          Unexport the divice in database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbDevice

public DbDevice(java.lang.String devname)
         throws DevFailed
DbDevice constructor. It will make a connection to the TANGO database.

Parameters:
devname - Name of the device to be imported.
Throws:
DevFailed

DbDevice

public DbDevice(java.lang.String devname,
                java.lang.String host,
                java.lang.String port)
         throws DevFailed
DbDevice constructor. It will make a connection to the TANGO database.

Parameters:
devname - Name of the device to be imported.
host - host where database is running.
port - port for database connection.
Throws:
DevFailed
Method Detail

get_info

public DeviceInfo get_info()
                    throws DevFailed
Query the database for the info of this device.

Returns:
the information in a DeviceInfo.
Throws:
DevFailed

import_device

public DbDevImportInfo import_device()
                              throws DevFailed
Query the database for the export info of this device.

Returns:
the information in a DbDevImportInfo.
Throws:
DevFailed

export_device

public void export_device(DbDevExportInfo devinfo)
                   throws DevFailed
Update the export info for this device in the database.

Parameters:
devinfo - Device information to export.
Throws:
DevFailed

unexport_device

public void unexport_device()
                     throws DevFailed
Unexport the divice in database.

Throws:
DevFailed

add_device

public void add_device(DbDevInfo devinfo)
                throws DevFailed
Add/update this device to the database

Parameters:
devinfo - The device name, class and server specified in object.
Throws:
DevFailed

delete_device

public void delete_device()
                   throws DevFailed
Delete this device from the database

Throws:
DevFailed

get_class

public java.lang.String get_class()
                           throws DevFailed
Throws:
DevFailed

get_class_inheritance

public java.lang.String[] get_class_inheritance()
                                         throws DevFailed
Throws:
DevFailed

put_alias

public void put_alias(java.lang.String aliasname)
               throws DevFailed
Set an alias for a device name

Parameters:
aliasname - alias name.
Throws:
DevFailed

get_alias

public java.lang.String get_alias()
                           throws DevFailed
Get an alias for a device name

Throws:
DevFailed

get_property_list

public java.lang.String[] get_property_list(java.lang.String wildcard)
                                     throws DevFailed
Query the database for a list of device properties for the pecified object.

Parameters:
wildcard - propertie's wildcard (* matches any charactere).
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_property

public DbDatum[] get_property(java.lang.String[] propnames)
                       throws DevFailed
Query the database for a list of device properties for this device.

Parameters:
propnames - list of property names.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_property

public DbDatum get_property(java.lang.String propname)
                     throws DevFailed
Query the database for a device property for this device.

Parameters:
propname - property name.
Returns:
property in DbDatum objects.
Throws:
DevFailed

get_property

public DbDatum[] get_property(DbDatum[] properties)
                       throws DevFailed
Query the database for a list of device properties for this device. The property names are specified by the DbDatum array objects.

Parameters:
properties - list of property DbDatum objects.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

put_property

public void put_property(DbDatum[] properties)
                  throws DevFailed
Insert or update a list of properties for this device The property names and their values are specified by the DbDatum array.

Parameters:
properties - Properties names and values array.
Throws:
DevFailed

delete_property

public void delete_property(java.lang.String[] propnames)
                     throws DevFailed
Delete a list of properties for this device.

Parameters:
propnames - Property names.
Throws:
DevFailed

delete_property

public void delete_property(java.lang.String propname)
                     throws DevFailed
Delete a property for this device.

Parameters:
propname - Property name.
Throws:
DevFailed

delete_property

public void delete_property(DbDatum[] properties)
                     throws DevFailed
Delete a list of properties for this device.

Parameters:
properties - Property DbDatum objects.
Throws:
DevFailed

put_attribute_property

public void put_attribute_property(DbAttribute[] attr)
                            throws DevFailed
Insert or update a list of attribute properties for this device. The property names and their values are specified by the DbAttribute array.

Parameters:
attr - attribute names and properties (names and values) array.
Throws:
DevFailed

put_attribute_property

public void put_attribute_property(DbAttribute attr)
                            throws DevFailed
Insert or update an attribute properties for this device. The property names and their values are specified by the DbAttribute array.

Parameters:
attr - attribute name and properties (names and values).
Throws:
DevFailed

delete_attribute_property

public void delete_attribute_property(java.lang.String attname,
                                      java.lang.String[] propnames)
                               throws DevFailed
Delete a list of properties for this object.

Parameters:
attname - attribute name.
propnames - Property names.
Throws:
DevFailed

delete_attribute_property

public void delete_attribute_property(java.lang.String attname,
                                      java.lang.String propname)
                               throws DevFailed
Delete a property for this object.

Parameters:
attname - attribute name.
propname - Property name.
Throws:
DevFailed

delete_attribute_property

public void delete_attribute_property(DbAttribute attr)
                               throws DevFailed
Delete a list of properties for this object.

Parameters:
attr - specified attribute
Throws:
DevFailed

delete_attribute_property

public void delete_attribute_property(DbAttribute[] attr)
                               throws DevFailed
Delete a list of properties for this object.

Parameters:
attr - specified attributes
Throws:
DevFailed

get_attribute_list

public java.lang.String[] get_attribute_list()
                                      throws DevFailed
Query the database for a list of device attributes

Returns:
attribute names.
Throws:
DevFailed

get_attribute_property

public DbAttribute[] get_attribute_property(java.lang.String[] attnames)
                                     throws DevFailed
Query the database for a list of device attribute properties for this device.

Parameters:
attnames - attribute names.
Returns:
properties in DbAttribute objects array.
Throws:
DevFailed

get_attribute_property

public DbAttribute get_attribute_property(java.lang.String attname)
                                   throws DevFailed
Query the database for a device attribute property for this device.

Parameters:
attname - attribute name.
Returns:
properties in DbAttribute objects.
Throws:
DevFailed

delete_attribute

public void delete_attribute(java.lang.String attname)
                      throws DevFailed
Delete an attribute for this object.

Parameters:
attname - attribute name.
Throws:
DevFailed

get_attribute_polling_period

public int get_attribute_polling_period(java.lang.String attname)
                                 throws DevFailed
Returns the polling period (in ms) for specified attribute.

Parameters:
attname - specified attribute name.
Throws:
DevFailed

get_command_polling_period

public int get_command_polling_period(java.lang.String cmdname)
                               throws DevFailed
Returns the polling period (in ms) for specified command.

Parameters:
cmdname - specified attribute name.
Throws:
DevFailed

name

public java.lang.String name()
return the device name.


TANGO Java API
( TangORB-7.3.3.jar)