TANGO Java API
( TangORB-7.3.3.jar)

fr.esrf.TangoApi
Class TacoTangoDeviceDAODefaultImpl

java.lang.Object
  extended by fr.esrf.TangoApi.TacoTangoDeviceDAODefaultImpl
All Implemented Interfaces:
ITacoTangoDeviceDAO

public class TacoTangoDeviceDAODefaultImpl
extends java.lang.Object
implements ITacoTangoDeviceDAO

Class Description:
This class is a wrapper for TACO device. It is an interface between TANGO DeviceProxy and TACO device. It replace the fr.esrf.TacoApi.TacoDevice class using JNI library abd use true java classes found in Taco.jar (ESRF specific).

Version:
$Revision: 1.1 $
Author:
verdier

Constructor Summary
TacoTangoDeviceDAODefaultImpl()
           
 
Method Summary
 DeviceData command_inout(TacoTangoDevice tacoDevice, java.lang.String command, DeviceData argin)
          Excute a command on a TACO device
 CommandInfo[] commandListQuery(TacoTangoDevice tacoDevice)
           
 CommandInfo commandQuery(TacoTangoDevice tacoDevice, java.lang.String cmdname)
           
 java.lang.String[] dev_inform(TacoTangoDevice tacoDevice)
          Returns TACO device information.
 AttributeConfig[] get_attribute_config(TacoTangoDevice tacoDevice, java.lang.String[] attrnames)
           
 java.lang.String[] get_attribute_list(TacoTangoDevice tacoDevice)
           
 DbDatum[] get_property(TacoTangoDevice tacoDevice, java.lang.String[] propnames)
           
 int get_rpc_protocol(TacoTangoDevice tacoDevice)
          Return the dev_rpc_protocol use by TACO device
 int get_rpc_timeout(TacoTangoDevice tacoDevice)
          Execute the dev_rpc_timeout TACO command to get RPC timeout.
 DevSource get_source(TacoTangoDevice tacoDevice)
          returns the device data source
 java.lang.String[] infoToTango(TacoTangoDevice tacoDevice, java.lang.String taco_info)
          Taco --> Tango data convertion method
 void init(TacoTangoDevice tacoDevice, java.lang.String devname, java.lang.String nethost)
          Constructor for a Taco Device Object.
 DeviceAttribute[] read_attribute(TacoTangoDevice tacoDevice, java.lang.String[] attrnames)
           
 void set_rpc_protocol(TacoTangoDevice tacoDevice, int mode)
          Execute the dev_rpc_protocol TACO command to change RPC protocol mode.
 void set_rpc_timeout(TacoTangoDevice tacoDevice, int millis)
          Execute the dev_rpc_timeout TACO command to set RPC timeout.
 void set_source(TacoTangoDevice tacoDevice, DevSource src)
          Set the device data source
 int tangoType(int taco_type)
          Taco --> Tango data convertion method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TacoTangoDeviceDAODefaultImpl

public TacoTangoDeviceDAODefaultImpl()
Method Detail

init

public void init(TacoTangoDevice tacoDevice,
                 java.lang.String devname,
                 java.lang.String nethost)
          throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Constructor for a Taco Device Object.

Specified by:
init in interface ITacoTangoDeviceDAO
devname - the device name
nethost - the $NETHOST (where Taco database is)
Throws:
DevFailed

command_inout

public DeviceData command_inout(TacoTangoDevice tacoDevice,
                                java.lang.String command,
                                DeviceData argin)
                         throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Excute a command on a TACO device

Specified by:
command_inout in interface ITacoTangoDeviceDAO
command - Command name to be executed on the device
argin - Input command argument (Tango data)
Returns:
Output command argument (Tango data)
Throws:
DevFailed

commandListQuery

public CommandInfo[] commandListQuery(TacoTangoDevice tacoDevice)
                               throws DevFailed
Specified by:
commandListQuery in interface ITacoTangoDeviceDAO
Throws:
DevFailed

commandQuery

public CommandInfo commandQuery(TacoTangoDevice tacoDevice,
                                java.lang.String cmdname)
                         throws DevFailed
Specified by:
commandQuery in interface ITacoTangoDeviceDAO
Throws:
DevFailed

set_rpc_protocol

public void set_rpc_protocol(TacoTangoDevice tacoDevice,
                             int mode)
                      throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Execute the dev_rpc_protocol TACO command to change RPC protocol mode.

Specified by:
set_rpc_protocol in interface ITacoTangoDeviceDAO
mode - RPC protocol mode to be seted (TangoApi.ApiDefs.D_TCP or ApiDefs.TacoTangoDevice.D_TCP).
Throws:
DevFailed

get_rpc_protocol

public int get_rpc_protocol(TacoTangoDevice tacoDevice)
                     throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Return the dev_rpc_protocol use by TACO device

Specified by:
get_rpc_protocol in interface ITacoTangoDeviceDAO
Returns:
RPC protocol used (TangoApi.ApiDefs.D_TCP or ApiDefs.TacoTangoDevice.D_TCP).
Throws:
DevFailed

get_rpc_timeout

public int get_rpc_timeout(TacoTangoDevice tacoDevice)
                    throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Execute the dev_rpc_timeout TACO command to get RPC timeout.

Specified by:
get_rpc_timeout in interface ITacoTangoDeviceDAO
Throws:
DevFailed

set_rpc_timeout

public void set_rpc_timeout(TacoTangoDevice tacoDevice,
                            int millis)
                     throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Execute the dev_rpc_timeout TACO command to set RPC timeout.

Specified by:
set_rpc_timeout in interface ITacoTangoDeviceDAO
Throws:
DevFailed

dev_inform

public java.lang.String[] dev_inform(TacoTangoDevice tacoDevice)
                              throws DevFailed
Description copied from interface: ITacoTangoDeviceDAO
Returns TACO device information.

Specified by:
dev_inform in interface ITacoTangoDeviceDAO
Returns:
TACO device information as String array.
  • Device name.
  • Class name
  • Device type
  • Device server name
  • Host name
  • Nethost name
    Throws:
    DevFailed

  • get_property

    public DbDatum[] get_property(TacoTangoDevice tacoDevice,
                                  java.lang.String[] propnames)
                           throws DevFailed
    Specified by:
    get_property in interface ITacoTangoDeviceDAO
    Throws:
    DevFailed

    set_source

    public void set_source(TacoTangoDevice tacoDevice,
                           DevSource src)
                    throws DevFailed
    Description copied from interface: ITacoTangoDeviceDAO
    Set the device data source

    Specified by:
    set_source in interface ITacoTangoDeviceDAO
    src - new data source (CACHE_DEV, CACHE or DEV).
    Throws:
    DevFailed

    get_source

    public DevSource get_source(TacoTangoDevice tacoDevice)
    Description copied from interface: ITacoTangoDeviceDAO
    returns the device data source

    Specified by:
    get_source in interface ITacoTangoDeviceDAO
    Returns:
    data source (CACHE_DEV, CACHE or DEV).

    get_attribute_list

    public java.lang.String[] get_attribute_list(TacoTangoDevice tacoDevice)
                                          throws DevFailed
    Specified by:
    get_attribute_list in interface ITacoTangoDeviceDAO
    Throws:
    DevFailed

    get_attribute_config

    public AttributeConfig[] get_attribute_config(TacoTangoDevice tacoDevice,
                                                  java.lang.String[] attrnames)
                                           throws DevFailed
    Specified by:
    get_attribute_config in interface ITacoTangoDeviceDAO
    Throws:
    DevFailed

    read_attribute

    public DeviceAttribute[] read_attribute(TacoTangoDevice tacoDevice,
                                            java.lang.String[] attrnames)
                                     throws DevFailed
    Specified by:
    read_attribute in interface ITacoTangoDeviceDAO
    Throws:
    DevFailed

    tangoType

    public int tangoType(int taco_type)
    Description copied from interface: ITacoTangoDeviceDAO
    Taco --> Tango data convertion method

    Specified by:
    tangoType in interface ITacoTangoDeviceDAO
    Parameters:
    taco_type - Taco data
    Returns:
    the TANGO converted data

    infoToTango

    public java.lang.String[] infoToTango(TacoTangoDevice tacoDevice,
                                          java.lang.String taco_info)
    Description copied from interface: ITacoTangoDeviceDAO
    Taco --> Tango data convertion method

    Specified by:
    infoToTango in interface ITacoTangoDeviceDAO
    taco_info - Taco data
    Returns:
    the TANGO converted data
    • Device name.
    • Class name
    • Device type
    • Device server name
    • Host name

    TANGO Java API
    ( TangORB-7.3.3.jar)