Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*----- PROTECTED REGION ID(TextToSpeechStateMachine.cpp) ENABLED START -----*/
//=============================================================================
//
// file : TextToSpeechStateMachine.cpp
//
// description : State machine file for the TextToSpeech class
//
// project : polly-text-to-speech
//
// This file is part of Tango device class.
//
// Tango is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with Tango. If not, see <http://www.gnu.org/licenses/>.
//
//
// Copyright (C): 2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017
// European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// France
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include <TextToSpeech.h>
/*----- PROTECTED REGION END -----*/ // TextToSpeech::TextToSpeechStateMachine.cpp
//================================================================
// States | Description
//================================================================
// FAULT | A subsystem caused an error and the TextToSpeech state is FAULT.
// OFF | The text to speech server is OFF.
// ON | The text to speech server is ON.
// UNKNOWN | Unknown error or initialisation state.
namespace TextToSpeech_ns
{
//=================================================
// Attributes Allowed Methods
//=================================================
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_text_to_talk_allowed()
* Description : Execution allowed for text_to_talk attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_text_to_talk_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for text_to_talk attribute in Write access.
/*----- PROTECTED REGION ID(TextToSpeech::text_to_talkStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::text_to_talkStateAllowed_WRITE
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Not any excluded states for text_to_talk attribute in read access.
/*----- PROTECTED REGION ID(TextToSpeech::text_to_talkStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::text_to_talkStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_voice_allowed()
* Description : Execution allowed for voice attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_voice_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for voice attribute in Write access.
/*----- PROTECTED REGION ID(TextToSpeech::voiceStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::voiceStateAllowed_WRITE
// Not any excluded states for voice attribute in read access.
/*----- PROTECTED REGION ID(TextToSpeech::voiceStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::voiceStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_jingle_allowed()
* Description : Execution allowed for jingle attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_jingle_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for jingle attribute in Write access.
/*----- PROTECTED REGION ID(TextToSpeech::jingleStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::jingleStateAllowed_WRITE
// Not any excluded states for jingle attribute in read access.
/*----- PROTECTED REGION ID(TextToSpeech::jingleStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::jingleStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_speech_delay_allowed()
* Description : Execution allowed for speech_delay attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_speech_delay_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for speech_delay attribute in Write access.
/*----- PROTECTED REGION ID(TextToSpeech::speech_delayStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::speech_delayStateAllowed_WRITE
// Not any excluded states for speech_delay attribute in read access.
/*----- PROTECTED REGION ID(TextToSpeech::speech_delayStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::speech_delayStateAllowed_READ
return true;
}
//=================================================
// Commands Allowed Methods
//=================================================
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_Off_allowed()
* Description : Execution allowed for Off attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_Off_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT ||
get_state()==Tango::OFF ||
get_state()==Tango::UNKNOWN)
{
/*----- PROTECTED REGION ID(TextToSpeech::OffStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::OffStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_On_allowed()
* Description : Execution allowed for On attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT ||
get_state()==Tango::ON ||
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
get_state()==Tango::UNKNOWN)
{
/*----- PROTECTED REGION ID(TextToSpeech::OnStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::OnStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_Reset_allowed()
* Description : Execution allowed for Reset attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_Reset_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Not any excluded states for Reset command.
/*----- PROTECTED REGION ID(TextToSpeech::ResetStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::ResetStateAllowed
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_DevClear_allowed()
* Description : Execution allowed for DevClear attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_DevClear_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT ||
get_state()==Tango::OFF ||
get_state()==Tango::UNKNOWN)
{
/*----- PROTECTED REGION ID(TextToSpeech::DevClearStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::DevClearStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_DevStop_allowed()
* Description : Execution allowed for DevStop attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_DevStop_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT ||
get_state()==Tango::OFF ||
get_state()==Tango::UNKNOWN)
{
/*----- PROTECTED REGION ID(TextToSpeech::DevStopStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::DevStopStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : TextToSpeech::is_DevTalk_allowed()
* Description : Execution allowed for DevTalk attribute
*/
//--------------------------------------------------------
bool TextToSpeech::is_DevTalk_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT ||
get_state()==Tango::OFF ||
get_state()==Tango::UNKNOWN)
{
/*----- PROTECTED REGION ID(TextToSpeech::DevTalkStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // TextToSpeech::DevTalkStateAllowed
return false;
}
return true;
}
/*----- PROTECTED REGION ID(TextToSpeech::TextToSpeechStateAllowed.AdditionalMethods) ENABLED START -----*/
// Additional Methods
/*----- PROTECTED REGION END -----*/ // TextToSpeech::TextToSpeechStateAllowed.AdditionalMethods
} // End of namespace