Commit 93b31f8f authored by Sergio Poppi's avatar Sergio Poppi
Browse files

Autostow to weatherstation

parent 6992111e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
		    </xs:sequence>
        <xs:attribute name="IPAddress" type="xs:string" use="required"/>
	       <xs:attribute name="port" type="xs:unsignedInt" use="required"/>
        <xs:attribute name="windthreshold" type="xs:unsignedInt" use="optional"/>
  
  	</xs:complexType>
  
+13 −3
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@
#include "WeatherStationData.h"
// #include "WindCheckerThread.h"
#include <acsThread.h>
#include <AntennaBossC.h>
#include <SchedulerC.h>

#include "ComponentProxies" 


/*
const CString ADDRESS="192.167.8.13"; //DEBUG
@@ -89,7 +94,6 @@ class CWindCheckerThread : public ACS::Thread
		int loopCounter_m;
		SRTWeatherStationImpl  * m_srtweatherstation_p;


};


@@ -149,6 +153,8 @@ public:
	virtual void	 cleanUp()throw (ACSErr::ACSbaseExImpl);
	virtual void aboutToAbort() throw (ACSErr::ACSbaseExImpl);
	
        void parkAntenna(void);


	/** 
	 * Returns a reference to the air temperature  property Implementation of IDL interface.
@@ -194,10 +200,11 @@ public:

 
private:
                maci::ContainerServices * m_containerServices;
	
 	
 
	void deleteAll();
        Management::Scheduler_proxy m_scheduler;
        Antenna::AntennaBoss_proxy m_antennaBoss;	void deleteAll();
	CSecureArea<SRTWeatherSocket> *m_socket;
	CWindCheckerThread *m_controlThread_p;
	WeatherStationData m_wsdata;
@@ -211,6 +218,9 @@ private:
	SmartPropertyPointer<RWdouble> m_humidity;
	SmartPropertyPointer<RWdouble> m_pressure;
	SimpleParser::CParser<SRTWeatherSocket> * m_parser;
        
        
        
    void operator=(const SRTWeatherStationImpl&);
		
};
+5 −1
Original line number Diff line number Diff line
@@ -73,7 +73,11 @@ SRTWeatherStationImpl_LIBS =ComponentErrors \
			expat\
			GenericWeatherStationStubs\
			ManagmentDefinitionsStubs\
			ParserErrors
			ParserErrors\
			AntennaBossStubs\
			SchedulerStubs \
			AntennaDefinitionsStubs\
			AntennaErrors


#
+2 −1
Original line number Diff line number Diff line
@@ -178,11 +178,12 @@ int SRTWeatherSocket::parse(CString meteo_string)
       fprintf(stderr, "Parse error at line %d:\n%s\n",
 	      XML_GetCurrentLineNumber(p),
 	      XML_ErrorString(XML_GetErrorCode(p)));
              XML_ParserFree(p);
       return -1;

	}


        XML_ParserFree(p);
	return 0;

}
+26 −0
Original line number Diff line number Diff line
@@ -14,6 +14,16 @@ SRTWeatherStationImpl::SRTWeatherStationImpl(
		       m_humidity(this),
		       m_pressure(this)
{	

      
        m_containerServices = containerServices;       
        m_scheduler.setComponentName("IDL:alma/Management/Scheduler:1.0");
        m_scheduler.setContainerServices(m_containerServices);
        m_antennaBoss.setComponentName("IDL:alma/Antenna/AntennaBoss:1.0");
        m_antennaBoss.setContainerServices(m_containerServices);
        

        
        AUTO_TRACE("SRTWeatherStationImpl::SRTWeatherStationImpl");
}

@@ -427,6 +437,22 @@ SRTWeatherStationImpl::pressure ()
    return prop._retn();
}


void SRTWeatherStationImpl::parkAntenna()
{

   m_scheduler->stopSchedule();
   m_antennaBoss->park();
   ACS_LOG(LM_FULL_INFO,"SRTWeatherStationImpl::parkAntenna()",(LM_WARNING,"AUTOSTOWING!!!!!!"));
   


}





/* --------------- [ MACI DLL support functions ] -----------------*/
#include <maciACSComponentDefines.h>
MACI_DLL_SUPPORT_FUNCTIONS(SRTWeatherStationImpl)
Loading