From 44ffdcd7d00a6bf31c6f0526e9021fa2910980e7 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Wed, 21 Nov 2012 19:41:51 +0100 Subject: [PATCH] hla: add io chanel configuration shortcut hla-local. --- src/Main/fg_io.cxx | 13 +++++++++++++ src/Main/options.cxx | 1 + 2 files changed, 14 insertions(+) diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index 3b2d0b93b..cd66cf0c6 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -228,6 +228,19 @@ FGIO::parse_port_config( const string& config ) else if ( protocol == "hla" ) { return new FGHLA(tokens); } + else if ( protocol == "hla-local" ) { + // This is just about to bring up some defaults + if (tokens.size() != 2) { + SG_LOG( SG_IO, SG_ALERT, "Ignoring invalid --hla-local option " + "(one argument expected: --hla-local=" ); + return NULL; + } + tokens.insert(tokens.begin(), ""); + tokens.insert(tokens.begin(), "60"); + tokens.insert(tokens.begin(), "bi"); + tokens.push_back("fg-local.xml"); + return new FGHLA(tokens); + } #endif else { return NULL; diff --git a/src/Main/options.cxx b/src/Main/options.cxx index ae38bdc75..718743144 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -1476,6 +1476,7 @@ struct OptionDesc { {"multiplay", true, OPTION_CHANNEL | OPTION_MULTI, "", false, "", 0 }, #ifdef FG_HAVE_HLA {"hla", true, OPTION_CHANNEL, "", false, "", 0 }, + {"hla-local", true, OPTION_CHANNEL, "", false, "", 0 }, #endif {"trace-read", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptTraceRead }, {"trace-write", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptTraceWrite },