Loading SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp +43 −39 Original line number Diff line number Diff line Loading @@ -72,44 +72,8 @@ void SRTActiveSurfaceCore::run(void) ACS::pattern asProfile_val; 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(); while (monitor == true) { if (totalactuators >= 1 && totalactuators <= 24) // 1 circle i= 1; if (totalactuators >= 25 && totalactuators <= 48) // 2 circle Loading Loading @@ -152,6 +116,47 @@ 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 Loading Loading @@ -216,7 +221,6 @@ void SRTActiveSurfaceCore::run(void) actuatorcounter = l; totacts = totalactuators; CIRATools::Wait(0,100000); } // end of while } Loading SRT/Interfaces/SRTActiveSurfaceInterface/idl/usd.idl +10 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,16 @@ 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(); }; }; Loading SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ 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); Loading SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossSectorThread.h +6 −3 Original line number Diff line number Diff line Loading @@ -49,18 +49,21 @@ 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 run(); virtual void runLoop(); /** * This method is used to set the sector to be initialized. It MUST be called before starting the thread execution */ virtual void setSector(int sector); virtual void prepare(int sector); private: IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; CSRTActiveSurfaceBossCore *boss; int m_sector; 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; }; #endif /*_SRTACTIVESURFACEBOSSSECTORTHREAD_H_*/ SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossWorkingThread.h +2 −3 Original line number Diff line number Diff line Loading @@ -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,IRA::CSecureArea<CSRTActiveSurfaceBossCore> *param, CSRTActiveSurfaceBossWorkingThread(const ACE_CString& name,CSRTActiveSurfaceBossCore *param, const ACS::TimeInterval& responseTime=ThreadBase::defaultResponseTime,const ACS::TimeInterval& sleepTime=ThreadBase::defaultSleepTime); /** Loading @@ -52,8 +52,7 @@ public: virtual void runLoop(); private: IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; CSRTActiveSurfaceBossCore *boss; }; #endif /*_SRTACTIVESURFACEBOSSWORKINGTHREAD_H_*/ Loading
SRT/Clients/SRTActiveSurfaceGUIClient/src/SRTActiveSurfaceCore.cpp +43 −39 Original line number Diff line number Diff line Loading @@ -72,44 +72,8 @@ void SRTActiveSurfaceCore::run(void) ACS::pattern asProfile_val; 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(); while (monitor == true) { if (totalactuators >= 1 && totalactuators <= 24) // 1 circle i= 1; if (totalactuators >= 25 && totalactuators <= 48) // 2 circle Loading Loading @@ -152,6 +116,47 @@ 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 Loading Loading @@ -216,7 +221,6 @@ void SRTActiveSurfaceCore::run(void) actuatorcounter = l; totacts = totalactuators; CIRATools::Wait(0,100000); } // end of while } Loading
SRT/Interfaces/SRTActiveSurfaceInterface/idl/usd.idl +10 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,16 @@ 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(); }; }; Loading
SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,10 @@ 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); Loading
SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossSectorThread.h +6 −3 Original line number Diff line number Diff line Loading @@ -49,18 +49,21 @@ 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 run(); virtual void runLoop(); /** * This method is used to set the sector to be initialized. It MUST be called before starting the thread execution */ virtual void setSector(int sector); virtual void prepare(int sector); private: IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; CSRTActiveSurfaceBossCore *boss; int m_sector; 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; }; #endif /*_SRTACTIVESURFACEBOSSSECTORTHREAD_H_*/
SRT/Servers/SRTActiveSurfaceBoss/include/SRTActiveSurfaceBossWorkingThread.h +2 −3 Original line number Diff line number Diff line Loading @@ -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,IRA::CSecureArea<CSRTActiveSurfaceBossCore> *param, CSRTActiveSurfaceBossWorkingThread(const ACE_CString& name,CSRTActiveSurfaceBossCore *param, const ACS::TimeInterval& responseTime=ThreadBase::defaultResponseTime,const ACS::TimeInterval& sleepTime=ThreadBase::defaultSleepTime); /** Loading @@ -52,8 +52,7 @@ public: virtual void runLoop(); private: IRA::CSecureArea<CSRTActiveSurfaceBossCore> *m_core; CSRTActiveSurfaceBossCore *boss; }; #endif /*_SRTACTIVESURFACEBOSSWORKINGTHREAD_H_*/