Loading SRT/Servers/SRTMinorServo/include/macros.def +0 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ #define THROW_EX(TYPE, NAME, MESSAGE, THROUGH_GET) \ { \ string msg(MESSAGE); \ ACS_SHORT_LOG((LM_ERROR, msg.c_str())); \ TYPE::NAME##Impl exImpl(__FILE__, __LINE__, msg.c_str()); \ if(THROUGH_GET) \ throw exImpl.get##NAME(); \ Loading SRT/Servers/SRTMinorServo/src/MinorServoBossImpl.cpp +32 −20 Original line number Diff line number Diff line Loading @@ -748,21 +748,24 @@ bool MinorServoBossImpl::checkScanImpl( comp_name = info.comp_name; } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch (...) { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the axis info")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) if(msScanInfo.is_empty_scan == true) { return true; else } else { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the axis info")); return false; } } ACS::doubleSeq plainCentralPos; // Position without offsets ACS::doubleSeq centralPos; // Position with offsets Loading @@ -773,21 +776,23 @@ bool MinorServoBossImpl::checkScanImpl( centralPos.length(plainCentralPos.length()); } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch (...) { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the central scan position")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the central scan position")); return false; } } MinorServo::WPServo_var component_ref = MinorServo::WPServo::_nil(); if((m_configuration->m_component_refs).count(comp_name)) { Loading @@ -812,13 +817,14 @@ bool MinorServoBossImpl::checkScanImpl( } else { string msg("startScanImpl(): cannot get the " + comp_name + " component"); ACS_SHORT_LOG((LM_ERROR, msg.c_str())); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_ERROR, msg.c_str())); return false; } } ACS::Time min_starting_time = 0; msParamVar->centerScan = centralPos[axis]; Loading @@ -838,42 +844,47 @@ bool MinorServoBossImpl::checkScanImpl( max_speed); } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch(ManagementErrors::SubscanErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch(...) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): unexpected exception getting the min starting time")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): unexpected exception getting the min starting time")); return false; } } msParamVar->startEpoch = (startingTime==0) ? min_starting_time : startingTime; msParamVar->timeToStop = msParamVar->startEpoch + msScanInfo.total_time; if(startingTime != 0 && min_starting_time > startingTime) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): not enought time to start the scan")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): not enought time to start the scan")); return false; } } msParameters = msParamVar._retn(); ACS::Time min_scan_time = get_min_time(scanDistance, acceleration, max_speed); Loading @@ -881,12 +892,13 @@ bool MinorServoBossImpl::checkScanImpl( TIMEVALUE gmst(guard_min_scan_time); if(CIRATools::timeSubtract(ttime, gmst) <= 0) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): total time too short for performing the scan.")); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): total time too short for performing the scan.")); return false; } } else { return true; } Loading Loading
SRT/Servers/SRTMinorServo/include/macros.def +0 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ #define THROW_EX(TYPE, NAME, MESSAGE, THROUGH_GET) \ { \ string msg(MESSAGE); \ ACS_SHORT_LOG((LM_ERROR, msg.c_str())); \ TYPE::NAME##Impl exImpl(__FILE__, __LINE__, msg.c_str()); \ if(THROUGH_GET) \ throw exImpl.get##NAME(); \ Loading
SRT/Servers/SRTMinorServo/src/MinorServoBossImpl.cpp +32 −20 Original line number Diff line number Diff line Loading @@ -748,21 +748,24 @@ bool MinorServoBossImpl::checkScanImpl( comp_name = info.comp_name; } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch (...) { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the axis info")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) if(msScanInfo.is_empty_scan == true) { return true; else } else { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the axis info")); return false; } } ACS::doubleSeq plainCentralPos; // Position without offsets ACS::doubleSeq centralPos; // Position with offsets Loading @@ -773,21 +776,23 @@ bool MinorServoBossImpl::checkScanImpl( centralPos.length(plainCentralPos.length()); } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch (...) { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the central scan position")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_ERROR, "checkScanImpl(): cannot get the central scan position")); return false; } } MinorServo::WPServo_var component_ref = MinorServo::WPServo::_nil(); if((m_configuration->m_component_refs).count(comp_name)) { Loading @@ -812,13 +817,14 @@ bool MinorServoBossImpl::checkScanImpl( } else { string msg("startScanImpl(): cannot get the " + comp_name + " component"); ACS_SHORT_LOG((LM_ERROR, msg.c_str())); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_ERROR, msg.c_str())); return false; } } ACS::Time min_starting_time = 0; msParamVar->centerScan = centralPos[axis]; Loading @@ -838,42 +844,47 @@ bool MinorServoBossImpl::checkScanImpl( max_speed); } catch(ManagementErrors::ConfigurationErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch(ManagementErrors::SubscanErrorExImpl& ex) { ex.log(LM_ERROR); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ex.log(LM_ERROR); return false; } } catch(...) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): unexpected exception getting the min starting time")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): unexpected exception getting the min starting time")); return false; } } msParamVar->startEpoch = (startingTime==0) ? min_starting_time : startingTime; msParamVar->timeToStop = msParamVar->startEpoch + msScanInfo.total_time; if(startingTime != 0 && min_starting_time > startingTime) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): not enought time to start the scan")); msParameters = msParamVar._retn(); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): not enought time to start the scan")); return false; } } msParameters = msParamVar._retn(); ACS::Time min_scan_time = get_min_time(scanDistance, acceleration, max_speed); Loading @@ -881,12 +892,13 @@ bool MinorServoBossImpl::checkScanImpl( TIMEVALUE gmst(guard_min_scan_time); if(CIRATools::timeSubtract(ttime, gmst) <= 0) { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): total time too short for performing the scan.")); if(msScanInfo.is_empty_scan == true) return true; else else { ACS_SHORT_LOG((LM_WARNING, "MinorServoBoss::checkScan(): total time too short for performing the scan.")); return false; } } else { return true; } Loading