//---------------------------------------------------------------------------- //# pksmb_support.h: Support functions for Parkes glish clients. //---------------------------------------------------------------------------- //# Copyright (C) 1994-2007 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 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 Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be addressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# Original: David Barnes, February 1997. //# $Id: pksmb_support.h,v 19.9 2007/02/07 06:44:05 cal103 Exp $ //---------------------------------------------------------------------------- #ifndef ATNF_PKSMB_SUPPORT_H #define ATNF_PKSMB_SUPPORT_H // AIPS++ includes. #include #include #include // ATNF includes. #include #include #include #define NIGHTTIME_ELEVATION_LIMIT -5.0 // Global generic Glish setup operations. void pksmbSetup(GlishSysEventSource &glishStream, String clientName = String("Unknown client")); Bool shutdown_event(GlishSysEvent &event, void *); Bool unknown_event(GlishSysEvent &event, void *); // Global Glish parameter accessing routines. template Bool getParm(const GlishRecord &parms, const String &item, const T &default_val, T &value); template Bool getParm(const GlishRecord &parms, const String &item, const T &default_val, Array &value); template Bool getParm(const GlishRecord &parms, const String &item, const Array &default_val, Array &value); // Global message logging functions. void logMessage(String msg); void logMessage(String msg, uInt val, String suffix = ""); void logMessage(String msg, Int val, String suffix = ""); void logMessage(String msg, Double val, String suffix = ""); void logWarning(String msg); void logError(String msg); #ifndef AIPS_NO_TEMPLATE_SRC #include #endif //# AIPS_NO_TEMPLATE_SRC #endif