Commit d331bf55 authored by Marco De Marco's avatar Marco De Marco
Browse files

State machine modified

parent f03c70aa
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -480,7 +480,7 @@ void DataExporter::get_device_property()
//--------------------------------------------------------
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 -----*/

    if(get_state() != Tango::FAULT)
+4 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@
        <type xsi:type="pogoDsl:VoidType"/>
      </argout>
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
      <excludedStates>ON</excludedStates>
      <excludedStates>FAULT</excludedStates>
    </commands>
    <commands name="Off" description="Deactivate data exporter" execMethod="off" displayLevel="OPERATOR" polledPeriod="0">
      <argin description="">
@@ -127,6 +129,8 @@
        <type xsi:type="pogoDsl:VoidType"/>
      </argout>
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
      <excludedStates>OFF</excludedStates>
      <excludedStates>FAULT</excludedStates>
    </commands>
    <states name="ON" description="Data exporter is in ON state (ready to incoming connections)">
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
+12 −2
Original line number Diff line number Diff line
@@ -64,10 +64,15 @@ namespace DataExporter_ns
//--------------------------------------------------------
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 END -----*/	//	DataExporter::OnStateAllowed
		return false;
	}
	return true;
}

@@ -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))
{
	//	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 END -----*/	//	DataExporter::OffStateAllowed
		return false;
	}
	return true;
}

+2 −2

File changed.

Contains only whitespace changes.