Commit cf3f99f2 authored by Giuseppe Carboni's avatar Giuseppe Carboni
Browse files

Revert "Some improvements to the SRT active surface servers and clients (#430)"

This reverts commit a4af184a.
parent 378aa54d
Loading
Loading
Loading
Loading
+39 −43
Original line number Diff line number Diff line
@@ -72,8 +72,44 @@ void SRTActiveSurfaceCore::run(void)
    ACS::pattern asProfile_val;


    while (monitor == true)
    {
    while (monitor == true) {

        bossStatus_var = tASBoss->status();
        bossStatus_val = bossStatus_var->get_sync(completion.out());
        switch (bossStatus_val) {
            case (Management::MNG_OK):
                ASstatusCode = 0;
                break;
            case (Management::MNG_WARNING):
                ASstatusCode = -1;
                break;
            case (Management::MNG_FAILURE):
                ASstatusCode = -2;
                break;
        }
        emit setGUIasStatusCode();

        asProfile_var = tASBoss->pprofile();
        asProfile_val = asProfile_var->get_sync(completion.out());
        switch (asProfile_val) {
            case (ActiveSurface::AS_SHAPED):
                asProfileCode = 0;
                break;
            case (ActiveSurface::AS_SHAPED_FIXED):
                asProfileCode = 1;
                break;
            case (ActiveSurface::AS_PARABOLIC):
                asProfileCode = 2;
                break;
            case (ActiveSurface::AS_PARABOLIC_FIXED):
                asProfileCode = 3;
                break;
            case (ActiveSurface::AS_PARK):
                asProfileCode = 4;
                break;
        }
        emit setGUIasProfileCode();

        if (totalactuators >= 1 && totalactuators <= 24) // 1 circle
            i= 1;
        if (totalactuators >= 25 && totalactuators <= 48)  // 2 circle
@@ -116,47 +152,6 @@ void SRTActiveSurfaceCore::run(void)
            totalactuators == 1105 || totalactuators == 1113 || totalactuators == 1117)      
            l = 1;

        //set the current USD color to yellow to identify which one is being checked
        theActuatorStatusColorString = "background-color: rgb(255, 255, 0);";
        emit setGUIActuatorColor(i, l, theActuatorStatusColorString);
		CIRATools::Wait(0,10000);

        bossStatus_var = tASBoss->status();
        bossStatus_val = bossStatus_var->get_sync(completion.out());
        switch (bossStatus_val) {
            case (Management::MNG_OK):
                ASstatusCode = 0;
                break;
            case (Management::MNG_WARNING):
                ASstatusCode = -1;
                break;
            case (Management::MNG_FAILURE):
                ASstatusCode = -2;
                break;
        }
        emit setGUIasStatusCode();

        asProfile_var = tASBoss->pprofile();
        asProfile_val = asProfile_var->get_sync(completion.out());
        switch (asProfile_val) {
            case (ActiveSurface::AS_SHAPED):
                asProfileCode = 0;
                break;
            case (ActiveSurface::AS_SHAPED_FIXED):
                asProfileCode = 1;
                break;
            case (ActiveSurface::AS_PARABOLIC):
                asProfileCode = 2;
                break;
            case (ActiveSurface::AS_PARABOLIC_FIXED):
                asProfileCode = 3;
                break;
            case (ActiveSurface::AS_PARK):
                asProfileCode = 4;
                break;
        }
        emit setGUIasProfileCode();

        try {
            tASBoss->usdStatus4GUIClient(i,l,status);
            if ((status & ENBL) == 0)  {// usd not enabled
@@ -221,6 +216,7 @@ void SRTActiveSurfaceCore::run(void)
		actuatorcounter = l;
		totacts = totalactuators;

		CIRATools::Wait(0,100000);
	} // end of while
}

+0 −10
Original line number Diff line number Diff line
@@ -185,16 +185,6 @@ module ActiveSurface
    	*/
    	oneway void top();
    	oneway void bottom();

        /**
        *   Get the last read status of the USD
        */
        long getStatus();

        /**
        *   Update the status of the USD
        */
        oneway void updateStatus();
	};

};
+0 −4
Original line number Diff line number Diff line
@@ -121,10 +121,6 @@ public:

    void sectorActiveSurface(int sector) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::ComponentErrorsEx);

    void checkUSD(int sector, int lanIndex, int circleIndex, int usdCircleIndex, std::string serial_usd) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::ComponentErrorsEx);

    void sectorSetupCompleted(int sector);

    void watchingActiveSurfaceStatus() throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::CouldntGetAttributeExImpl, ComponentErrors::ComponentNotActiveExImpl);

    void usdStatus4GUIClient(int circle, int actuator, CORBA::Long_out status) throw (ComponentErrors::CORBAProblemExImpl, ComponentErrors::CouldntGetAttributeExImpl, ComponentErrors::ComponentNotActiveExImpl);
+3 −6
Original line number Diff line number Diff line
@@ -49,21 +49,18 @@ public:
      * This method overrides the thread implementation class.
      * The thread can be exited by calling ACS::ThreadBase::stop or ACS::ThreadBase::exit command.
     */
     virtual void runLoop();
     virtual void run();

     /**
      * This method is used to set the sector to be initialized. It MUST be called before starting the thread execution
     */
     virtual void prepare(int sector);
     virtual void setSector(int sector);

private:

    IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core;
    CSRTActiveSurfaceBossCore *boss;
    int m_sector, m_index, m_usd_count;
    bool m_ready;
    std::vector<int> m_lanIndexes, m_circleIndexes, m_usdCircleIndexes;
    std::vector<std::string> m_serial_usds;
    int m_sector;
};

#endif /*_SRTACTIVESURFACEBOSSSECTORTHREAD_H_*/
+3 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ public:
     * @param responseTime thread's heartbeat response time in 100ns unit. Default value is 1s.
     * @param sleepTime thread's sleep time in 100ns unit. Default value is 100ms.
    */
	CSRTActiveSurfaceBossWorkingThread(const ACE_CString& name,CSRTActiveSurfaceBossCore *param,
	CSRTActiveSurfaceBossWorkingThread(const ACE_CString& name,IRA::CSecureArea<CSRTActiveSurfaceBossCore>  *param, 
			const ACS::TimeInterval& responseTime=ThreadBase::defaultResponseTime,const ACS::TimeInterval& sleepTime=ThreadBase::defaultSleepTime);

	/**
@@ -52,7 +52,8 @@ public:
     virtual void runLoop();

private:
	CSRTActiveSurfaceBossCore *boss;

	IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core;
};

#endif /*_SRTACTIVESURFACEBOSSWORKINGTHREAD_H_*/
Loading