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:
parent
92a69d6d0a
commit
7c73c7d3e5
4 changed files with 91 additions and 0 deletions
|
@ -2,6 +2,7 @@ noinst_LIBRARIES = libATC.a
|
||||||
|
|
||||||
libATC_a_SOURCES = \
|
libATC_a_SOURCES = \
|
||||||
atcutils.cxx atcutils.hxx \
|
atcutils.cxx atcutils.hxx \
|
||||||
|
atis.cxx atis.hxx \
|
||||||
trafficcontrol.cxx trafficcontrol.hxx
|
trafficcontrol.cxx trafficcontrol.hxx
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
|
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
|
||||||
|
|
45
src/ATC/atis.cxx
Normal file
45
src/ATC/atis.cxx
Normal 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
39
src/ATC/atis.hxx
Normal 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_
|
|
@ -79,6 +79,7 @@
|
||||||
# include <ATCDCL/AIMgr.hxx>
|
# include <ATCDCL/AIMgr.hxx>
|
||||||
# include "ATCDCL/commlist.hxx"
|
# include "ATCDCL/commlist.hxx"
|
||||||
#else
|
#else
|
||||||
|
# include "ATC/atis.hxx"
|
||||||
# include "ATC/atcutils.hxx"
|
# include "ATC/atcutils.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1572,6 +1573,11 @@ bool fgInitSubsystems() {
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
|
SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
|
||||||
globals->set_AI_mgr(new FGAIMgr);
|
globals->set_AI_mgr(new FGAIMgr);
|
||||||
globals->get_AI_mgr()->init();
|
globals->get_AI_mgr()->init();
|
||||||
|
#else
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Initialise the ATIS Manager
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
globals->add_subsystem("atis", new FGAtisManager, SGSubsystemMgr::POST_FDM);
|
||||||
#endif
|
#endif
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Initialise the AI Model Manager
|
// Initialise the AI Model Manager
|
||||||
|
|
Loading…
Add table
Reference in a new issue