Commit 91a85ce3 authored by Sergio Poppi's avatar Sergio Poppi
Browse files

Noto weather station setup and fine tuning

parent 59d453b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    Name="WeatherStation"
    Code="MedWeatherStationImpl"
    Type="IDL:alma/Weather/MedWeatherStation:1.0"
    Code="NotoWeatherStationImpl"
    Type="IDL:alma/Weather/NotoWeatherStation:1.0"
    Container="WeatherStationContainer"
	Default="true"
	KeepAliveTime="-1"
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ xmlns="urn:schemas-cosylab-com:MedWeatherStation:1.0"
	      xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
	      xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	      IPAddress="192.167.189.62" port="5002">
	      IPAddress="192.167.187.127" port="5002">
	
	<temperature description="current temperature" />
	<winddir description="instantaneous wind direction" />
+60 −0
Original line number Diff line number Diff line
/* ***************************************************************************/
/* INAF - Istituto Nazionale di AstroFisica                                  */
/* IRA - Istituto di Radioastronomia                                         */
/* OAC - Osservatorio Astronomico di Cagliari                                */
/*                                                                           */
/*                                                                           */
/* This code is under GNU General Public Licence (GPL).                      */
/*                                                                           */
/* Who					When		What                 */
/* Sergio Poppi				18/02/2010      Creation             */
/*                                                                           */
/* ***************************************************************************/

#ifndef _NotoICINAWSTATION_IDL_

#define _NotoICINAWSTATION_IDL_

#include <baci.idl>

#pragma prefix "alma"
#include "GenericWeatherStation.idl"

module Weather{


	interface NotoWeatherStation : GenericWeatherStation
	 {

			
		/**
		* get the humidity
		* @return double	
		*
		*  	
		*	
		*	
		*/
		double getHumidity();
		/**
		* get the temperature
		* @return double	
		*	
		*	
		*/
		double getTemperature();
		/**
		* get the pressure
		* @return double	
		*	
		*	
		*/
		double getWindspeed();

		double getPressure();

	 };

};

#endif
+137 −0
Original line number Diff line number Diff line
#*******************************************************************************
# PPPPPPPP
#
# "@(#) $Id: Makefile,v 1.3 2011-04-19 08:57:40 c.migoni Exp $"
#
# Makefile of ........
#
# who       when      what
# --------  --------  ----------------------------------------------
# almamgr  19/02/08  created
#

#*******************************************************************************
# This Makefile follows VLT Standards (see Makefile(5) for more).
#*******************************************************************************
# REMARKS
#    None
#------------------------------------------------------------------------

#
# user definable C-compilation flags
#USER_CFLAGS = 

#
# additional include and library search paths
#USER_INC = 
#USER_LIB = 

#
# MODULE CODE DESCRIPTION:
# ------------------------
# As a general rule:  public file are "cleaned" and "installed"  
#                     local (_L) are not "installed".

#
# C programs (public and local)
# -----------------------------
#EXECUTABLES     =
#EXECUTABLES_L   = 

#
# 
# IDL Files and flags
# 
IDL_FILES = NotoWeatherStation 
IDL_TAO_FLAGS =
USER_IDL =
#
# Jarfiles and their directories
#
JARFILES= 
jjj_DIRS=
jjj_EXTRAS= 
#
# java sources in Jarfile on/off
DEBUG= 
#
# ACS XmlIdl generation on/off
#
XML_IDL= 
#
# Java Component Helper Classes generation on/off
#
COMPONENT_HELPERS=
#
# Java Entity Classes generation on/off
#
XSDBIND=
#
# Schema Config files for the above
#
XSDBIND_INCLUDE=
# man pages to be done
# --------------------
MANSECTIONS =
MAN1 =
MAN3 =
MAN5 =
MAN7 =
MAN8 =

#
# local man pages
# ---------------
MANl =

#
# ASCII file to be converted into Framemaker-MIF
# --------------------
ASCII_TO_MIF = 

#
# other files to be installed
#----------------------------
INSTALL_FILES =

#
# list of all possible C-sources (used to create automatic dependencies)
# ------------------------------
CSOURCENAMES = \
	$(foreach exe, $(EXECUTABLES) $(EXECUTABLES_L), $($(exe)_OBJECTS)) \
	$(foreach rtos, $(RTAI_MODULES) , $($(rtos)_OBJECTS)) \
	$(foreach lib, $(LIBRARIES) $(LIBRARIES_L), $($(lib)_OBJECTS))

#
#>>>>> END OF standard rules

#
# INCLUDE STANDARDS
# -----------------

MAKEDIRTMP := $(shell searchFile include/acsMakefile)
ifneq ($(MAKEDIRTMP),\#error\#)
   MAKEDIR := $(MAKEDIRTMP)/include
   include $(MAKEDIR)/acsMakefile
endif

#
# TARGETS
# -------
all:	do_all
	@echo " . . . 'all' done" 

clean : clean_all 
	@echo " . . . clean done"

clean_dist : clean_all clean_dist_all 
	@echo " . . . clean_dist done"

man   : do_man 
	@echo " . . . man page(s) done"

install : install_all
	@echo " . . . installation done"


#___oOo___
+5 −4
Original line number Diff line number Diff line
@@ -32,13 +32,14 @@ class MyTCPHandler(SocketServer.BaseRequestHandler):
	    	    done=1
		    break 
    	          
            if self.data=='spettro\n':
            if self.data=='wx\n':
		  now=datetime.datetime.utcnow()
		  tt=now.timetuple()
#	          self.request.send('0132  dr21 %s +42:19:44 2000.0 300.00 5  21964.000   0.0 kkc 80.047 60.416 17:23:13 +44:37:55 0 0 31.5 1018.0 90.0 \n')
            	  print "received spettro, sent back fake string"     
                  
            	  self.request.send('0132  dr21 %s +42:19:44 2000.0 300.00 5  21964.000   0.0 kkc 80.047 60.416 17:23:13 +44:37:55 0 0 %f %f %f 22\n' % (datetime.datetime.utcnow().strftime("%H:%M:%S"),tt[3]+.04,tt[4]+.99,tt[5]+.43))
#	         11:02:22/wx/19.00,1013.34,77.00,3.13,215
            	  print "received wx, sent back fake string"     
		  	  
            	  self.request.send('%s/wx/%f,%f,%f,22,44\n' % (datetime.datetime.utcnow().strftime("%H:%M:%S"),tt[3]+.04,tt[4]+.99,tt[5]+.43))
            	  self.data=""
	          msg=""
	    
Loading