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

State machine added

parent 96067e1a
No related branches found
No related tags found
No related merge requests found
...@@ -164,6 +164,8 @@ ...@@ -164,6 +164,8 @@
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<excludedStates>ON</excludedStates> <excludedStates>ON</excludedStates>
<excludedStates>FAULT</excludedStates> <excludedStates>FAULT</excludedStates>
<excludedStates>ALARM</excludedStates>
<excludedStates>RUNNING</excludedStates>
</commands> </commands>
<commands name="Off" description="Deactivate data importer" execMethod="off" displayLevel="OPERATOR" polledPeriod="0"> <commands name="Off" description="Deactivate data importer" execMethod="off" displayLevel="OPERATOR" polledPeriod="0">
<argin description=""> <argin description="">
...@@ -176,13 +178,19 @@ ...@@ -176,13 +178,19 @@
<excludedStates>OFF</excludedStates> <excludedStates>OFF</excludedStates>
<excludedStates>FAULT</excludedStates> <excludedStates>FAULT</excludedStates>
</commands> </commands>
<states name="ON" description="Data exporter is in ON state (ready for file transfer)"> <states name="ON" description="Data exporter is in ON state (searching new file to transfer)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states> </states>
<states name="OFF" description="Data exporter is in OFF state (not ready for file transfer)"> <states name="OFF" description="Data exporter is in OFF state (not searching for file to transfer)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states> </states>
<states name="FAULT" description="Data exporter is in FAULT state (an error occurred)"> <states name="FAULT" description="Data exporter is in FAULT state (configuration error occurred)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="ALARM" description="Data exporter is in ALARM state (runtime error occured)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="RUNNING" description="Data exporter is in RUNNING state (file transfer in progress)">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states> </states>
<preferences docHome="./doc_html" makefileHome="/usr/local/tango-8.1.2/share/pogo/preferences"/> <preferences docHome="./doc_html" makefileHome="/usr/local/tango-8.1.2/share/pogo/preferences"/>
......
...@@ -41,9 +41,11 @@ ...@@ -41,9 +41,11 @@
//================================================================ //================================================================
// States | Description // States | Description
//================================================================ //================================================================
// ON | Data exporter is in ON state (ready for file transfer) // ON | Data exporter is in ON state (searching new file to transfer)
// OFF | Data exporter is in OFF state (not ready for file transfer) // OFF | Data exporter is in OFF state (not searching for file to transfer)
// FAULT | Data exporter is in FAULT state (an error occurred) // FAULT | Data exporter is in FAULT state (configuration error occurred)
// ALARM | Data exporter is in ALARM state (runtime error occured)
// RUNNING | Data exporter is in RUNNING state (file transfer in progress)
namespace DataImporter_ns namespace DataImporter_ns
...@@ -66,7 +68,9 @@ bool DataImporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any)) ...@@ -66,7 +68,9 @@ bool DataImporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{ {
// Compare device state with not allowed states. // Compare device state with not allowed states.
if (get_state()==Tango::ON || if (get_state()==Tango::ON ||
get_state()==Tango::FAULT) get_state()==Tango::FAULT ||
get_state()==Tango::ALARM ||
get_state()==Tango::RUNNING)
{ {
/*----- PROTECTED REGION ID(DataImporter::OnStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION ID(DataImporter::OnStateAllowed) ENABLED START -----*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment