Loading Medicina/Servers/MedicinaMinorServo/include/MedMinorServoGeometry.hpp +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,12 @@ class MinorServoGeometryError: public std::runtime_error MinorServoGeometryError(const char *msg): std::runtime_error(std::string(msg)){}; }; class MinorServoAxisNameError: public std::runtime_error { public: MinorServoAxisNameError(const char *msg): std::runtime_error(std::string(msg)){}; }; class MinorServoAxisLimitError: public std::runtime_error { public: Loading Loading @@ -76,6 +82,11 @@ class MedMinorServoPosition * return axes values only for actually used ones */ std::vector<double> get_axes_positions(); /** * return position of named axis * @param axis: the name of the axis */ double get_axis_position(const char*) throw (MinorServoAxisNameError); double x; double y; Loading Medicina/Servers/MedicinaMinorServo/include/MinorServoBossImpl.h +29 −21 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #include <new> #include <acsutil.h> #include <baciDB.h> #include <ManagmentDefinitionsS.h> #include <baciCharacteristicComponentImpl.h> #include <baciSmartPropertyPointer.h> #include <baciROpattern.h> Loading @@ -25,6 +24,10 @@ #include <baciROstring.h> #include <acsncSimpleSupplier.h> #include <enumpropROImpl.h> #include <MinorServoDefinitionsC.h> #include <AntennaDefinitionsC.h> #include <ManagmentDefinitionsS.h> #include <ComponentErrors.h> #include <ManagementErrors.h> //#include <WPServoImpl.h> Loading Loading @@ -75,6 +78,7 @@ using namespace baci; using namespace std; using namespace MinorServo; struct VerboseStatusFlags { bool *is_initialized; Loading Loading @@ -157,7 +161,8 @@ public: /** Return true when the system is performing a scan */ bool isScanning(); /** Return true if a scan is active. To get the system in tracking, perform a stopScan() */ /** Return true if a scan is active. To get the system in tracking, perform * a closeScan() */ bool isScanActive(); /** Loading Loading @@ -239,12 +244,12 @@ public: * @param axis_code the identification code of the axis * * @return true if the scan is achievable * @throw ManagementErrors::ConfigurationErrorEx, ManagementErrors::SubscanErrorEx */ MinorServo::TRunTimeParameters checkScan( ACS::Time & starting_time, MinorServo::MinorServoScan scan_parameters, Antenna::TRunTimeParameters antenna_parameters, bool checkScan( ACS::Time starting_time, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters, TRunTimeParameters_out minor_servo_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); Loading @@ -255,16 +260,19 @@ public: * @param range the total axis movement in mm (centered in the actual position) * @param total_time the duration of axis movement * @param axis_code the identification code of the axis * @param azimuth the antenna azimuth at scan start * @param elevation the antenna elevation at scan start * * @return true if the scan is achievable * @throw ManagementErrors::ConfigurationErrorEx, ManagementErrors::SubscanErrorEx */ bool checkScanImpl( const ACS::Time starting_time, double range, const ACS::Time total_time, const string axis_code ) throw (MinorServoErrors::ScanErrorEx); ACS::Time starting_time, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters, TRunTimeParameters_out minor_servo_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); /** * Start the scan of one axis of a MinorServo target. Loading @@ -278,19 +286,18 @@ public: */ void startScan( ACS::Time & starting_time, MinorServo::MinorServoScan scan_parameters, Antenna::TRunTimeParameters antenna_parameters, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void closeScan() throw (MinorServoErrors::MinorServoErrorsEx, void closeScan(ACS::Time &timeToStop) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void startScanImpl( ACS::Time & starting_time, const double range, const ACS::Time total_time, string axis_code const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters ) throw (MinorServoErrors::ScanErrorEx); /** Return the central position of the axis involved in the scan */ Loading Loading @@ -430,7 +437,8 @@ public: ComponentErrors::ComponentErrorsEx); void setElevationTrackingImpl(const char * value) throw (MinorServoErrors::TrackingErrorEx); throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void setASConfiguration(const char * value) throw (MinorServoErrors::MinorServoErrorsEx, Loading Medicina/Servers/MedicinaMinorServo/include/macros.def 0 → 100644 +24 −0 Original line number Diff line number Diff line // Throw the exception NAME of type TYPE with message MESSAGE // If THROUGH_GET is true get the exception by an exImpl method #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(); \ else \ throw exImpl; \ } #define GET_PROPERTY_REFERENCE(IMPLNAME, TYPE, PROPERTY, PROPERTYNAME) \ TYPE##_ptr IMPLNAME::PROPERTYNAME() \ throw (CORBA::SystemException) \ { \ if (PROPERTY==0) return TYPE::_nil(); \ TYPE##_var tmp=TYPE::_narrow(PROPERTY->getCORBAReference()); \ return tmp._retn(); \ } Medicina/Servers/MedicinaMinorServo/src/MSBossTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ MSBossTracker::MSBossTracker( m_offset(params.m_offset) { AUTO_TRACE("MSBossTracker::MSBossTracker()"); m_antennaBoss.setServices(m_services); m_antennaBoss.setContainerServices(m_services); m_antennaBoss.setComponentName("ANTENNA/BOSS"); } Loading Medicina/Servers/MedicinaMinorServo/src/Makefile +9 −13 Original line number Diff line number Diff line Loading @@ -12,20 +12,15 @@ USER_LIB = -lbaci \ LIBRARIES = MinorServoBossImpl LIBRARIES_L = #MedMinorServoTime_OBJECTS = MedMinorServoTime #MedMinorServoTime_LIBS = acstime IRALibrary #MedMinorServoModbus_OBJECTS = MedMinorServoModbus ModbusChannel #MedMinorServoModbus_LIBS = IRALibrary modbus boost_thread #PositionQueue_OBJECTS = PositionQueue MedMinorServoGeometry MedMinorServoTime #PositionQueue_LIBS = IRALibrary boost_thread # # <brief description of lllll library> MedMinorServoControl_OBJECTS = MedMinorServoControl MedMinorServoGeometry MedMinorServoTime MedMinorServoModbus ModbusChannel PositionQueue MedMinorServoControl_LIBS = baci acsnc IRALibrary ManagmentDefinitionsStubs ManagementErrors ComponentErrors modbus boost_thread MedMinorServoControl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MedMinorServoTime MedMinorServoModbus \ ModbusChannel PositionQueue MedMinorServoControl_LIBS = baci acsnc IRALibrary ManagmentDefinitionsStubs \ ManagementErrors \ ComponentErrors modbus boost_thread MinorServoBossImpl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MedMinorServoStatus MedMinorServoParameters \ Loading @@ -36,7 +31,8 @@ MinorServoBossImpl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MSBossTracker MedMinorServoOffset MinorServoBossImpl MinorServoBossImpl_LIBS = MedMinorServoBossStubs MinorServoBossStubs \ ManagmentDefinitionsStubs ManagementErrors \ ManagmentDefinitionsStubs MinorServoDefinitionsStubs \ ManagementErrors \ IRALibrary ComponentErrors MinorServoErrors \ acsnc ParserErrors AntennaDefinitionsStubs \ MountStubs AntennaBossStubs AntennaErrors \ Loading Loading
Medicina/Servers/MedicinaMinorServo/include/MedMinorServoGeometry.hpp +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,12 @@ class MinorServoGeometryError: public std::runtime_error MinorServoGeometryError(const char *msg): std::runtime_error(std::string(msg)){}; }; class MinorServoAxisNameError: public std::runtime_error { public: MinorServoAxisNameError(const char *msg): std::runtime_error(std::string(msg)){}; }; class MinorServoAxisLimitError: public std::runtime_error { public: Loading Loading @@ -76,6 +82,11 @@ class MedMinorServoPosition * return axes values only for actually used ones */ std::vector<double> get_axes_positions(); /** * return position of named axis * @param axis: the name of the axis */ double get_axis_position(const char*) throw (MinorServoAxisNameError); double x; double y; Loading
Medicina/Servers/MedicinaMinorServo/include/MinorServoBossImpl.h +29 −21 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #include <new> #include <acsutil.h> #include <baciDB.h> #include <ManagmentDefinitionsS.h> #include <baciCharacteristicComponentImpl.h> #include <baciSmartPropertyPointer.h> #include <baciROpattern.h> Loading @@ -25,6 +24,10 @@ #include <baciROstring.h> #include <acsncSimpleSupplier.h> #include <enumpropROImpl.h> #include <MinorServoDefinitionsC.h> #include <AntennaDefinitionsC.h> #include <ManagmentDefinitionsS.h> #include <ComponentErrors.h> #include <ManagementErrors.h> //#include <WPServoImpl.h> Loading Loading @@ -75,6 +78,7 @@ using namespace baci; using namespace std; using namespace MinorServo; struct VerboseStatusFlags { bool *is_initialized; Loading Loading @@ -157,7 +161,8 @@ public: /** Return true when the system is performing a scan */ bool isScanning(); /** Return true if a scan is active. To get the system in tracking, perform a stopScan() */ /** Return true if a scan is active. To get the system in tracking, perform * a closeScan() */ bool isScanActive(); /** Loading Loading @@ -239,12 +244,12 @@ public: * @param axis_code the identification code of the axis * * @return true if the scan is achievable * @throw ManagementErrors::ConfigurationErrorEx, ManagementErrors::SubscanErrorEx */ MinorServo::TRunTimeParameters checkScan( ACS::Time & starting_time, MinorServo::MinorServoScan scan_parameters, Antenna::TRunTimeParameters antenna_parameters, bool checkScan( ACS::Time starting_time, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters, TRunTimeParameters_out minor_servo_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); Loading @@ -255,16 +260,19 @@ public: * @param range the total axis movement in mm (centered in the actual position) * @param total_time the duration of axis movement * @param axis_code the identification code of the axis * @param azimuth the antenna azimuth at scan start * @param elevation the antenna elevation at scan start * * @return true if the scan is achievable * @throw ManagementErrors::ConfigurationErrorEx, ManagementErrors::SubscanErrorEx */ bool checkScanImpl( const ACS::Time starting_time, double range, const ACS::Time total_time, const string axis_code ) throw (MinorServoErrors::ScanErrorEx); ACS::Time starting_time, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters, TRunTimeParameters_out minor_servo_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); /** * Start the scan of one axis of a MinorServo target. Loading @@ -278,19 +286,18 @@ public: */ void startScan( ACS::Time & starting_time, MinorServo::MinorServoScan scan_parameters, Antenna::TRunTimeParameters antenna_parameters, const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters ) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void closeScan() throw (MinorServoErrors::MinorServoErrorsEx, void closeScan(ACS::Time &timeToStop) throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void startScanImpl( ACS::Time & starting_time, const double range, const ACS::Time total_time, string axis_code const MinorServo::MinorServoScan& scan_parameters, const Antenna::TRunTimeParameters& antenna_parameters ) throw (MinorServoErrors::ScanErrorEx); /** Return the central position of the axis involved in the scan */ Loading Loading @@ -430,7 +437,8 @@ public: ComponentErrors::ComponentErrorsEx); void setElevationTrackingImpl(const char * value) throw (MinorServoErrors::TrackingErrorEx); throw (MinorServoErrors::MinorServoErrorsEx, ComponentErrors::ComponentErrorsEx); void setASConfiguration(const char * value) throw (MinorServoErrors::MinorServoErrorsEx, Loading
Medicina/Servers/MedicinaMinorServo/include/macros.def 0 → 100644 +24 −0 Original line number Diff line number Diff line // Throw the exception NAME of type TYPE with message MESSAGE // If THROUGH_GET is true get the exception by an exImpl method #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(); \ else \ throw exImpl; \ } #define GET_PROPERTY_REFERENCE(IMPLNAME, TYPE, PROPERTY, PROPERTYNAME) \ TYPE##_ptr IMPLNAME::PROPERTYNAME() \ throw (CORBA::SystemException) \ { \ if (PROPERTY==0) return TYPE::_nil(); \ TYPE##_var tmp=TYPE::_narrow(PROPERTY->getCORBAReference()); \ return tmp._retn(); \ }
Medicina/Servers/MedicinaMinorServo/src/MSBossTracker.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ MSBossTracker::MSBossTracker( m_offset(params.m_offset) { AUTO_TRACE("MSBossTracker::MSBossTracker()"); m_antennaBoss.setServices(m_services); m_antennaBoss.setContainerServices(m_services); m_antennaBoss.setComponentName("ANTENNA/BOSS"); } Loading
Medicina/Servers/MedicinaMinorServo/src/Makefile +9 −13 Original line number Diff line number Diff line Loading @@ -12,20 +12,15 @@ USER_LIB = -lbaci \ LIBRARIES = MinorServoBossImpl LIBRARIES_L = #MedMinorServoTime_OBJECTS = MedMinorServoTime #MedMinorServoTime_LIBS = acstime IRALibrary #MedMinorServoModbus_OBJECTS = MedMinorServoModbus ModbusChannel #MedMinorServoModbus_LIBS = IRALibrary modbus boost_thread #PositionQueue_OBJECTS = PositionQueue MedMinorServoGeometry MedMinorServoTime #PositionQueue_LIBS = IRALibrary boost_thread # # <brief description of lllll library> MedMinorServoControl_OBJECTS = MedMinorServoControl MedMinorServoGeometry MedMinorServoTime MedMinorServoModbus ModbusChannel PositionQueue MedMinorServoControl_LIBS = baci acsnc IRALibrary ManagmentDefinitionsStubs ManagementErrors ComponentErrors modbus boost_thread MedMinorServoControl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MedMinorServoTime MedMinorServoModbus \ ModbusChannel PositionQueue MedMinorServoControl_LIBS = baci acsnc IRALibrary ManagmentDefinitionsStubs \ ManagementErrors \ ComponentErrors modbus boost_thread MinorServoBossImpl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MedMinorServoStatus MedMinorServoParameters \ Loading @@ -36,7 +31,8 @@ MinorServoBossImpl_OBJECTS = MedMinorServoControl MedMinorServoGeometry \ MSBossTracker MedMinorServoOffset MinorServoBossImpl MinorServoBossImpl_LIBS = MedMinorServoBossStubs MinorServoBossStubs \ ManagmentDefinitionsStubs ManagementErrors \ ManagmentDefinitionsStubs MinorServoDefinitionsStubs \ ManagementErrors \ IRALibrary ComponentErrors MinorServoErrors \ acsnc ParserErrors AntennaDefinitionsStubs \ MountStubs AntennaBossStubs AntennaErrors \ Loading