Commit 40eb595d authored by Marco De Marco's avatar Marco De Marco
Browse files

Alarm state added

parent 561be819
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -549,14 +549,14 @@ void MetadataExporter::on()
    }
    catch(std::exception& ex)
    {
        set_state(Tango::FAULT);
        set_state(Tango::ALARM);
        std::stringstream error_stream;
        error_stream << "MetadataExporter::On() " << ex.what() << std::endl;
        set_status(error_stream.str());
    }
    catch(...)
    {
        set_state(Tango::FAULT);
        set_state(Tango::ALARM);
        set_status("MetadataExporter::On() unknown error");
    }

@@ -581,14 +581,14 @@ void MetadataExporter::off()
    }
    catch(std::exception& ex)
    {
        set_state(Tango::FAULT);
        set_state(Tango::ALARM);
        std::stringstream error_stream;
        error_stream << "MetadataExporter::Off() " << ex.what() << std::endl;
        set_status(error_stream.str());
    }
    catch(...)
    {
        set_state(Tango::FAULT);
        set_state(Tango::ALARM);
        set_status("MetadataExporter::Off() unknown error");
    }

+5 −1
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
      <excludedStates>ON</excludedStates>
      <excludedStates>FAULT</excludedStates>
      <excludedStates>ALARM</excludedStates>
    </commands>
    <commands name="Off" description="Deactivate fits importer" execMethod="off" displayLevel="OPERATOR" polledPeriod="0">
      <argin description="">
@@ -135,7 +136,10 @@
    <states name="OFF" description="Metadata exporter is in OFF state (not ready for incoming connections)">
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
    </states>
    <states name="FAULT" description="Metadata exporter is in FAULT state (an error occurred)">
    <states name="FAULT" description="Metadata exporter is in FAULT state (not ready to propagate metadata)">
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
    </states>
    <states name="ALARM" description="Metadata exporter is in ALARM state (not ready to propagate metadata)">
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
    </states>
    <preferences docHome="./doc_html" makefileHome="/usr/local/tango-8.1.2/share/pogo/preferences"/>
+4 −2
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@
//================================================================
//  ON      |  Metadata exporter is in ON state (ready to incoming connections)
//  OFF     |  Metadata exporter is in OFF state (not ready for incoming connections)
//  FAULT   |  Metadata exporter is in FAULT state (an error occurred)
//  FAULT   |  Metadata exporter is in FAULT state (not ready to propagate metadata)
//  ALARM   |  Metadata exporter is in ALARM state (not ready to propagate metadata)


namespace MetadataExporter_ns
@@ -66,7 +67,8 @@ bool MetadataExporter::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::ON ||
		get_state()==Tango::FAULT)
		get_state()==Tango::FAULT ||
		get_state()==Tango::ALARM)
	{
	/*----- PROTECTED REGION ID(MetadataExporter::OnStateAllowed) ENABLED START -----*/