Commit cbf9c3b2 authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #556: Implemented API to send eMail to system administrators. This...

fix issue #556: Implemented API to send eMail to system administrators. This is now used when a pendolation in Noto and Medicina servo system is (#564)

detected. Also moved the welcome message from station.xml configuration file to StationLocals.xml.
parent 6a256832
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/
   issue #518 - KBand receivers cryo temperature read wrongly with connection problems. More information:
    https://github.com/discos/discos/issues/518#issuecomment-590838480
   issue #530 - New Fitszilla versione 1.21 online. The subscan offsets related keywords added to the primary header.

	issue #556 - Added API to send emails to local system administrators. This feature is now exploted when a servo system oscillation is detected at Noto and Medicina
## Fixed
    issue #518 - In case of communication error we set a dummy value (100000) for the temperature properties, and the related timestamp keeps the value of the last communication timestamp.
    issue #525 - When in LOCAL mode the receivers can turn on/off the noise mark and LNAs. There is no more MNG_FAILURE logging in case of LOCAL mode: only the LOCAL/REMOTE status (during component activation) and the change of status (LOCAL to REMOTE and viceversa) are written to the logfile.
+0 −2
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@
	<xs:attribute name="xPolarMotion" type="xs:double" use="required"/>
	<!--  allow to configure the startup geodetic model  -->
	<xs:attribute name="geodeticModel" type="xs:long" use="required"/>
	<!-- The message to be displayed whenever a new 'project' command is issued -->
	<xs:attribute name="welcomeMessage" type="xs:string" use="required" />
	
</xs:complexType>

+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
	- Author: Andrea Orlati
	-
	- History:
	-   06-11-2020  Created
-->

<xs:schema
	targetNamespace="urn:schemas-cosylab-com:LocalSettings:1.0"
	xmlns="urn:schemas-cosylab-com:LocalSettings:1.0"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
	xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"	
	elementFormDefault="qualified"
	attributeFormDefault="unqualified">

<xs:complexType name="LocalSettingsType">

	<!-- The message to be displayed whenever a new 'project' command is issued -->
	<xs:attribute name="welcomeMessage" type="xs:string" use="required" />
	<!-- list of name of the system administrators, in the form of name dot surname -->
	<xs:attribute name="admins" type="xs:string" use="required" />
	<!-- domain name -->
	<xs:attribute name="domain" type="xs:string" use="required" />
</xs:complexType>

<xs:element name="LocalSettings" type="LocalSettingsType"/>

</xs:schema>
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
/* ************************************************************************************************************* */
/* DISCOS project                                                                                                */
/*                                                                                                               */
/* This code is under GNU General Public Licence (GPL).                                                          */
/*                                                                                                               */
/* Who                                    when            What                                                   */
/* Andrea Orlati (andrea.orlati@inaf.it)  30/10/2020
*/

#include <IRA>

#ifndef DISCOSLOCALS_H_
#define DISCOSLOCALS_H_


namespace DiscosLocals {

class StationConfig {
public:
	StationConfig();
	~StationConfig();
	bool initialize(maci::ContainerServices *Services);
	bool sendMail(const IRA::CString& subject,const IRA::CString& body);
	const IRA::CString& getWelcomeMessage() const { return m_welcome; }
	const IRA::CString& getAdmins() const { return m_admins; }
	const IRA::CString& getDomain() const { return m_domain; }
private:
	IRA::CString m_welcome;
	IRA::CString m_admins;
	IRA::CString m_domain;
	IRA::CString m_receipients;	
};
 
}


#endif /* DISCOSLOCALS_H_ */
 No newline at end of file
+231 −0
Original line number Diff line number Diff line

#*******************************************************************************
# PPPPPPPP
#
# "@(#) $Id$"
#
# Makefile of ........
#
# who       when      what
# --------  --------  ----------------------------------------------
# discos  30/10/20  created
#

# ALMA - Atacama Large Millimeter Array
# Copyright (c) ESO - European Southern Observatory, 2014
# (in the framework of the ALMA collaboration).
# All rights reserved.
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#*******************************************************************************

#*******************************************************************************
# This Makefile follows ALMA/ACS 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   = 

#
# <brief description of xxxxx program>
xxxxx_OBJECTS   =	
xxxxx_LDFLAGS   =
xxxxx_LIBS      =

#
# special compilation flags for single c sources
#yyyyy_CFLAGS   = 

#
# Includes (.h) files (public only)
# ---------------------------------
INCLUDES        = StationConfig.h

#
# Libraries (public and local)
# ----------------------------
LIBRARIES       = DiscosLocals
LIBRARIES_L     =

#
# <brief description of lllll library>
DiscosLocals_OBJECTS   = StationConfig
DiscosLocals_LIBS   = IRALibrary

#
# Scripts (public and local)
# ----------------------------
SCRIPTS         =
SCRIPTS_L       =

#
# TCL scripts (public and local)
# ------------------------------
TCL_SCRIPTS     =
TCL_SCRIPTS_L   =

#
# Python stuff (public and local)
# ----------------------------
PY_SCRIPTS         =
PY_SCRIPTS_L       =

PY_MODULES         =
PY_MODULES_L       =

PY_PACKAGES        =
PY_PACKAGES_L      =
pppppp_MODULES	   =

#
# <brief description of tttttt tcl-script>
tttttt_OBJECTS  =
tttttt_TCLSH    = 
tttttt_LIBS     = 

#
# TCL libraries (public and local)
# ------------------------------
TCL_LIBRARIES   =
TCL_LIBRARIES_L =

#
# <brief description of tttlll library>
tttlll_OBJECTS  = 

#
# Configuration Database Files
# ----------------------------
CDB_SCHEMAS = LocalSettings

# 
# IDL Files and flags
# 
IDL_FILES = 
TAO_IDLFLAGS =
USER_IDL =
#
# Jarfiles and their directories
#
JARFILES= 
jjj_DIRS=
jjj_EXTRAS=
# For expressing dependencies between jarfiles (parallel builds)
jjj_JLIBS= 
#
# 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___
Loading