1
0
Fork 0

Added some stubs in the flightgear main code to eventually add a full, FGSubsystems based ATIS system that will serve as a replacement for the ATCDCL code.

This commit is contained in:
Durk Talsma 2010-08-01 16:16:33 +02:00
parent 92a69d6d0a
commit 7c73c7d3e5
4 changed files with 91 additions and 0 deletions

View file

@ -2,6 +2,7 @@ noinst_LIBRARIES = libATC.a
libATC_a_SOURCES = \
atcutils.cxx atcutils.hxx \
atis.cxx atis.hxx \
trafficcontrol.cxx trafficcontrol.hxx
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src

45
src/ATC/atis.cxx Normal file
View file

@ -0,0 +1,45 @@
/******************************************************************************
* atis.cxx
* Written by Durk Talsma, started August 1, 2010.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <iostream>
#include "atis.hxx"
FGAtisManager::FGAtisManager() {
}
FGAtisManager::~FGAtisManager() {
}
void FGAtisManager::init() {
SGSubsystem::init();
}
void FGAtisManager::update ( double time ) {
cerr << "ATIS code is running at time: " << time << endl;
}

39
src/ATC/atis.hxx Normal file
View file

@ -0,0 +1,39 @@
/* -*- Mode: C++ -*- *****************************************************
* atic.hxx
* Written by Durk Talsma. Started August 1, 2010; based on earlier work
* by David C. Luff
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
**************************************************************************/
#ifndef _ATIS_HXX_
#define _ATIS_HXX_
#include <simgear/structure/subsystem_mgr.hxx>
class FGAtisManager : public SGSubsystem
{
private:
public:
FGAtisManager();
~FGAtisManager();
void init();
void update(double time);
};
#endif // _ATIS_HXX_

View file

@ -79,6 +79,7 @@
# include <ATCDCL/AIMgr.hxx>
# include "ATCDCL/commlist.hxx"
#else
# include "ATC/atis.hxx"
# include "ATC/atcutils.hxx"
#endif
@ -1572,6 +1573,11 @@ bool fgInitSubsystems() {
SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
globals->set_AI_mgr(new FGAIMgr);
globals->get_AI_mgr()->init();
#else
////////////////////////////////////////////////////////////////////
// Initialise the ATIS Manager
////////////////////////////////////////////////////////////////////
globals->add_subsystem("atis", new FGAtisManager, SGSubsystemMgr::POST_FDM);
#endif
////////////////////////////////////////////////////////////////////
// Initialise the AI Model Manager