Skip to content
Snippets Groups Projects
Commit 210c512c authored by Ruud Overeem's avatar Ruud Overeem
Browse files

BugID: 679

Redesign of Main Control Unit software.
parent 388b2641
No related branches found
No related tags found
No related merge requests found
Showing
with 1692 additions and 0 deletions
# -*- Mode:rpm-spec -*-
# MCU.spec.in
#
##############################################################################
#
# Preamble
#
##############################################################################
Summary: The MCU contains all controller for the MainCU.
%define release @RPM_RELEASE@
%define version @VERSION@
%define pkgname @PACKAGE@
%define pkgdir %{pkgname}-%{version}-%{release}
%define prefix /opt/lofar
%define configure_args @RPM_CONFIGURE_ARGS@
##define build_kernel_version @BUILD_KERNEL_VERSION@
Name: %{pkgname}
Version: %{version}
Release: %{release}
Copyright: LGPL
Group: Application/System
Source: %{pkgname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{pkgdir}-root
URL: http://www.astron.nl
Prefix: %{prefix}
BuildArchitectures: i386 # Target platforms, i.e., i586
Requires: Common = 2.3
Requires: APS = 2.0
Requires: OTDB = 1.0
Requires: GCFTM = 6.0
Requires: GCFCommon = 6.0
Requires: GCFPAL = 6.0
Requires: APLCommon = 3.1
Packager: %{packager}
Distribution: The LOFAR project
Vendor: ASTRON
AutoReqProv: no
%description
The MCU contains all controller for the MainCU:
MacScheduler that scans the SAS database for new observations.
ObservationCtrl that is the maincontroller for each observation.
BeamDirection that makes sure that all station point in the same direction.
##############################################################################
#
# prep
#
##############################################################################
%prep
echo $prefix
# create the build directory, untar the source
%setup
##############################################################################
#
# build
#
##############################################################################
%build
./configure %{configure_args} --prefix=%{prefix} && make
##############################################################################
#
# install
#
##############################################################################
%install
# To make things work with BUILDROOT
if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
then
echo
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ @
echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @
echo @ @
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo
else
echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
rm -rf "$RPM_BUILD_ROOT"
fi
mkdir -p $RPM_BUILD_ROOT%{prefix}
make DESTDIR="$RPM_BUILD_ROOT" install
#uninstall
##############################################################################
#
# verify
#
##############################################################################
#verify
##############################################################################
#
# clean
#
##############################################################################
%clean
# Call me paranoid, but I do not want to be responsible for nuking
# someone's harddrive!
if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ]
then
echo
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ @
echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @
echo @ @
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo
else
echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT"
rm -rf "$RPM_BUILD_ROOT"
fi
##############################################################################
#
# files
#
##############################################################################
# empty 'files' means all distributed files
%files
%defattr(-, root, root)
%{prefix}
# Your application file list goes here
# %{prefix}/lib/lib*.so*
# Documentation
# doc COPYING ChangeLog README AUTHORS NEWS
# doc doc/*
# link the module to the correct path
%post
# before uninstall
%preun
# after uninstall
%postun
##############################################################################
#
# package devel
#
##############################################################################
#package devel
#Summary: Development files for %{pkgname}
#Group: Applications/System
#description devel
#Development files for %{pkgname}.
#files devel
# Your development files go here
# Programmers documentation goes here
#doc doc
# end of file
SUBDIRS=src
EXTRA_DIST = \
Makefile.common \
MainCU.spec \
autoconf_share/compiletool
include $(top_srcdir)/Makefile.common
#!/bin/sh
../../../autoconf_share/bootstrap ../../../autoconf_share
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT
dnl AC_CONFIG_AUX_DIR(config)
dnl AM_CONFIG_HEADER(config/config.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(MainCU, 1.0, no-define)
dnl
dnl Initialize for LOFAR (may set compilers)
dnl
lofar_INIT
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AC_PROG_YACC
AM_PROG_LEX
dnl Checks for libraries.
dnl dnl Replace `main' with a function in -lfl:
dnl AC_CHECK_LIB(fl, main)
dnl dnl Replace `main' with a function in -lcosev_r:
dnl AC_CHECK_LIB(cosev_r, main)
dnl dnl Replace `main' with a function in -lcosnm_r:
dnl AC_CHECK_LIB(cosnm_r, main)
dnl dnl Replace `main' with a function in -lorb_r:
dnl AC_CHECK_LIB(orb_r, main)
dnl dnl Replace `main' with a function in -lpthread:
dnl AC_CHECK_LIB(pthread, main)
dnl dnl Replace `main' with a function in -lvport_r:
dnl AC_CHECK_LIB(vport_r, main)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_FUNC_VPRINTF
dnl
dnl Check for LOFAR specific things
dnl
lofar_GENERAL
lofar_COMPILETOOLS
lofar_PVSS(1)
lofar_INTERNAL(LCS/Common, common, LCS-Common-2_3, 1, Common/LofarTypes.h,,)
lofar_INTERNAL(LCS/ACC/APS, aps, LCS-ACC-2_0, 1, APS/ParameterSet.h,,)
lofar_INTERNAL(SAS/OTDB, otdb, HEAD, 1, OTDB/OTDBconnection.h,,)
lofar_INTERNAL(MAC/GCF/GCFCommon, gcfcommon, MAC-GCF-6_0, 1, GCF/GCF_Defines.h,,)
lofar_INTERNAL(MAC/GCF/TM, gcftm, MAC-GCF-6_0, 1, GCF/TM/GCF_Task.h,,)
lofar_INTERNAL(MAC/GCF/PAL, gcfpal, MAC-GCF-6_0, 1, GCF/PAL/GCF_PVSSInfo.h,,)
lofar_INTERNAL(MAC/APL/APLCommon, aplcommon, MAC-APL-3_1, 1, APL/APLCommon/APL_Defines.h,,)
lofar_EXTERNAL(boost,1.32,boost/date_time/date.hpp, boost_date_time-gcc)
lofar_EXTERNAL(pqxx,2.5.5,pqxx/pqxx, pqxx)
lofar_EXTERNAL(pq,,libpq-fe.h, pq, /usr/local/pgsql)
dnl
dnl Output Makefiles
dnl
AC_OUTPUT(
src/Makefile
src/MACScheduler/Makefile
Makefile
MainCU.spec
)
# ascii dump of database
# DpType
TypeName
TAplMacScheduler.TAplMacScheduler 1#1
state 25#2
error 25#3
//# LogicalDeviceState.cc: one_line_description
//#
//# Copyright (C) 2002-2004
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program 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 General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
//# Always #include <lofar_config.h> first!
#include <lofar_config.h>
//# Includes
#include <Common/LofarLogger.h>
#include <LogicalDeviceState.h>
namespace LOFAR {
namespace APLCommon {
//
// LogicalDeviceState()
//
LogicalDeviceState::LogicalDeviceState()
{
itsStates.resize(LAST_STATE);
itsStates[UNKNOWN] = "Unknown";
itsStates[CONNECT] = "Connecting";
itsStates[CONNECTED] = "Connected";
itsStates[SCHEDULE] = "Scheduling";
itsStates[SCHEDULED] = "Scheduled";
itsStates[CANCEL_SCHEDULE] = "Canceling Schedule";
itsStates[SCHEDULE_CANCELLED] = "Schedule Cancelled";
itsStates[CLAIM] = "Claiming";
itsStates[CLAIMED] = "Claimed";
itsStates[PREPARE] = "Preparing";
itsStates[PREPARED] = "Prepared";
itsStates[RESUME] = "Resuming";
itsStates[RESUMED] = "Resumed";
itsStates[SUSPEND] = "Suspending";
itsStates[SUSPENDED] = "Suspended";
itsStates[RELEASE] = "Releasing";
itsStates[RELEASED] = "Released";
itsStates[FINISH] = "Finishing";
itsStates[FINISHED] = "Finished";
}
//
// ~LogicalDeviceState()
//
LogicalDeviceState::~LogicalDeviceState()
{
}
string LogicalDeviceState::name(uint16 aStateNr)
{
return (((aStateNr >= UNKNOWN) && (aStateNr < LAST_STATE)) ?
itsStates[aStateNr] : "");
}
uint16 LogicalDeviceState::value(const string& aStateName)
{
uint16 i = UNKNOWN;
while (i < LAST_STATE) {
if (itsStates[i] == aStateName) {
return (i);
}
i++;
}
ASSERTSTR(false, aStateName << " is not a valid LogicalDeviceState");
}
} // namespace APL
} // namespace LOFAR
//# LogicalDeviceState.h: one_line_description
//#
//# Copyright (C) 2002-2004
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program 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 General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
#ifndef APL_LOGICALDEVICESTATE_H
#define APL_LOGICALDEVICESTATE_H
// \file LogicalDeviceState.h
// one_line_description
//# Never #include <config.h> or #include <lofar_config.h> in a header file!
//# Includes
#include <Common/lofar_map.h>
// Avoid 'using namespace' in headerfiles
namespace LOFAR {
namespace APLCommon {
// \addtogroup package
// @{
// class_description
// ...
class LogicalDeviceState
{
public:
LogicalDeviceState();
~LogicalDeviceState();
// define enumeration for all states of an LogicalDevice.
typedef enum {
UNKNOWN = 0,
CONNECT,
CONNECTED,
SCHEDULE,
SCHEDULED,
CANCEL_SCHEDULE,
SCHEDULE_CANCELLED,
CLAIM,
CLAIMED,
PREPARE,
PREPARED,
RESUME,
RESUMED,
SUSPEND,
SUSPENDED,
RELEASE,
RELEASED,
FINISH,
FINISHED,
LAST_STATE
} LDstateNr;
// conversion routines
string name(uint16 aStateNr);
uint16 value(const string& aStateName);
// ... example
ostream& print (ostream& os) const
{ return (os); }
private:
// Copying is not allowed
LogicalDeviceState(const LogicalDeviceState& that);
LogicalDeviceState& operator=(const LogicalDeviceState& that);
//# --- Datamembers ---
vector<string> itsStates;
};
//# --- Inline functions ---
// ... example
//#
//# operator<<
//#
inline ostream& operator<< (ostream& os, const LogicalDeviceState& aLogicalDeviceState)
{
return (aLogicalDeviceState.print(os));
}
// @}
} // namespace APLCommon
} // namespace LOFAR
#endif
This diff is collapsed.
mac.ns.MACScheduler.SAS_server.type=TCP
mac.ns.MACScheduler.SAS_server.host=lofar27
mac.ns.MACScheduler.SAS_server.port=27000
mac.ns.MACScheduler.VIparent_server.type=TCP
mac.ns.MACScheduler.VIparent_server.host=lofar27
mac.ns.MACScheduler.VIparent_server.port=27100
mac.ns.CCU1_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU1_VIC_VIStartDaemon.server.host=lofar27
mac.ns.CCU1_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU1_VIC_VIStartDaemon.remoteservice=CCU1_VIC_VIStartDaemon:server
mac.ns.CCU2_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU2_VIC_VIStartDaemon.server.host=ccu2
mac.ns.CCU2_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU2_VIC_VIStartDaemon.remoteservice=CCU2_VIC_VIStartDaemon:server
mac.ns.CCU3_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU3_VIC_VIStartDaemon.server.host=ccu3
mac.ns.CCU3_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU3_VIC_VIStartDaemon.remoteservice=CCU3_VIC_VIStartDaemon:server
mac.ns.CCU4_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU4_VIC_VIStartDaemon.server.host=ccu4
mac.ns.CCU4_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU4_VIC_VIStartDaemon.remoteservice=CCU4_VIC_VIStartDaemon:server
mac.ns.CCU5_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU5_VIC_VIStartDaemon.server.host=ccu5
mac.ns.CCU5_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU5_VIC_VIStartDaemon.remoteservice=CCU5_VIC_VIStartDaemon:server
mac.ns.CCU6_VIC_VIStartDaemon.server.type=TCP
mac.ns.CCU6_VIC_VIStartDaemon.server.host=ccu6
mac.ns.CCU6_VIC_VIStartDaemon.server.port=27010
mac.top.MACScheduler.CCU6_VIC_VIStartDaemon.remoteservice=CCU6_VIC_VIStartDaemon:server
# new setup
OTDBusername = paulus
OTDBdatabasename = boskabouter
OTDBpassword = overeem
OTDBpollInterval = 5s
QueuePeriod = 15m
ClaimPeriod = 2m
#
# should be obsolete
#
shareLocation=/opt/lofar/MAC/parametersets/
#
# Obsolete
#
#mac.apl.ams.CCU2.startDaemonHost=earth
#mac.apl.ams.CCU2.startDaemonPort=server
#mac.apl.ams.CCU2.startDaemonTask=CCU2_VIC_VIStartDaemon
//# MACScheduler.h: Interface between MAC and SAS.
//#
//# Copyright (C) 2002-2004
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program 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 General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
#ifndef MACScheduler_H
#define MACScheduler_H
//# Includes
#include <boost/shared_ptr.hpp>
//# GCF Includes
#include <GCF/PAL/GCF_MyPropertySet.h>
#include <GCF/TM/GCF_Port.h>
#include <GCF/TM/GCF_TCPPort.h>
#include <GCF/TM/GCF_Task.h>
#include <GCF/TM/GCF_Event.h>
//# local includes
#include "APL/APLCommon/PropertySetAnswerHandlerInterface.h"
#include "APL/APLCommon/PropertySetAnswer.h"
#include "APL/APLCommon/APLCommonExceptions.h"
#include "APL/APLCommon/LogicalDevice_Protocol.ph"
#include "APL/APLCommon/StartDaemon_Protocol.ph"
//# Common Includes
#include <Common/lofar_string.h>
#include <Common/lofar_vector.h>
#include <Common/LofarLogger.h>
//# ACC Includes
#include <OTDB/OTDBconnection.h>
#include <OTDB/TreeMaintenance.h>
#include <OTDB/OTDBnode.h>
#include <APS/ParameterSet.h>
// forward declaration
namespace LOFAR {
namespace MCU {
using GCF::TM::GCFTCPPort;
using GCF::TM::GCFEvent;
using GCF::TM::GCFPortInterface;
using GCF::TM::GCFTask;
class MACScheduler : public GCFTask,
APLCommon::PropertySetAnswerHandlerInterface
{
public:
MACScheduler();
~MACScheduler();
// PropertySetAnswerHandlerInterface method
virtual void handlePropertySetAnswer(GCFEvent& answer);
// During the initial state all connections with the other programs are made.
GCFEvent::TResult initial_state (GCFEvent& e,
GCFPortInterface& p);
// In this state the last-registered state is compared with the current
// database-state and an appropriate recovery is made for each observation.
GCFEvent::TResult recover_state (GCFEvent& e,
GCFPortInterface& p);
// Normal control mode. Watching the OTDB and controlling the observations.
GCFEvent::TResult active_state (GCFEvent& e,
GCFPortInterface& p);
private:
// avoid copying
MACScheduler(const MACScheduler&);
MACScheduler& operator=(const MACScheduler&);
void _connectedHandler(GCFPortInterface& port);
void _disconnectedHandler(GCFPortInterface& port);
void _doOTDBcheck();
boost::shared_ptr<ACC::APS::ParameterSet>
readObservationParameters (OTDB::treeIDType ObsTreeID);
typedef boost::shared_ptr<GCF::PAL::GCFMyPropertySet> GCFMyPropertySetPtr;
APLCommon::PropertySetAnswer itsPropertySetAnswer;
GCFMyPropertySetPtr itsPropertySet;
#if 0
typedef GCFTCPPort TRemotePort;
typedef boost::shared_ptr<GCFTCPPort> TTCPPortPtr;
typedef boost::shared_ptr<TRemotePort> TRemotePortPtr;
typedef vector<TTCPPortPtr> TTCPPortVector;
typedef vector<TRemotePortPtr> TRemotePortVector;
typedef map<string,TRemotePortPtr> TStringRemotePortMap;
typedef map<string,TTCPPortPtr> TStringTCPportMap;
bool _isServerPort (const GCFPortInterface& server,
const GCFPortInterface& port) const;
bool _isVISDclientPort (const GCFPortInterface& port,
string& visd) const;
bool _isVIclientPort (const GCFPortInterface& port) const;
string _getVInameFromPort (const GCFPortInterface& port) const;
string _getShareLocation () const;
void createChildsSections(OTDB::TreeMaintenance& tm,
int32 treeID,
OTDB::nodeIDType topItem,
const string& nodeName,
boost::shared_ptr<ACC::APS::ParameterSet> ps);
void _schedule (const string& VIrootID,
GCFPortInterface* port=0);
void _updateSchedule (const string& VIrootID,
GCFPortInterface* port=0);
void _cancelSchedule (const string& VIrootID,
GCFPortInterface* port=0);
TStringRemotePortMap m_VISDclientPorts; // connected VI StartD clients
string m_VIparentPortName;
TRemotePort m_VIparentPort; // parent for VI's
// the vector and map both contain the child ports. The vector is used
// to cache the port at the moment of the accept. However, at that moment,
// the parent does not yet know the ID of that child. The child sends its
// ID in the CONNECT event and when that message is received, the port and ID
// are stored in the TPortMap. The map is used in all communication with the
// childs.
TRemotePortVector m_VIclientPorts; // created VI's
TStringRemotePortMap m_connectedVIclientPorts; // maps node ID's to ports
#endif
// Administration of the ObservationControllers
typedef struct {
OTDB::treeIDType treeID; // tree in the OTDB
GCFTCPPort* port; // TCP connection with controller
uint16 state; // state the controller has
} ObsCntlr_t;
// Map with all active ObservationControllers.
map<GCFTCPPort*, ObsCntlr_t> itsObsCntlrMap;
vector<GCFTCPPort*> itsObsCntlrPorts;
// Ports for StartDaemon and ObservationControllers.
GCFTCPPort* itsSDclientPort; // connection to StartDaemon
GCFTCPPort* itsLDserverPort; // listener for ObsControllers
// Second timer used for internal timing.
uint32 itsSecondTimer; // 1 second hardbeat
uint32 itsSDretryTimer; // for reconnecting to SD
// Scheduling settings
uint32 itsQueuePeriod; // period between qeueuing and start
uint32 itsClaimPeriod; // period between claiming and start
// OTDB related variables.
OTDB::OTDBconnection* itsOTDBconnection; // connection to the database
uint32 itsOTDBpollInterval; // itv between OTDB polls
int32 itsNextOTDBpolltime; // when next OTDB poll is scheduled
};
};//MCU
};//LOFAR
#endif
# add your custom loggers and appenders here
#
log4cplus.rootLogger=INFO, STDOUT
log4cplus.logger.TRC=PUTJE
log4cplus.additivity.TRC=FALSE
log4cplus.logger.MAC=DEBUG, STDOUT, FILE
log4cplus.additivity.MAC=FALSE
log4cplus.logger.TRC.MAC=TRACE, FILE
log4cplus.additivity.TRC.MAC=FALSE
log4cplus.appender.PUTJE=log4cplus::NullAppender
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S} %-5p %c{9} - %m [%.25l]%n
log4cplus.appender.STDOUT.logToStdErr=true
#log4cplus.appender.STDOUT.Threshold=WARN
#log4cplus.appender.STDOUT.filters.1=log4cplus::spi::LogLevelRangeFilter
#log4cplus.appender.STDOUT.filters.1.LogLevelMin=INFO
#log4cplus.appender.STDOUT.filters.1.LogLevelMax=FATAL
#log4cplus.appender.STDOUT.filters.1.AcceptOnMatch=true
#log4cplus.appender.STDOUT.filters.2=log4cplus::spi::DenyAllFilter
log4cplus.appender.FILE=log4cplus::RollingFileAppender
log4cplus.appender.FILE.File=../log/MACScheduler.log
log4cplus.appender.FILE.MaxFileSize=5MB
log4cplus.appender.FILE.MaxBackupIndex=5
log4cplus.appender.FILE.layout=log4cplus::PatternLayout
log4cplus.appender.FILE.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S} %-5p %c{3} - %m [%.25l]%n
log4cplus.appender.XMLFILE=log4cplus::RollingFileAppender
log4cplus.appender.XMLFILE.File=../log/MACSchedulerlog.xml
log4cplus.appender.XMLFILE.MaxFileSize=5MB
log4cplus.appender.XMLFILE.MaxBackupIndex=5
log4cplus.appender.XMLFILE.layout=log4cplus::XMLLayout
log4cplus.appender.CHAINSAW=log4cplus::XMLSocketAppender
log4cplus.appender.CHAINSAW.host=localhost
log4cplus.appender.CHAINSAW.port=4448
log4cplus.appender.CHAINSAW.layout=log4cplus::XMLLayout
//# MACScheduler_Defines.h: preprocessor definitions of various constants
//#
//# Copyright (C) 2002-2003
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program 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 General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
#ifndef MACScheduler_DEFINES_H
#define MACScheduler_DEFINES_H
namespace LOFAR {
namespace MCU {
#define MS_TASKNAME "MACScheduler"
#define MS_PROPSET_NAME "MACScheduler"
#define MS_PROPSET_TYPE "TAplMacScheduler"
#define PVSSNAME_MS_QUEUEPERIOD "QueuePeriod"
#define PVSSNAME_MS_CLAIMPERIOD "ClaimPeriod"
// next lines should be defined somewhere in Common.
#define PVSSNAME_FSM_STATE "state"
#define PVSSNAME_FSM_ERROR "error"
#define SN_STARTDAEMON "StartDaemon"
#define SN_STARTDAEMON_VERSION "V1"
}; // MCU
}; // LOFAR
#endif
//# VirtualInstrumentStartDaemonMain.cc: Main entry for the VirtualInstrument start daemon
//#
//# Copyright (C) 2002-2005
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program 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 General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
#include <lofar_config.h>
#include <Common/LofarLogger.h>
#include "MACScheduler.h"
int main(int argc, char* argv[])
{
LOFAR::GCF::TM::GCFTask::init(argc, argv);
LOFAR::MCU::MACScheduler ms;
ms.start(); // make initial transition
LOFAR::GCF::TM::GCFTask::run();
return 0;
}
bin_PROGRAMS = MACScheduler
MACScheduler_CPPFLAGS = -DBOOST_DISABLE_THREADS \
-Wno-deprecated \
-fmessage-length=0 \
-fdiagnostics-show-location=once
MACScheduler_SOURCES = MACScheduler.cc \
MACSchedulerMain.cc \
LogicalDeviceState.cc
MACScheduler_LDADD = -lpqxx $(LOFAR_DEPEND)
MACScheduler_DEPENDENCIES = $(LOFAR_DEPEND)
NOINSTHDRS = MACScheduler.h \
MACSchedulerDefines.h
INSTHDRS = LogicalDeviceState.h
pkginclude_HEADERS = $(NOINSTHDRS) $(INSTHDRS)
DOCHDRS = $(pkginclude_HEADERS) $(BUILT_SOURCES)
EXTRA_DIST = $(configfiles_DATA) $(sysconf_DATA)
#in case of make install these files will be copied to the bindir beside the test apps
configfilesdir=$(bindir)
configfiles_DATA = customPrepPVSSDB.ctl
sysconf_DATA = MACScheduler.conf \
MACScheduler.log_prop
%.log_prop: %.log_prop.in
cp $< $@
%.conf: %.conf.in
cp $< $@
%.ctl: %.ctl.in
cp $< $@
clean-local:
rm -f *.ph
include $(top_srcdir)/Makefile.common
// this script must reside in the <PVSS project>/scripts directory
main()
{
// create an enabled flag for CCU_PIC
dpCreate("PIC__enabled", "GCFPaPsEnabled");
dpSet("PIC__enabled.","autoloaded|TCcuPic");
dpCreate("PIC_Stations__enabled", "GCFPaPsEnabled");
dpSet("PIC_Stations__enabled.","autoloaded|TCcuPic");
dpCreate("PIC_CEP__enabled", "GCFPaPsEnabled");
dpSet("PIC_CEP__enabled.","autoloaded|TCcuCep");
dpCreate("GSO__enabled", "GCFPaPsEnabled");
dpSet("GSO__enabled.","autoloaded|TCcuPic");
dpCreate("VIC__enabled", "GCFPaPsEnabled");
dpSet("VIC__enabled.","autoloaded|TCcuPic");
dpDelete("GSO_MACScheduler");
}
SUBDIRS = MACScheduler
include $(top_srcdir)/Makefile.common
// this script must reside in the <PVSS project>/scripts directory
main()
{
// create an enabled flag for CCU_PIC
dpCreate("PIC__enabled", "GCFPaPsEnabled");
dpSet("PIC__enabled.","autoloaded|TCcuPic");
dpCreate("PIC_Stations__enabled", "GCFPaPsEnabled");
dpSet("PIC_Stations__enabled.","autoloaded|TCcuPic");
dpCreate("PIC_CEP__enabled", "GCFPaPsEnabled");
dpSet("PIC_CEP__enabled.","autoloaded|TCcuCep");
dpCreate("GSO__enabled", "GCFPaPsEnabled");
dpSet("GSO__enabled.","autoloaded|TCcuPic");
dpCreate("VIC__enabled", "GCFPaPsEnabled");
dpSet("VIC__enabled.","autoloaded|TCcuPic");
dpDelete("GSO_MACScheduler");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment