fr.esrf.TangoDs
Class DeviceClass
java.lang.Object
fr.esrf.TangoDs.DeviceClass
- All Implemented Interfaces:
- TangoConst
- Direct Known Subclasses:
- DServerClass
public abstract class DeviceClass
- extends java.lang.Object
- implements TangoConst
Base class for all TANGO device-class class. A TANGO device-class class is a
class where is stored all data/method common to all devices of a TANGO device
class
- Version:
- $Revision: 1.5 $
- Author:
- $Author: abeilleg $ // // Copyright (C) :
2004,2005,2006,2007,2008,2009 // European Synchrotron Radiation
Facility // BP 220, Grenoble 38043 // FRANCE // // This file is part
of Tango. // // Tango is free software: you can redistribute it
and/or modify // it under the terms of the GNU General Public License
as published by // the Free Software Foundation, either version 3 of
the License, or // (at your option) any later version. // // Tango is
distributed in the hope that it will be useful, // but WITHOUT ANY
WARRANTY; without even the implied warranty of // MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public
License for more details. // // You should have received a copy of
the GNU General Public License // along with Tango. If not, see
. // // $Revision: 1.5 $ // // $Log:
DeviceClass.java,v $ // Revision 1.4 2009/03/25 13:33:28
pascal_verdier // ... // // Revision 1.3 2009/01/16 12:37:13
pascal_verdier // IntelliJIdea warnings removed. // // Revision 1.2
2008/10/10 11:30:46 pascal_verdier // Headers changed for LGPL
conformity. // // Revision 1.1 2007/08/23 08:33:25 ounsy // updated
change from api/java // // Revision 3.7 2005/12/02 09:55:02
pascal_verdier // java import have been optimized. // // Revision 3.6
2004/05/14 13:47:58 pascal_verdier // Compatibility with Tango-2.2.0
cpp // (polling commands and attibites). // // Revision 3.5
2004/03/12 14:07:57 pascal_verdier // Use JacORB-2.1 // // Revision
2.0 2003/01/09 16:02:57 taurel // - Update release number before
using SourceForge // // Revision 1.1.1.1 2003/01/09 15:54:39 taurel
// Imported sources into CVS before using SourceForge // // Revision
1.6 2001/10/10 08:11:24 taurel // See Tango WEB pages for list of
changes // // Revision 1.5 2001/07/04 15:06:37 taurel // Many changes
due to new release // // Revision 1.2 2001/05/04 12:03:21 taurel //
Fix bug in the Util.get_device_by_name() method // // Revision
1.1.1.1 2001/04/04 08:23:53 taurel // Imported sources // // Revision
1.3 2000/04/13 08:23:00 taurel // Added attribute support // //
Revision 1.2 2000/02/04 09:09:59 taurel // Just update revision
number // // Revision 1.1.1.1 2000/02/04 09:08:24 taurel // Imported
sources // // // copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043 // FRANCE //
//-=============================
===============================================
package fr.esrf.TangoDs;
import fr.esrf.Tango.DevFailed; import fr.esrf.Tango.Device; import
fr.esrf.TangoApi.DbClass; import fr.esrf.TangoApi.DbDatum; import
fr.esrf.TangoApi.DbDevExportInfo; import org.omg.CORBA.Any; import
org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.ORB; import
org.omg.PortableServer.POA;
import java.util.Vector;
/** Base class for all TANGO device-class class. A TANGO device-class
class is a class where is stored all data/method common to all
devices of a TANGO device class, $Author: abeilleg $
| Fields inherited from interface fr.esrf.TangoDs.TangoConst |
ACCESS_READ, ACCESS_SERVICE, ACCESS_WRITE, ARCHIVE_EVENT, ATT_CONF_EVENT, Attr_AdmName, Attr_Description, Attr_Name, Attr_State, Attr_Status, Attr_Unknown, ATTRIBUTE, BY_CLASS, BY_DEVICE, BY_PROCESS, CHANGE_EVENT, COMMAND, CONTROL_SYSTEM, DATA_READY_EVENT, DEFAULT_LOCK_VALIDITY, eventNames, LOGGING_CONSOLE_TARGET, LOGGING_CONSOLE_TARGET_ID, LOGGING_DEBUG, LOGGING_DEF_RFT, LOGGING_DEVICE_TARGET, LOGGING_DEVICE_TARGET_ID, LOGGING_ERROR, LOGGING_FATAL, LOGGING_FILE_TARGET, LOGGING_FILE_TARGET_ID, LOGGING_INFO, LOGGING_LEVELS, LOGGING_MAX_RFT, LOGGING_MIN_RFT, LOGGING_OFF, LOGGING_SEPARATOR, LOGGING_UNKNOWN_TARGET_ID, LOGGING_WARN, NO_SYNC, NOT_STATELESS, NotANumber, Op_BlackBox, Op_Command, Op_Command_2, Op_Command_inout, Op_Command_inout_2, Op_Command_inout_history_2, Op_Command_list, Op_Command_list_2, Op_Get_Attr_Config, Op_Get_Attr_Config_2, Op_Info, Op_Ping, Op_Read_Attr, Op_Read_Attr_2, Op_Read_Attr_history_2, Op_Set_Attr_Config, Op_Unknown, Op_Write_Attr, PERIODIC_EVENT, QUALITY_EVENT, Req_Attribute, Req_Operation, Req_Unknown, SERVICE_PROP_NAME, STATELESS, Tango_AllAttr, Tango_AllAttr_3, Tango_AlrmValueNotSpec, Tango_AssocWritNotSpec, Tango_AttrDataFormatName, Tango_CLNT_TIMEOUT, Tango_CmdArgTypeName, Tango_CONST_DEV_STRING, Tango_DbObjName, Tango_DEFAULT_POLL_OLD_FACTOR, Tango_DEFAULT_TIMEOUT, Tango_DEFAULT_TIMEOUT_SEC, Tango_DefaultBlackBoxDepth, Tango_DefaultDocUrl, Tango_DefaultPollRingDepth, Tango_DefaultWritableProp, Tango_DELTA_T, Tango_DescNotSet, Tango_DescNotSpec, Tango_DEV_BOOLEAN, Tango_DEV_CHAR, Tango_DEV_DOUBLE, Tango_DEV_ENCODED, Tango_DEV_FLOAT, Tango_DEV_INT, Tango_DEV_LONG, Tango_DEV_LONG64, Tango_DEV_SHORT, Tango_DEV_STATE, Tango_DEV_STRING, Tango_DEV_UCHAR, Tango_DEV_ULONG, Tango_DEV_ULONG64, Tango_DEV_USHORT, Tango_DEV_VOID, Tango_DevStateName, Tango_DEVVAR_CHARARRAY, Tango_DEVVAR_DOUBLEARRAY, Tango_DEVVAR_DOUBLESTRINGARRAY, Tango_DEVVAR_FLOATARRAY, Tango_DEVVAR_LONG64ARRAY, Tango_DEVVAR_LONGARRAY, Tango_DEVVAR_LONGSTRINGARRAY, Tango_DEVVAR_SHORTARRAY, Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_ULONG64ARRAY, Tango_DEVVAR_ULONGARRAY, Tango_DEVVAR_USHORTARRAY, Tango_DevVersion, Tango_DISCARD_THRESHOLD, Tango_DispUnitNotSpec, Tango_DSDeviceDomain, Tango_EXPERT_ATTR, Tango_EXPERT_CMD, Tango_FormatNotSpec, Tango_InitialOutput, Tango_LabelNotSpec, TANGO_LOG_PATH, Tango_MAX_TRANSFER_SIZE, Tango_MaxServerNameLength, Tango_MIN_POLL_PERIOD, Tango_OPERATOR_ATTR, Tango_OPERATOR_CMD, Tango_POLL_ADD_OBJ, Tango_POLL_ATTR, Tango_POLL_CMD, Tango_POLL_REM_DEV, Tango_POLL_REM_OBJ, Tango_POLL_START, Tango_POLL_STOP, Tango_POLL_UPD_PERIOD, Tango_PollAttribute, Tango_PollCommand, Tango_QualityName, Tango_REL_1, Tango_REL_2, Tango_ResNotDefined, Tango_StdUnitNotSpec, Tango_SysProperty, Tango_TG_IMP_MINOR_DEVFAILED, Tango_TG_IMP_MINOR_NON_DEVFAILED, Tango_TG_IMP_MINOR_TO, Tango_TgLibVers, Tango_UnitNotSpec, USER_EVENT |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initClass
public void initClass()
command_handler
public org.omg.CORBA.Any command_handler(DeviceImpl device,
java.lang.String command,
org.omg.CORBA.Any in_any)
throws DevFailed
- Execute a command.
It looks for the correct command object in the command object vector. If
the command is found, it invoke the always_executed_hook method.
Check if the command is allowed by invoking the is_allowed method
If the command is allowed, invokes the execute method.
- Parameters:
device - The device on which the command must be executedcommand - The command namein_any - The command input data still packed in a CORBA Any object
- Returns:
- A CORBA Any object with the output data packed in
- Throws:
DevFailed - If the command is not found, if the command is not allowed
in the actual device state and re-throws of all the
exception thrown by the always_executed_hook,
is_alloed and execute methods. Click here
to read DevFailed exception specification
command_factory
public abstract void command_factory()
- Create command objects for all command supported by this class of device.
In the DeviceClass class, this method is pure abstract and must be
defined in sub-class. Its rule is to create the command object and to
store them in a vector of command objects
attribute_factory
public void attribute_factory(java.util.Vector v)
throws DevFailed
- Create all the attributes name supported by this class of device.
In the DeviceClass class, this method does nothing and must be re-defined
in sub-class if the sub-class supports attributes. Its rule is to store
the name of all the supported attributes in a vector.
- Throws:
DevFailed
device_name_factory
public void device_name_factory(java.util.Vector list)
- Create device(s) name list (for no database device server).
This method can be re-defined in DeviceClass sub-class for device server
started without database. Its rule is to initialise class device name.
The default method does nothing.
- Parameters:
list - The device name list within a String vector
device_factory
public abstract void device_factory(java.lang.String[] dev_list)
throws DevFailed
- Create device(s).
In the DeviceClass class, this method is pure abstract and must be
defined in sub-class. Its rule is to create all the calss devices and to
store them in a vector of device
- Parameters:
dev_list - The device name list
- Throws:
DevFailed - This method does not throw exception but a redefined
method can. Click here to read DevFailed exception specification
get_command_list
public java.util.Vector get_command_list()
- Get the command object vector.
- Returns:
- A reference to the command vector
get_device_list
public java.util.Vector get_device_list()
- Get the device object vector.
- Returns:
- A reference to the device vector
get_device_at
public DeviceImpl get_device_at(int idx)
- Get the DServer object at the index in vector.
- Returns:
- the DServer object found at index.
get_name
public java.lang.String get_name()
- Get the TANGO device class name.
- Returns:
- The TANGO device class name
get_doc_url
public java.lang.String get_doc_url()
- Get the TANGO device class documentation URL.
- Returns:
- The TANGO device class documentation
get_class_attr
public fr.esrf.TangoDs.MultiClassAttribute get_class_attr()
- Get a handle to the object with all the attributes defined at class level
- Returns:
- A reference to the MultiClassAttribute object
get_db_class
public DbClass get_db_class()
- Get a handle to the DbClass object
- Returns:
- A reference to the DbClass object
get_nodb_name_list
public java.util.Vector get_nodb_name_list()
- Get a reference to the vector with device name list (for no database
device server).
- Returns:
- The device name list