EUROPEAN SYNCHROTRON RADIATION FACILITY
INSTALLATION EUROPEENNE DE RAYONNEMENT SYNCHROTRON
ESRF Logo
Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

TextTalker.h

Go to the documentation of this file.
00001 //=============================================================================
00002 //
00003 // file :        TextTalker.h
00004 //
00005 // description : Include for the TextTalker class.
00006 //
00007 // project :    TextTalker TANGO Device Server
00008 //
00009 // $Author: bourtemb $
00010 //
00011 // $Revision: 1.1 $
00012 //
00013 // $Log: TextTalker_8h-source.html,v $
00013 // Revision 1.1  2005/06/30 15:24:54  bourtemb
00013 // Initial revision
00013 //
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 _TEXTTALKER_H
00027 #define _TEXTTALKER_H
00028 
00029 #include <tango.h>
00030 // speech api
00031 #include <sapi.h>
00032 #include "sphelper.h"
00033 
00034  //     Add your own constants definitions here.
00035  //-----------------------------------------------
00036 
00037 
00038 namespace TextTalker
00039 {
00040 
00046 /*
00047  *      Device States Description:
00048  *      Tango::ON :     The talker is ON.
00049  *      Tango::OFF :    The talker is OFF.
00050  */
00051 
00052 
00053 class TextTalker: public Tango::Device_2Impl
00054 {
00055 public :
00056         //      Add your own data members here
00057         //-----------------------------------------
00058 #ifndef WITHOUT_SPEECH
00059         //ISpVoice * pVoice;
00060         wchar_t tfs[1000];  // Text For Silence => "<silence msec='pause'/>"
00061         wchar_t tts[10000]; // text to speech
00062         wchar_t ttsstart[10000]; // text to speech at initialization of the server
00063         wchar_t ttg[15];    // Text for the Gender => "Gender=gender"
00064         enum SPVPRIORITY THE_PRIORITY;  // current priority of the voice
00065 #endif
00066 
00067         //      Here is the Start of the automatic code generation part
00068         //------------------------------------------------------------- 
00074                 Tango::DevString        *attr_gender_read;
00075                 Tango::DevString        attr_gender_write;
00076                 Tango::DevShort *attr_volume_read;
00077                 Tango::DevShort attr_volume_write;
00078                 Tango::DevLong  *attr_rate_read;
00079                 Tango::DevLong  attr_rate_write;
00080                 Tango::DevString        *attr_priority_read;
00081                 Tango::DevString        attr_priority_write;
00082                 Tango::DevLong  *attr_num_pause_read;
00083                 Tango::DevLong  attr_num_pause_write;
00084                 Tango::DevLong  *attr_repeat_read;
00085                 Tango::DevLong  attr_repeat_write;
00086                 Tango::DevString        *attr_text_to_talk_read;
00087                 Tango::DevString        attr_text_to_talk_write;
00089 
00098         string  text_to_talk;
00102         Tango::DevLong  repeat;
00106         Tango::DevLong  num_pause;
00111         string  gender;
00116         Tango::DevUShort        volume;
00121         Tango::DevLong  rate;
00130         string  priority;
00134         string  start_text;
00136 
00146         TextTalker(Tango::DeviceClass *,string &);
00153         TextTalker(Tango::DeviceClass *,const char *);
00161         TextTalker(Tango::DeviceClass *,const char *,const char *);
00163 
00170         ~TextTalker() {};
00174         void delete_device();
00176 
00177         
00183         virtual void init_device();
00187         virtual void always_executed_hook();
00188 
00190 
00199         virtual void read_attr_hardware(vector<long> &attr_list);
00203         virtual void read_attr(Tango::Attribute &attr);
00207         virtual void write_attr_hardware(vector<long> &attr_list);
00213         virtual Tango::DevState dev_state();
00219         virtual Tango::ConstDevString   dev_status();
00225         void    dev_write(Tango::DevString);
00231         void    dev_talk(Tango::DevString);
00237         void    dev_set_param(const Tango::DevVarLongArray *);
00242         void    dev_stop();
00248         Tango::DevString        dev_read();
00253         void    dev_clear();
00260         Tango::DevVarLongArray  *dev_read_param();
00265         void    dev_run();
00276         void    pause();
00285         void    resume();
00291         void    write_welcome_text(Tango::DevString);
00297         Tango::DevString        read_welcome_text();
00298 
00302          void get_device_property();
00304 
00305         //      Here is the end of the automatic code generation part
00306         //------------------------------------------------------------- 
00310         void TTSSay();
00311 
00312 
00313 protected :     
00314         //      Add your own data members here
00315         //-----------------------------------------
00316 #ifndef WITHOUT_SPEECH
00317         ISpVoice * pVoice; // the voice
00318 #endif
00319 };
00320 
00321 }       // namespace
00322 
00323 #endif  // _TEXTTALKER_H
Tango Device Server User's Guide



(c) ESRF - Software Engineering Group