Loading Medicina/Interfaces/MedicinaReceiversInterface/idl/MedicinaCBand.idl +16 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,22 @@ module Receivers { */ readonly attribute ACS::ROdouble environmentTemperature; /* *** SELECT RECEIVER *** */ /** * @brief select receiver C HIGH * */ void setReceiverHigh() raises (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief select receiver C LOW * */ void setReceiverLow() raises (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /* *** COLD HEAD *** */ /** * Turns cold head on bringing down C Low receiver stage temperature. */ Loading Medicina/Servers/MedicinaCBand/include/ComponentCore.h +22 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,12 @@ /* Andrea Orlati(aorlati@ira.inaf.it) 03/08/2011 Creation */ #include "Configuration.h" #include <ReceiverControl.h> #include <LocalOscillatorInterfaceC.h> #include <ReceiversErrors.h> #include <ManagmentDefinitionsC.h> #include "ReceiverControlCBand.h" #include "Commons.h" #include "MixerOperator.h" Loading @@ -39,7 +41,8 @@ class CComponentCore { NOISEMARKERROR=8, EXTNOISEMARK=9, CONNECTIONERROR=10, UNLOCKED=11 UNLOCKED=11, C_HIGH=12 }; public: Loading Loading @@ -118,6 +121,21 @@ public: */ const IRA::CString getSetupMode(); /* RECEIVER SELECTION */ /** * @brief Select current reciver, C HIGH * */ void setReceiverHigh()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl); /** * @brief Select current reciver, C LOW * */ void setReceiverLow()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl); /* *** LOs *** */ Loading Loading @@ -460,7 +478,7 @@ private: maci::ContainerServices* m_services; BACIMutex m_mutex; IRA::ReceiverControl *m_control; // this object is thread safe ReceiverControlCBand *m_control; // this object is thread safe ACS::doubleSeq m_startFreq; ACS::doubleSeq m_bandwidth; ACS::longSeq m_polarization; Loading Medicina/Servers/MedicinaCBand/include/MedicinaCBandImpl.h +13 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,19 @@ public: */ virtual void deactivate() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief Set Receiver C High * */ virtual void setReceiverHigh() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief Set Receiver C Low * */ virtual void setReceiverLow() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * This method is used to turn the calibration diode on. * @throw CORBA::SystemExcpetion Loading Medicina/Servers/MedicinaCBand/include/ReceiverControlCBand.h 0 → 100644 +96 −0 Original line number Diff line number Diff line #ifndef RECEIVER_CONTROL_C_BAND #define RECEIVER_CONTROL_C_BAND #include <ReceiverControl.h> /** * @brief Receiveri Controll child class * @details We need to extend some functionalities as C Hi/LOW receiver selection * */ class ReceiverControlCBand : public IRA::Receviercontrol { public: /** * Constructor * @param dewar_ip the IP address of the dewar control board * @param dewar_port the port of the dewar control board * @param lna_ip the IP address of the LNA control board * @param lna_port the port of the LNA control board * @param guard_time the time in useconds we need to wait between a request and an * @param number_of_feeds number of feeds (default 1) * @param switch_ip the IP address of the switches control board * @param switch_port the port of the switches control board * @params dewar_maddr the dewar board master address (default 0x7C) * @params dewar_saddr the dewar board slave address (default 0x7F) * @params lna_maddr the LNA board master address (default 0x7C) * @params lna_saddr the LNA board slave address (default 0x7F) * @params switch_maddr the switches board master address (default 0x7C) * @params switch_saddr the switches board slave address (default 0x7F) * @param reliable_comm when it is true then the communication * to the board is reliable because there is a checksum field in * both request and answer. It is true to default. * answer to the LNA board * @throw ReceiverControlEx */ ReceiverControlCBand( const std::string dewar_ip, const unsigned short dewar_port, const std::string lna_ip, const unsigned short lna_port, const unsigned int guard_time=250000, // 250000 us == 0.25 seconds const unsigned short number_of_feeds=1, const std::string switch_ip="", const unsigned short switch_port=0, const BYTE dewar_madd=0x7C, // Dewar board master address const BYTE dewar_sadd=0x7F, // Dewar board slave address - We use broadcast address const BYTE lna_madd=0x7C, // LNA board master address const BYTE lna_sadd=0x7F, // LNA board slave address - We use broadcast address const BYTE switch_madd=0x7C, // Switch board master address const BYTE switch_sadd=0x7F, // Switch board slave address - We use broadcast address bool reliable_comm=false ) throw (ReceiverControlEx); /** * @brief Destroy the Receiver Control object * */ ~ReceiverControlCBand(); /** Set HI C Receiver * @param data_type the type of the data; the default type is 1 bit * @param port_type the port type; the default port is the Digital IO * @param port_number the port number; the default port number is 11 * @param value the value to set; the default value is 0x01 * @throw ReceiverControlEx */ void setReceiverHigh( const BYTE data_type=MCB_CMD_DATA_TYPE_B01, const BYTE port_type=MCB_PORT_TYPE_DIO, const BYTE port_number=MCB_PORT_NUMBER_01, const BYTE value=0x01 ) throw (ReceiverControlEx); /** Set LOW C Receiver * @param data_type the type of the data; the default type is 1 bit * @param port_type the port type; the default port is the Digital IO * @param port_number the port number; the default port number is 11 * @param value the value to set; the default value is 0x01 * @throw ReceiverControlEx */ void setReceiverLow( const BYTE data_type=MCB_CMD_DATA_TYPE_B01, const BYTE port_type=MCB_PORT_TYPE_DIO, const BYTE port_number=MCB_PORT_NUMBER_01, const BYTE value=0x00 ) throw (ReceiverControlEx); private: }; #endif No newline at end of file Medicina/Servers/MedicinaCBand/src/ComponentCore.cpp +37 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ CConfiguration const * const CComponentCore::execute() throw (ComponentErrors:: m_configuration.init(m_services); //throw (ComponentErrors::CDBAccessExImpl); try { MED_TRACE_MSG(" Receiver new "); m_control=new IRA::ReceiverControl( m_control=new ReceiverControlCBand( (const char *)m_configuration.getDewarIPAddress(), m_configuration.getDewarPort(), (const char *)m_configuration.getLNAIPAddress(), Loading Loading @@ -186,6 +186,40 @@ const Management::TSystemStatus& CComponentCore::getComponentStatus() /* *** SETUP *** */ void CComponentCore::setReceiverHigh()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { baci::ThreadSyncGuard guard(&m_mutex); try { m_control->setReceiverHigh(); } catch (IRA::ReceiverControlEx& ex) { _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); throw impl; } setStatusBit(C_HIGH); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit } void CComponentCore::setReceiverLow()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { baci::ThreadSyncGuard guard(&m_mutex); try { m_control->setReceiverLow(); } catch (IRA::ReceiverControlEx& ex) { _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); throw impl; } setStatusBit(C_LOW); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit } void CComponentCore::setMode(const char * mode) throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { Loading Loading
Medicina/Interfaces/MedicinaReceiversInterface/idl/MedicinaCBand.idl +16 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,22 @@ module Receivers { */ readonly attribute ACS::ROdouble environmentTemperature; /* *** SELECT RECEIVER *** */ /** * @brief select receiver C HIGH * */ void setReceiverHigh() raises (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief select receiver C LOW * */ void setReceiverLow() raises (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /* *** COLD HEAD *** */ /** * Turns cold head on bringing down C Low receiver stage temperature. */ Loading
Medicina/Servers/MedicinaCBand/include/ComponentCore.h +22 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,12 @@ /* Andrea Orlati(aorlati@ira.inaf.it) 03/08/2011 Creation */ #include "Configuration.h" #include <ReceiverControl.h> #include <LocalOscillatorInterfaceC.h> #include <ReceiversErrors.h> #include <ManagmentDefinitionsC.h> #include "ReceiverControlCBand.h" #include "Commons.h" #include "MixerOperator.h" Loading @@ -39,7 +41,8 @@ class CComponentCore { NOISEMARKERROR=8, EXTNOISEMARK=9, CONNECTIONERROR=10, UNLOCKED=11 UNLOCKED=11, C_HIGH=12 }; public: Loading Loading @@ -118,6 +121,21 @@ public: */ const IRA::CString getSetupMode(); /* RECEIVER SELECTION */ /** * @brief Select current reciver, C HIGH * */ void setReceiverHigh()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl); /** * @brief Select current reciver, C LOW * */ void setReceiverLow()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl); /* *** LOs *** */ Loading Loading @@ -460,7 +478,7 @@ private: maci::ContainerServices* m_services; BACIMutex m_mutex; IRA::ReceiverControl *m_control; // this object is thread safe ReceiverControlCBand *m_control; // this object is thread safe ACS::doubleSeq m_startFreq; ACS::doubleSeq m_bandwidth; ACS::longSeq m_polarization; Loading
Medicina/Servers/MedicinaCBand/include/MedicinaCBandImpl.h +13 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,19 @@ public: */ virtual void deactivate() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief Set Receiver C High * */ virtual void setReceiverHigh() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * @brief Set Receiver C Low * */ virtual void setReceiverLow() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx); /** * This method is used to turn the calibration diode on. * @throw CORBA::SystemExcpetion Loading
Medicina/Servers/MedicinaCBand/include/ReceiverControlCBand.h 0 → 100644 +96 −0 Original line number Diff line number Diff line #ifndef RECEIVER_CONTROL_C_BAND #define RECEIVER_CONTROL_C_BAND #include <ReceiverControl.h> /** * @brief Receiveri Controll child class * @details We need to extend some functionalities as C Hi/LOW receiver selection * */ class ReceiverControlCBand : public IRA::Receviercontrol { public: /** * Constructor * @param dewar_ip the IP address of the dewar control board * @param dewar_port the port of the dewar control board * @param lna_ip the IP address of the LNA control board * @param lna_port the port of the LNA control board * @param guard_time the time in useconds we need to wait between a request and an * @param number_of_feeds number of feeds (default 1) * @param switch_ip the IP address of the switches control board * @param switch_port the port of the switches control board * @params dewar_maddr the dewar board master address (default 0x7C) * @params dewar_saddr the dewar board slave address (default 0x7F) * @params lna_maddr the LNA board master address (default 0x7C) * @params lna_saddr the LNA board slave address (default 0x7F) * @params switch_maddr the switches board master address (default 0x7C) * @params switch_saddr the switches board slave address (default 0x7F) * @param reliable_comm when it is true then the communication * to the board is reliable because there is a checksum field in * both request and answer. It is true to default. * answer to the LNA board * @throw ReceiverControlEx */ ReceiverControlCBand( const std::string dewar_ip, const unsigned short dewar_port, const std::string lna_ip, const unsigned short lna_port, const unsigned int guard_time=250000, // 250000 us == 0.25 seconds const unsigned short number_of_feeds=1, const std::string switch_ip="", const unsigned short switch_port=0, const BYTE dewar_madd=0x7C, // Dewar board master address const BYTE dewar_sadd=0x7F, // Dewar board slave address - We use broadcast address const BYTE lna_madd=0x7C, // LNA board master address const BYTE lna_sadd=0x7F, // LNA board slave address - We use broadcast address const BYTE switch_madd=0x7C, // Switch board master address const BYTE switch_sadd=0x7F, // Switch board slave address - We use broadcast address bool reliable_comm=false ) throw (ReceiverControlEx); /** * @brief Destroy the Receiver Control object * */ ~ReceiverControlCBand(); /** Set HI C Receiver * @param data_type the type of the data; the default type is 1 bit * @param port_type the port type; the default port is the Digital IO * @param port_number the port number; the default port number is 11 * @param value the value to set; the default value is 0x01 * @throw ReceiverControlEx */ void setReceiverHigh( const BYTE data_type=MCB_CMD_DATA_TYPE_B01, const BYTE port_type=MCB_PORT_TYPE_DIO, const BYTE port_number=MCB_PORT_NUMBER_01, const BYTE value=0x01 ) throw (ReceiverControlEx); /** Set LOW C Receiver * @param data_type the type of the data; the default type is 1 bit * @param port_type the port type; the default port is the Digital IO * @param port_number the port number; the default port number is 11 * @param value the value to set; the default value is 0x01 * @throw ReceiverControlEx */ void setReceiverLow( const BYTE data_type=MCB_CMD_DATA_TYPE_B01, const BYTE port_type=MCB_PORT_TYPE_DIO, const BYTE port_number=MCB_PORT_NUMBER_01, const BYTE value=0x00 ) throw (ReceiverControlEx); private: }; #endif No newline at end of file
Medicina/Servers/MedicinaCBand/src/ComponentCore.cpp +37 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ CConfiguration const * const CComponentCore::execute() throw (ComponentErrors:: m_configuration.init(m_services); //throw (ComponentErrors::CDBAccessExImpl); try { MED_TRACE_MSG(" Receiver new "); m_control=new IRA::ReceiverControl( m_control=new ReceiverControlCBand( (const char *)m_configuration.getDewarIPAddress(), m_configuration.getDewarPort(), (const char *)m_configuration.getLNAIPAddress(), Loading Loading @@ -186,6 +186,40 @@ const Management::TSystemStatus& CComponentCore::getComponentStatus() /* *** SETUP *** */ void CComponentCore::setReceiverHigh()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { baci::ThreadSyncGuard guard(&m_mutex); try { m_control->setReceiverHigh(); } catch (IRA::ReceiverControlEx& ex) { _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); throw impl; } setStatusBit(C_HIGH); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit } void CComponentCore::setReceiverLow()throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { baci::ThreadSyncGuard guard(&m_mutex); try { m_control->setReceiverLow(); } catch (IRA::ReceiverControlEx& ex) { _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); throw impl; } setStatusBit(C_LOW); clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit } void CComponentCore::setMode(const char * mode) throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl, ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl) { Loading