From f19143f720c9f730aad41be44166b9457a30b252 Mon Sep 17 00:00:00 2001 From: Alessio Igor Bogani <alessio.bogani@elettra.eu> Date: Tue, 6 Feb 2024 11:35:18 +0100 Subject: [PATCH] Allow commands execution on FAULT state --- src/Serial2.xmi | 3 --- src/Serial2StateMachine.cpp | 9 +++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Serial2.xmi b/src/Serial2.xmi index f156a9b..4b33778 100644 --- a/src/Serial2.xmi +++ b/src/Serial2.xmi @@ -45,7 +45,6 @@ <type xsi:type="pogoDsl:VoidType"/> </argout> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> - <excludedStates>FAULT</excludedStates> <excludedStates>INIT</excludedStates> </commands> <commands name="Read" description="" execMethod="read" displayLevel="OPERATOR" polledPeriod="0"> @@ -56,7 +55,6 @@ <type xsi:type="pogoDsl:CharArrayType"/> </argout> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> - <excludedStates>FAULT</excludedStates> <excludedStates>INIT</excludedStates> </commands> <commands name="ReadUntil" description="" execMethod="read_until" displayLevel="OPERATOR" polledPeriod="0"> @@ -67,7 +65,6 @@ <type xsi:type="pogoDsl:CharArrayType"/> </argout> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> - <excludedStates>FAULT</excludedStates> <excludedStates>INIT</excludedStates> </commands> <attributes name="InputLength" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> diff --git a/src/Serial2StateMachine.cpp b/src/Serial2StateMachine.cpp index c45e442..65103a8 100644 --- a/src/Serial2StateMachine.cpp +++ b/src/Serial2StateMachine.cpp @@ -114,8 +114,7 @@ bool Serial2::is_Reconnections_allowed(TANGO_UNUSED(Tango::AttReqType type)) bool Serial2::is_Write_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. - if (get_state()==Tango::FAULT || - get_state()==Tango::INIT) + if (get_state()==Tango::INIT) { /*----- PROTECTED REGION ID(Serial2::WriteStateAllowed) ENABLED START -----*/ @@ -134,8 +133,7 @@ bool Serial2::is_Write_allowed(TANGO_UNUSED(const CORBA::Any &any)) bool Serial2::is_Read_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. - if (get_state()==Tango::FAULT || - get_state()==Tango::INIT) + if (get_state()==Tango::INIT) { /*----- PROTECTED REGION ID(Serial2::ReadStateAllowed) ENABLED START -----*/ @@ -154,8 +152,7 @@ bool Serial2::is_Read_allowed(TANGO_UNUSED(const CORBA::Any &any)) bool Serial2::is_ReadUntil_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. - if (get_state()==Tango::FAULT || - get_state()==Tango::INIT) + if (get_state()==Tango::INIT) { /*----- PROTECTED REGION ID(Serial2::ReadUntilStateAllowed) ENABLED START -----*/ -- GitLab