Loading SRT/Servers/SRTWeatherStation/include/SRTWeatherStationImpl.h +17 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ #include "ComponentProxies" #include <ComponentProxy.h> #include "AntennaDefinitionsC.h" /* const CString ADDRESS="192.167.8.13"; //DEBUG Loading Loading @@ -72,6 +76,15 @@ The class implements the Srt Meteo Station. Not all the paramters from the station have been implemented. */ #include <SRTMountC.h> #include "ComponentProxy.h" namespace Antenna { PROXY_COMPONENT(SRTMount); }; using ACS::ThreadBase; class SRTWeatherStationImpl; Loading Loading @@ -204,7 +217,9 @@ private: Management::Scheduler_proxy m_scheduler; Antenna::AntennaBoss_proxy m_antennaBoss; void deleteAll(); Antenna::AntennaBoss_proxy m_antennaBoss; Antenna::SRTMount_proxy m_mount; void deleteAll(); CSecureArea<SRTWeatherSocket> *m_socket; CWindCheckerThread *m_controlThread_p; WeatherStationData m_wsdata; Loading @@ -218,6 +233,7 @@ private: SmartPropertyPointer<RWdouble> m_humidity; SmartPropertyPointer<RWdouble> m_pressure; SimpleParser::CParser<SRTWeatherSocket> * m_parser; unsigned int m_threshold; Loading SRT/Servers/SRTWeatherStation/src/Makefile +5 −1 Original line number Diff line number Diff line Loading @@ -75,11 +75,15 @@ SRTWeatherStationImpl_LIBS =ComponentErrors \ ManagmentDefinitionsStubs\ ParserErrors\ AntennaBossStubs\ MountStubs\ SchedulerStubs \ SRTMountStubs \ AntennaDefinitionsStubs\ AntennaErrors # # special compilation flags for single c sources #yyyyy_CFLAGS = Loading SRT/Servers/SRTWeatherStation/src/SRTWeatherStationImpl.cpp +22 −6 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ SRTWeatherStationImpl::SRTWeatherStationImpl( m_scheduler.setContainerServices(m_containerServices); m_antennaBoss.setComponentName("IDL:alma/Antenna/AntennaBoss:1.0"); m_antennaBoss.setContainerServices(m_containerServices); m_mount.setComponentName("IDL:alma/Antenna/SRTMount:1.0"); m_mount.setContainerServices(m_containerServices); AUTO_TRACE("SRTWeatherStationImpl::SRTWeatherStationImpl"); Loading Loading @@ -104,7 +105,6 @@ Weather::parameters SRTWeatherStationImpl::getData()throw (ACSErr::ACSbaseExImpl { Weather::parameters mp; AUTO_TRACE("SRTWeatherStationImpl::getData"); ACS::Time timestamp; double temperature; double winddir; Loading Loading @@ -275,7 +275,9 @@ void SRTWeatherStationImpl::initialize() throw (ACSErr::ACSbaseExImpl) SRTWeatherSocket *sock; try { if (CIRATools::getDBValue(getContainerServices(),"IPAddress",ADDRESS) && CIRATools::getDBValue(getContainerServices(),"port",PORT)) if (CIRATools::getDBValue(getContainerServices(),"IPAddress",ADDRESS) && CIRATools::getDBValue(getContainerServices(),"port",PORT)) && CIRATools::getDBValue(getContainerServices(),"windthreshold",m_threshold)) && { ACS_LOG(LM_FULL_INFO,"SRTWeatherStationImpl::initialize()",(LM_INFO,"IP address %s, Port %d ",(const char *) ADDRESS,PORT)); Loading Loading @@ -341,7 +343,6 @@ void SRTWeatherStationImpl::initialize() throw (ACSErr::ACSbaseExImpl) throw x.getComponentErrorsEx(); } SRTWeatherStationImpl* self_p =this; AUTO_TRACE("SRTWeatherStationImpl::initialize"); Loading Loading @@ -441,8 +442,23 @@ SRTWeatherStationImpl::pressure () void SRTWeatherStationImpl::parkAntenna() { ACSErr::Completion_var completion; // ACS::ROpattern_var property; Antenna::ROTCommonModes_ptr property; property=m_mount->elevationMode(); double status; status=property->get_sync(completion); if (status !=Antenna::ACU_STOW) { m_scheduler->stopSchedule(); m_antennaBoss->park(); } ACS_LOG(LM_FULL_INFO,"SRTWeatherStationImpl::parkAntenna()",(LM_WARNING,"AUTOSTOWING!!!!!!")); Loading SRT/Servers/SRTWeatherStation/src/WindCheckerThread.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ CWindCheckerThread::runLoop() wdata = m_srtweatherstation_p->getData(); wind=wdata.wind; // converts wind speed from m/s to km/h AUTO_TRACE("WindCheckerThread::runLoop()"); if (wind > 41){ if (wind > 0){ m_srtweatherstation_p->parkAntenna(); Loading Loading
SRT/Servers/SRTWeatherStation/include/SRTWeatherStationImpl.h +17 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ #include "ComponentProxies" #include <ComponentProxy.h> #include "AntennaDefinitionsC.h" /* const CString ADDRESS="192.167.8.13"; //DEBUG Loading Loading @@ -72,6 +76,15 @@ The class implements the Srt Meteo Station. Not all the paramters from the station have been implemented. */ #include <SRTMountC.h> #include "ComponentProxy.h" namespace Antenna { PROXY_COMPONENT(SRTMount); }; using ACS::ThreadBase; class SRTWeatherStationImpl; Loading Loading @@ -204,7 +217,9 @@ private: Management::Scheduler_proxy m_scheduler; Antenna::AntennaBoss_proxy m_antennaBoss; void deleteAll(); Antenna::AntennaBoss_proxy m_antennaBoss; Antenna::SRTMount_proxy m_mount; void deleteAll(); CSecureArea<SRTWeatherSocket> *m_socket; CWindCheckerThread *m_controlThread_p; WeatherStationData m_wsdata; Loading @@ -218,6 +233,7 @@ private: SmartPropertyPointer<RWdouble> m_humidity; SmartPropertyPointer<RWdouble> m_pressure; SimpleParser::CParser<SRTWeatherSocket> * m_parser; unsigned int m_threshold; Loading
SRT/Servers/SRTWeatherStation/src/Makefile +5 −1 Original line number Diff line number Diff line Loading @@ -75,11 +75,15 @@ SRTWeatherStationImpl_LIBS =ComponentErrors \ ManagmentDefinitionsStubs\ ParserErrors\ AntennaBossStubs\ MountStubs\ SchedulerStubs \ SRTMountStubs \ AntennaDefinitionsStubs\ AntennaErrors # # special compilation flags for single c sources #yyyyy_CFLAGS = Loading
SRT/Servers/SRTWeatherStation/src/SRTWeatherStationImpl.cpp +22 −6 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ SRTWeatherStationImpl::SRTWeatherStationImpl( m_scheduler.setContainerServices(m_containerServices); m_antennaBoss.setComponentName("IDL:alma/Antenna/AntennaBoss:1.0"); m_antennaBoss.setContainerServices(m_containerServices); m_mount.setComponentName("IDL:alma/Antenna/SRTMount:1.0"); m_mount.setContainerServices(m_containerServices); AUTO_TRACE("SRTWeatherStationImpl::SRTWeatherStationImpl"); Loading Loading @@ -104,7 +105,6 @@ Weather::parameters SRTWeatherStationImpl::getData()throw (ACSErr::ACSbaseExImpl { Weather::parameters mp; AUTO_TRACE("SRTWeatherStationImpl::getData"); ACS::Time timestamp; double temperature; double winddir; Loading Loading @@ -275,7 +275,9 @@ void SRTWeatherStationImpl::initialize() throw (ACSErr::ACSbaseExImpl) SRTWeatherSocket *sock; try { if (CIRATools::getDBValue(getContainerServices(),"IPAddress",ADDRESS) && CIRATools::getDBValue(getContainerServices(),"port",PORT)) if (CIRATools::getDBValue(getContainerServices(),"IPAddress",ADDRESS) && CIRATools::getDBValue(getContainerServices(),"port",PORT)) && CIRATools::getDBValue(getContainerServices(),"windthreshold",m_threshold)) && { ACS_LOG(LM_FULL_INFO,"SRTWeatherStationImpl::initialize()",(LM_INFO,"IP address %s, Port %d ",(const char *) ADDRESS,PORT)); Loading Loading @@ -341,7 +343,6 @@ void SRTWeatherStationImpl::initialize() throw (ACSErr::ACSbaseExImpl) throw x.getComponentErrorsEx(); } SRTWeatherStationImpl* self_p =this; AUTO_TRACE("SRTWeatherStationImpl::initialize"); Loading Loading @@ -441,8 +442,23 @@ SRTWeatherStationImpl::pressure () void SRTWeatherStationImpl::parkAntenna() { ACSErr::Completion_var completion; // ACS::ROpattern_var property; Antenna::ROTCommonModes_ptr property; property=m_mount->elevationMode(); double status; status=property->get_sync(completion); if (status !=Antenna::ACU_STOW) { m_scheduler->stopSchedule(); m_antennaBoss->park(); } ACS_LOG(LM_FULL_INFO,"SRTWeatherStationImpl::parkAntenna()",(LM_WARNING,"AUTOSTOWING!!!!!!")); Loading
SRT/Servers/SRTWeatherStation/src/WindCheckerThread.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ CWindCheckerThread::runLoop() wdata = m_srtweatherstation_p->getData(); wind=wdata.wind; // converts wind speed from m/s to km/h AUTO_TRACE("WindCheckerThread::runLoop()"); if (wind > 41){ if (wind > 0){ m_srtweatherstation_p->parkAntenna(); Loading