Tango Device Server User's Guide

EUROPEAN SYNCHROTRON RADIATION FACILITY ##### INSTALLATION EUROPEENNE DE RAYONNEMENT SYNCHROTRON |

Main Page Namespace List Alphabetical List Compound List File List Namespace Members Compound Members File Members

# TangoTest.h

Go to the documentation of this file.

    00001 //=============================================================================
    00002 //
    00003 // file :        TangoTest.h
    00004 //
    00005 // description : Include for the TangoTest class.
    00006 //
    00007 // project :    TANGO Device Server for testing generic clients
    00008 //
    00009 // $Author$N.Leclecq - SOLEIL
    00010 //
    00011 // $Revision$1.0
    00012 //
    00013 // $Log$
    00014 //
    00015 // copyleft :    European Synchrotron Radiation Facility
    00016 //               BP 220, Grenoble 38043
    00017 //               FRANCE
    00018 //
    00019 //=============================================================================
    00020 //
    00021 //              This file is generated by POGO
    00022 //      (Program Obviously used to Generate tango Object)
    00023 //
    00024 //         (c) - Software Engineering Group - ESRF
    00025 //=============================================================================
    00026 #ifndef _TANGOTEST_H
    00027 #define _TANGOTEST_H
    00028
    00029 #include <tango.h>
    00030 //using namespace Tango;
    00031
    00037 //      Add your own constants definitions here.
    00038 //-----------------------------------------------
    00039
    00040 namespace TangoTest
    00041 {
    00042
    00049 /*
    00050  *      Device States Description:
    00051  */
    00052
    00053
    00054 class TangoTest: public Tango::Device_2Impl
    00055 {
    00056   friend class DataGenerator;
    00057
    00058 public :
    00059   //  Add your own data members here
    00060   //-----------------------------------------
    00061
    00062
    00063   //  Here is the Start of the automatic code generation part
    00064   //-------------------------------------------------------------
    00070                 Tango::DevShort *attr_short_scalar_ro_read;
    00071                 Tango::DevShort *attr_short_scalar_read;
    00072                 Tango::DevShort attr_short_scalar_write;
    00073                 Tango::DevLong  *attr_long_scalar_read;
    00074                 Tango::DevLong  attr_long_scalar_write;
    00075                 Tango::DevDouble        *attr_double_scalar_read;
    00076                 Tango::DevDouble        attr_double_scalar_write;
    00077                 Tango::DevString        *attr_string_scalar_read;
    00078                 Tango::DevString        attr_string_scalar_write;
    00079                 Tango::DevShort *attr_short_spectrum_read;
    00080                 Tango::DevLong  *attr_long_spectrum_read;
    00081                 Tango::DevDouble        *attr_double_spectrum_read;
    00082                 Tango::DevShort *attr_short_image_read;
    00083                 Tango::DevLong  *attr_long_image_read;
    00084                 Tango::DevDouble        *attr_double_image_read;
    00085                 Tango::DevShort attr_short_scalar_w_write;
    00086                 Tango::DevShort *attr_short_scalar_rww_read;
    00087                 Tango::DevLong  attr_long_scalar_w_write;
    00088                 Tango::DevLong  *attr_long_scalar_rww_read;
    00089                 Tango::DevDouble        attr_double_scalar_w_write;
    00090                 Tango::DevDouble        *attr_double_scalar_rww_read;
    00091                 Tango::DevDouble        attr_ampli_write;
    00092                 Tango::DevDouble        *attr_wave_read;
    00094
    00100
    00101
    00111         TangoTest(Tango::DeviceClass *,string &);
    00118         TangoTest(Tango::DeviceClass *,const char *);
    00126         TangoTest(Tango::DeviceClass *,const char *,const char *);
    00128
    00135         ~TangoTest();
    00137
    00138
    00144         virtual void init_device();
    00148         virtual void delete_device();
    00152         virtual void always_executed_hook();
    00153
    00155
    00164         virtual void read_attr_hardware(vector<long> &attr_list);
    00168         virtual void read_attr(Tango::Attribute &attr);
    00172         virtual void write_attr_hardware(vector<long> &attr_list);
    00177         void    dev_void();
    00184         Tango::DevBoolean       dev_boolean(Tango::DevBoolean);
    00191         Tango::DevShort dev_short(Tango::DevShort);
    00198         Tango::DevUShort        dev_ushort(Tango::DevUShort);
    00205         Tango::DevLong  dev_long(Tango::DevLong);
    00212         Tango::DevULong dev_ulong(Tango::DevULong);
    00219         Tango::DevFloat dev_float(Tango::DevFloat);
    00226         Tango::DevDouble        dev_double(Tango::DevDouble);
    00233         Tango::DevString        dev_string(Tango::DevString);
    00240         Tango::DevVarCharArray  *dev_var_char_array(const Tango::DevVarCharArray *);
    00247         Tango::DevVarShortArray *dev_var_short_array(const Tango::DevVarShortArray *);
    00254         Tango::DevVarUShortArray        *dev_var_ushort_array(const Tango::DevVarUShortArray *);
    00261         Tango::DevVarLongArray  *dev_var_long_array(const Tango::DevVarLongArray *);
    00268         Tango::DevVarULongArray *dev_var_ulong_array(const Tango::DevVarULongArray *);
    00275         Tango::DevVarFloatArray *dev_var_float_array(const Tango::DevVarFloatArray *);
    00282         Tango::DevVarDoubleArray        *dev_var_double_array(const Tango::DevVarDoubleArray *);
    00289         Tango::DevVarStringArray        *dev_var_string_array(const Tango::DevVarStringArray *);
    00296         Tango::DevVarLongStringArray    *dev_var_long_string_array(const Tango::DevVarLongStringArray *);
    00303         Tango::DevVarDoubleStringArray  *dev_var_double_string_array(const Tango::DevVarDoubleStringArray *);
    00304
    00308          void get_device_property();
    00310
    00311         //      Here is the end of the automatic code generation part
    00312         //-------------------------------------------------------------
    00313
    00317   void gen_data (void);
    00318
    00319 protected :
    00320   //  Add your own data members here
    00321   //-----------------------------------------
    00322   // Device property: multi-threaded impl (true/false)
    00323   short mthreaded_impl;
    00324   // Device property: data generation period (in ms)
    00325   long sleep_period;
    00326   //- A mutex to protect the device against race conditions
    00327   omni_mutex lock;
    00328   // The data generator (thread)
    00329   DataGenerator* data_gen;
    00330 };
    00331
    00332 }       // namespace
    00333
    00334 #endif  // _TANGOTEST_H

Tango Device Server User's Guide

### (c) ESRF - Software Engineering Group