Skip to content
Snippets Groups Projects
Commit d331bf55 authored by Marco De Marco's avatar Marco De Marco
Browse files

State machine modified

parent f03c70aa
No related branches found
No related tags found
No related merge requests found
...@@ -480,7 +480,7 @@ void DataExporter::get_device_property() ...@@ -480,7 +480,7 @@ void DataExporter::get_device_property()
//-------------------------------------------------------- //--------------------------------------------------------
void DataExporter::always_executed_hook() void DataExporter::always_executed_hook()
{ {
DEBUG_STREAM << "DataExporter::always_executed_hook() " << device_name << endl; INFO_STREAM << "DataExporter::always_executed_hook() " << device_name << endl;
/*----- PROTECTED REGION ID(DataExporter::always_executed_hook) ENABLED START -----*/ /*----- PROTECTED REGION ID(DataExporter::always_executed_hook) ENABLED START -----*/
if(get_state() != Tango::FAULT) if(get_state() != Tango::FAULT)
......
...@@ -118,6 +118,8 @@ ...@@ -118,6 +118,8 @@
<type xsi:type="pogoDsl:VoidType"/> <type xsi:type="pogoDsl:VoidType"/>
</argout> </argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<excludedStates>ON</excludedStates>
<excludedStates>FAULT</excludedStates>
</commands> </commands>
<commands name="Off" description="Deactivate data exporter" execMethod="off" displayLevel="OPERATOR" polledPeriod="0"> <commands name="Off" description="Deactivate data exporter" execMethod="off" displayLevel="OPERATOR" polledPeriod="0">
<argin description=""> <argin description="">
...@@ -127,6 +129,8 @@ ...@@ -127,6 +129,8 @@
<type xsi:type="pogoDsl:VoidType"/> <type xsi:type="pogoDsl:VoidType"/>
</argout> </argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<excludedStates>OFF</excludedStates>
<excludedStates>FAULT</excludedStates>
</commands> </commands>
<states name="ON" description="Data exporter is in ON state (ready to incoming connections)"> <states name="ON" description="Data exporter is in ON state (ready to incoming connections)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
......
...@@ -64,10 +64,15 @@ namespace DataExporter_ns ...@@ -64,10 +64,15 @@ namespace DataExporter_ns
//-------------------------------------------------------- //--------------------------------------------------------
bool DataExporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any)) bool DataExporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{ {
// Not any excluded states for On command. // Compare device state with not allowed states.
if (get_state()==Tango::ON ||
get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(DataExporter::OnStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION ID(DataExporter::OnStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // DataExporter::OnStateAllowed /*----- PROTECTED REGION END -----*/ // DataExporter::OnStateAllowed
return false;
}
return true; return true;
} }
...@@ -79,10 +84,15 @@ bool DataExporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any)) ...@@ -79,10 +84,15 @@ bool DataExporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
//-------------------------------------------------------- //--------------------------------------------------------
bool DataExporter::is_Off_allowed(TANGO_UNUSED(const CORBA::Any &any)) bool DataExporter::is_Off_allowed(TANGO_UNUSED(const CORBA::Any &any))
{ {
// Not any excluded states for Off command. // Compare device state with not allowed states.
if (get_state()==Tango::OFF ||
get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(DataExporter::OffStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION ID(DataExporter::OffStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // DataExporter::OffStateAllowed /*----- PROTECTED REGION END -----*/ // DataExporter::OffStateAllowed
return false;
}
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment