Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITASimulationScheduler
Commits
72fed278
Commit
72fed278
authored
Jul 09, 2020
by
Pascal Palenda
Browse files
Remove broken apps
parent
8d52715e
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
72fed278
...
...
@@ -137,11 +137,7 @@ if( ITA_SIMULATION_SCHEDULER_APPS )
if
(
ITA_SIMULATION_SCHEDULER_RAVEN_MODULE
)
add_subdirectory
(
"apps/raven/ravenegg"
)
add_subdirectory
(
"apps/raven/ravennest"
)
if
(
VMPI_FOUND
)
add_subdirectory
(
"apps/raven/unkindness"
)
endif
(
VMPI_FOUND
)
add_subdirectory
(
"apps/raven/ravenegg"
)
endif
(
)
...
...
apps/raven/ravennest/CMakeLists.txt
deleted
100644 → 0
View file @
8d52715e
cmake_minimum_required
(
VERSION 2.8
)
project
(
ravennest
)
list
(
APPEND CMAKE_MODULE_PATH
"$ENV{VISTA_CMAKE_COMMON}"
)
include
(
VistaCommon
)
vista_use_package
(
ITABase REQUIRED FIND_DEPENDENCIES
)
vista_use_package
(
ITASimulationScheduler REQUIRED FIND_DEPENDENCIES
)
if
(
NOT DEFINED ITA_RAVENNEST_INSTALL_WITH_DLLS
)
set
(
ITA_RAVENNEST_INSTALL_WITH_DLLS ON CACHE BOOL
"Install ravennest with depending DLLs (use this switch with care)"
)
endif
(
NOT DEFINED ITA_RAVENNEST_INSTALL_WITH_DLLS
)
if
(
NOT DEFINED ITA_RAVEN_DATA_PATH
)
set
(
ITA_RAVEN_DATA_PATH
""
CACHE PATH
"RAVEN data base path (where to find models, HRTFs, etc. ...)"
)
endif
(
NOT DEFINED ITA_RAVEN_DATA_PATH
)
set
(
ProjectSources
"getopt.c"
"getopt.h"
"ravennest.cpp"
)
add_executable
(
ravennest
${
ProjectSources
}
)
target_link_libraries
(
ravennest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
add_definitions
(
"-DRAVENNEST_VERSION_MAJOR=1"
)
add_definitions
(
"-DRAVENNEST_VERSION_MINOR=0"
)
if
(
EXISTS
"
${
ITA_RAVEN_DATA_PATH
}
"
)
vista_set_target_msvc_arguments
(
ravennest
"-rv -d
${
ITA_RAVEN_DATA_PATH
}
"
)
else
(
)
vista_set_target_msvc_arguments
(
ravennest
"-h"
)
endif
(
)
vista_configure_app
(
ravennest
)
vista_install
(
ravennest
)
vista_create_default_info_file
(
ravennest
)
set_property
(
TARGET ravennest PROPERTY FOLDER
"ITASimulationScheduler/Apps/Raven"
)
if
(
ITA_RAVENNEST_INSTALL_WITH_DLLS OR ITA_RAVEN_INSTALL_WITH_DLLS
)
vista_install_all_dlls
(
bin
)
endif
()
if
(
WIN32
)
install
(
FILES
"run_ravennest_realtime.bat"
DESTINATION
"."
)
else
(
)
install
(
FILES
"run_ravennest_realtime.sh"
DESTINATION
"."
)
endif
(
)
apps/raven/ravennest/getopt.c
deleted
100644 → 0
View file @
8d52715e
This diff is collapsed.
Click to expand it.
apps/raven/ravennest/getopt.h
deleted
100644 → 0
View file @
8d52715e
/* getopt.h */
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software
Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute
it and/or modify it under the terms of the GNU Lesser
General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or
(at your option) any later version.
The GNU C 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General
Public License along with the GNU C Library; if not, write
to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA. */
#ifndef _GETOPT_H
#ifndef __need_getopt
# define _GETOPT_H 1
#endif
/* If __GNU_LIBRARY__ is not already defined, either we are being used
standalone, or this is the first header included in the source file.
If we are being used with glibc, we need to include <features.h>, but
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
not defined, include <ctype.h>, which will pull in <features.h> for us
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
doesn't flood the namespace with stuff the way some other headers do.) */
#if !defined __GNU_LIBRARY__
# include <ctype.h>
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern
char
*
optarg
;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern
int
optind
;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
extern
int
opterr
;
/* Set to an option character which was unrecognized. */
extern
int
optopt
;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of `struct option' terminated by an element containing a name which is
zero.
The field `has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an `int' to
a compiled-in constant, such as set a value from `optarg', set the
option's `flag' field to zero and its `val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
struct
option
{
# if (defined __STDC__ && __STDC__) || defined __cplusplus
const
char
*
name
;
# else
char
*
name
;
# endif
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int
has_arg
;
int
*
flag
;
int
val
;
};
/* Names for the values of the `has_arg' field of `struct option'. */
# define no_argument 0
# define required_argument 1
# define optional_argument 2
#endif
/* need getopt */
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, `optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in `optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU `getopt'.
The argument `--' causes premature termination of argument
scanning, explicitly telling `getopt' that there are no more
options.
If OPTS begins with `--', then non-option arguments are treated as
arguments to the option '\0'. This behavior is specific to the GNU
`getopt'. */
#if (defined __STDC__ && __STDC__) || defined __cplusplus
# ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern
int
getopt
(
int
___argc
,
char
*
const
*
___argv
,
const
char
*
__shortopts
);
# else
/* not __GNU_LIBRARY__ */
extern
int
getopt
();
# endif
/* __GNU_LIBRARY__ */
# ifndef __need_getopt
extern
int
getopt_long
(
int
___argc
,
char
*
const
*
___argv
,
const
char
*
__shortopts
,
const
struct
option
*
__longopts
,
int
*
__longind
);
extern
int
getopt_long_only
(
int
___argc
,
char
*
const
*
___argv
,
const
char
*
__shortopts
,
const
struct
option
*
__longopts
,
int
*
__longind
);
/* Internal only. Users should not call this directly. */
extern
int
_getopt_internal
(
int
___argc
,
char
*
const
*
___argv
,
const
char
*
__shortopts
,
const
struct
option
*
__longopts
,
int
*
__longind
,
int
__long_only
);
# endif
#else
/* not __STDC__ */
extern
int
getopt
();
# ifndef __need_getopt
extern
int
getopt_long
();
extern
int
getopt_long_only
();
extern
int
_getopt_internal
();
# endif
#endif
/* __STDC__ */
#ifdef __cplusplus
}
#endif
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
#endif
/* getopt.h */
apps/raven/ravennest/ravennest.cpp
deleted
100644 → 0
View file @
8d52715e
/*
* ravennest - A birthplace for RAVENs
*
* (c) Copyright Institut fr Technische Akustik (ITA)
* RWTH Aachen (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* Datei: main.cpp
*
* Zweck: Serverapplikation fr serielle Simulationsanwendungen
* und echtzeitfhige Auralisierungsanwendungen mit Raumakustik
*
* Autor(en): Jonas Stienen (jst@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*/
// getopt (simple command option parser)
#ifndef __GNU_LIBRARY__
#define __GNU_LIBRARY__
#endif
#include "getopt.h"
// RavenNet includes
#include <ITASimulationScheduler/Raven/RavenNetServer.h>
// Raven includes
#include <ITASimulationScheduler/Raven/Simulator.h>
#include <ITASimulationScheduler/LocalScheduler.h>
#include <ITASimulationScheduler/Utils.h>
// ITA includes
#include <ITAConfigUtils.h>
#include <ITAException.h>
#include <ITAFileSystemUtils.h>
// Vista includes
#include <VistaBase/VistaTimeUtils.h>
// STL includes
#include <iostream>
#include <string>
// Globals
const
std
::
string
g_sServerName
=
"0.0.0.0"
;
// all interfaces
const
unsigned
int
g_uiPort
=
12480
;
struct
Config
{
std
::
string
sRavenNestConfigPath
;
std
::
string
sRavenDataBasePath
;
std
::
vector
<
int
>
viSimThreadDuties
;
bool
bRealtimeFlag
;
bool
bVerbose
;
bool
bQuiet
;
}
oConfig
;
void
syntax_error
()
{
std
::
cerr
<<
"Syntax error"
<<
std
::
endl
;
std
::
cout
<<
"Usage:
\t
ravennest -d DATABASEPATH [-rv]"
<<
std
::
endl
;
std
::
cout
<<
"
\t
ravennest -c CONFIG_FILE"
<<
std
::
endl
;
std
::
cout
<<
"Help:
\t
ravennest -h"
<<
std
::
endl
;
}
void
print_version
()
{
std
::
cout
<<
"Version: "
<<
RAVENNEST_VERSION_MAJOR
<<
"."
<<
RAVENNEST_VERSION_MINOR
<<
std
::
endl
;
}
void
print_help
()
{
std
::
cout
<<
"ravennest - A birthplace for RAVENs"
<<
std
::
endl
;
std
::
cout
<<
"Author: Jonas Stienen (jst@akustik.rwth.aachen.de)"
<<
std
::
endl
;
std
::
cout
<<
"Contributors: Frank Wefers, Soenke Pelzer (ITA) and Dominik Rausch (ITC)"
<<
std
::
endl
;
print_version
();
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"This application provides services for offline or realtime simulation of "
<<
"room acoustic impulse responses."
<<
std
::
endl
<<
"It sets up a server that can receive, compute and return tasks that comply with "
<<
"the RAVEN interfaces 'ISimulationInterface' and 'IRavenSimulationScheduler'."
<<
std
::
endl
<<
"It is _highly_ recommended to use the 'RavenNet' client API for the connection."
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"Example for a ravennest configuration file (overrides command line options):"
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"[General]"
<<
std
::
endl
;
std
::
cout
<<
"RavenDataBasePath = ../../../VAData"
<<
std
::
endl
;
std
::
cout
<<
"Verbose = true"
<<
std
::
endl
;
std
::
cout
<<
"Quiet = false"
<<
std
::
endl
;
std
::
cout
<<
"Realtime = true"
<<
std
::
endl
;
std
::
cout
<<
"[SimThreads]"
<<
std
::
endl
;
std
::
cout
<<
"Duties = DS,IS,RT"
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
}
int
main
(
int
argc
,
char
*
argv
[]
)
{
if
(
argc
==
1
)
{
syntax_error
();
return
255
;
}
oConfig
.
bRealtimeFlag
=
false
;
oConfig
.
bVerbose
=
false
;
oConfig
.
bQuiet
=
false
;
int
c
;
while
(
(
c
=
getopt
(
argc
,
argv
,
"bc:d:hrv"
)
)
!=
-
1
)
{
switch
(
c
)
{
case
'b'
:
oConfig
.
bQuiet
=
true
;
break
;
case
'c'
:
oConfig
.
sRavenNestConfigPath
=
optarg
;
break
;
case
'd'
:
oConfig
.
sRavenDataBasePath
=
optarg
;
break
;
case
'h'
:
print_help
();
return
0
;
case
'r'
:
oConfig
.
bRealtimeFlag
=
true
;
break
;
case
'v'
:
oConfig
.
bVerbose
=
true
;
break
;
default:
syntax_error
();
return
255
;
}
}
int
iArgs
=
argc
-
optind
-
1
;
// (Re)set configuration by file settings
if
(
!
oConfig
.
sRavenNestConfigPath
.
empty
()
)
{
if
(
!
doesFileExist
(
oConfig
.
sRavenNestConfigPath
)
)
{
std
::
cerr
<<
"Given configuration file path '"
<<
oConfig
.
sRavenNestConfigPath
<<
"' not found"
<<
std
::
endl
;
return
255
;
}
else
{
try
{
INIFileUseFile
(
oConfig
.
sRavenNestConfigPath
);
INIFileUseSection
(
"General"
);
oConfig
.
sRavenDataBasePath
=
INIFileReadStringExplicit
(
"RavenDataBasePath"
);
oConfig
.
bVerbose
=
INIFileReadBoolExplicit
(
"Verbose"
);
oConfig
.
bRealtimeFlag
=
INIFileReadBoolExplicit
(
"Realtime"
);
oConfig
.
bQuiet
=
INIFileReadBoolExplicit
(
"Quiet"
);
INIFileUseSection
(
"SimThreads"
);
std
::
vector
<
std
::
string
>
viSimThreadDuties
=
INIFileReadStringListExplicit
(
"Duties"
);
oConfig
.
viSimThreadDuties
.
clear
();
for
(
int
i
=
0
;
i
<
(
int
)
viSimThreadDuties
.
size
();
i
++
)
{
std
::
string
sSimTypeShort
=
viSimThreadDuties
[
i
];
oConfig
.
viSimThreadDuties
.
push_back
(
ITASimulationScheduler
::
ParseSimulationType
(
sSimTypeShort
)
);
}
}
catch
(
ITAException
&
e
)
{
std
::
cerr
<<
"Could not read configuration file: "
<<
e
<<
std
::
endl
;
return
255
;
}
}
}
if
(
oConfig
.
bQuiet
)
oConfig
.
bVerbose
=
false
;
// Go
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
*
pServer
=
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
Create
();
if
(
oConfig
.
viSimThreadDuties
.
size
()
==
0
)
{
oConfig
.
viSimThreadDuties
.
push_back
(
ITASimulationScheduler
::
CSimulationTask
::
SIM_DS
);
oConfig
.
viSimThreadDuties
.
push_back
(
ITASimulationScheduler
::
CSimulationTask
::
SIM_ER_IS
);
oConfig
.
viSimThreadDuties
.
push_back
(
ITASimulationScheduler
::
CSimulationTask
::
SIM_DD_RT
);
}
if
(
oConfig
.
bRealtimeFlag
)
{
if
(
oConfig
.
bVerbose
)
std
::
cout
<<
"Creating scheduler (realtime option)"
<<
std
::
endl
;
ITASimulationScheduler
::
CLocalScheduler
::
CConfiguration
oRLSConf
;
oRLSConf
.
sRavenDataBasePath
=
oConfig
.
sRavenDataBasePath
;
oRLSConf
.
voThreads
.
resize
(
oConfig
.
viSimThreadDuties
.
size
()
);
for
(
size_t
i
=
0
;
i
<
oConfig
.
viSimThreadDuties
.
size
();
i
++
)
{
ITASimulationScheduler
::
CLocalScheduler
::
CConfiguration
::
CThreadConfiguration
&
oSimConfig
(
oRLSConf
.
voThreads
[
i
]
);
oSimConfig
.
iFieldOfDuty
=
oConfig
.
viSimThreadDuties
[
i
];
if
(
oSimConfig
.
iFieldOfDuty
==
ITASimulationScheduler
::
CSimulationTask
::
SIM_DS
)
{
oSimConfig
.
fUpdateRate
=
120.0
f
;
oSimConfig
.
iTaskProcessingMode
=
ITASimulationScheduler
::
CLocalScheduler
::
CConfiguration
::
CThreadConfiguration
::
CONTINUOUS
;
oSimConfig
.
sRavenDataBasePath
=
oConfig
.
sRavenDataBasePath
;
}
else
if
(
oSimConfig
.
iFieldOfDuty
==
ITASimulationScheduler
::
CSimulationTask
::
SIM_ER_IS
)
{
oSimConfig
.
fUpdateRate
=
60.0
f
;
oSimConfig
.
iTaskProcessingMode
=
ITASimulationScheduler
::
CLocalScheduler
::
CConfiguration
::
CThreadConfiguration
::
TIMEOUT
;
oSimConfig
.
sRavenDataBasePath
=
oConfig
.
sRavenDataBasePath
;
}
else
if
(
oSimConfig
.
iFieldOfDuty
==
ITASimulationScheduler
::
CSimulationTask
::
SIM_DD_RT
)
{
oSimConfig
.
fUpdateRate
=
1.0
f
;
oSimConfig
.
iTaskProcessingMode
=
ITASimulationScheduler
::
CLocalScheduler
::
CConfiguration
::
CThreadConfiguration
::
EVENTSYNC
;
oSimConfig
.
sRavenDataBasePath
=
oConfig
.
sRavenDataBasePath
;
}
else
{
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"Unrecognized field of duty for scheduler simulation thread"
);
}
}
ITASimulationScheduler
::
CLocalScheduler
*
pScheduler
=
new
ITASimulationScheduler
::
CLocalScheduler
(
oRLSConf
);
pServer
->
SetRavenSimulationScheduler
(
(
ITASimulationScheduler
::
ISimulationSchedulerInterface
*
)
pScheduler
);
}
else
{
if
(
oConfig
.
bVerbose
)
std
::
cout
<<
"Creating simulator (no realtime option)"
<<
std
::
endl
;
ITASimulationScheduler
::
RAVEN
::
CRavenSimulator
*
pSimulator
=
new
ITASimulationScheduler
::
RAVEN
::
CRavenSimulator
(
oConfig
.
sRavenDataBasePath
);
pServer
->
SetRavenSimulator
(
(
ITASimulationScheduler
::
ISimulationInterface
*
)
pSimulator
);
}
if
(
oConfig
.
bQuiet
==
false
)
{
std
::
cout
<<
"ravennest configuration"
<<
std
::
endl
;
std
::
cout
<<
"
\t
RavenDataBasePath: '"
<<
oConfig
.
sRavenDataBasePath
<<
"'"
<<
std
::
endl
;
if
(
oConfig
.
sRavenNestConfigPath
.
empty
()
==
false
)
std
::
cout
<<
"
\t
RavenNestConfigPath: '"
<<
oConfig
.
sRavenNestConfigPath
<<
"'"
<<
std
::
endl
;
std
::
cout
<<
"
\t
Verbose: "
<<
(
oConfig
.
bVerbose
?
"true"
:
"false"
)
<<
std
::
endl
;
std
::
cout
<<
"
\t
Realtime: "
<<
(
oConfig
.
bRealtimeFlag
?
"true"
:
"false"
)
<<
std
::
endl
;
std
::
cout
<<
"
\t
RavenSimulators: "
<<
oConfig
.
viSimThreadDuties
.
size
()
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
"Waiting for connections ..."
<<
std
::
endl
;
}
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
tPortList
liFreePorts
;
liFreePorts
.
push_back
(
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
tPortRange
(
g_uiPort
+
1
,
g_uiPort
+
19
)
);
unsigned
int
iMode
=
oConfig
.
bRealtimeFlag
==
true
?
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
SCHEDULER
:
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
SIMULATOR
;
int
iErr
=
pServer
->
Initialize
(
g_sServerName
,
(
int
)
g_uiPort
,
liFreePorts
,
iMode
);
// Start
if
(
iErr
!=
ITASimulationScheduler
::
RAVEN
::
IRavenNetServer
::
RAVEN_NO_ERROR
)
{
std
::
cerr
<<
"Could not initialize server"
<<
std
::
endl
;
}
if
(
oConfig
.
bQuiet
==
false
)
{
if
(
oConfig
.
bVerbose
)
std
::
cout
<<
"Client successfully connected ..."
<<
std
::
endl
;
}
while
(
pServer
->
IsClientConnected
()
)
VistaTimeUtils
::
Sleep
(
1000
);
pServer
->
Finalize
();
// Lscht auch den Simulator
return
0
;
}
apps/raven/unkindness/CMakeLists.txt
deleted
100644 → 0
View file @
8d52715e
cmake_minimum_required
(
VERSION 2.8
)
project
(
unkindness
)
list
(
APPEND CMAKE_MODULE_PATH
"$ENV{VISTA_CMAKE_COMMON}"
)
include
(
VistaCommon
)
vista_use_package
(
ITASimulationScheduler REQUIRED FIND_DEPENDENCIES
)
vista_use_package
(
MPI REQUIRED FIND_DEPENDENCIES
)
set
(
ProjectSources
"getopt.c"
"getopt.h"
"frontend.h"
"master.cpp"
"messages.cpp"
"messages.h"
"scheduler.cpp"
"scheduler.h"
"unkindness.cpp"
"unkindness.h"
"worker.cpp"
)
add_executable
(
unkindness
${
ProjectSources
}
)
target_link_libraries
(
unkindness
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
vista_configure_app
(
unkindness
)
vista_create_default_info_file
(
unkindness
)
vista_install
(
unkindness
)
set_property
(
TARGET unkindness PROPERTY FOLDER
"ITASimulationScheduler/Apps/Raven"
)
apps/raven/unkindness/configs/aixcave.conf
deleted
100644 → 0
View file @
8d52715e
[
GENERAL
]
RavenDataBasePath
= /
home
/
js908001
/
VAData
VerbosityLevel
=
1
WorkerVerbosityLevel
=
0
FieldOfDutyStrategy
=
only_rt
ServerInterface
=
linuxgpud1
apps/raven/unkindness/configs/example.conf
deleted
100644 → 0
View file @
8d52715e
[
GENERAL
]
RavenDataBasePath
= /
home
/
js908001
/
VAData
; (
required
)
VerbosityLevel
=
2
;
0
=
quiet
,
1
=
normal
(
default
),
2
=
verbose
(
required
)
WorkerVerbosityLevel
=
0
; (
overwrites
general
verbosity
level
,
optional
)
FieldOfDutyStrategy
=
balanced
;
balanced
(
DS
,
IS
,
RT
,
DS
, ..
default
),
massive_rt
(
DS
,
IS
,
RT
,
RT
, ..),
only_rt
(
RT
,
RT
, ..)
ServerInterface
=
10
.
0
.
1
.
27
; (
forces
to
use
a
specified
interface
adress
,
may
be
hostname
or
0
.
0
.
0
.
0
,
optional
)
apps/raven/unkindness/frontend.h
deleted
100644 → 0
View file @
8d52715e
#ifndef __FRONTEND_H__
#define __FRONTEND_H__
#include <VA/R_Raven.h>
#include <RavenNetServer.h>
#include <iostream>
class
CUnkindnessFrontend
:
IRavenSimulationSchedulerResultHandler
{
public:
CUnkindnessFrontend
(
IRavenSimulationSchedulerInterface
*
pScheduler
,
const
int
iVerbosity
,
const
std
::
string
&
sServerInterfaceName
,
const
unsigned
int
uiPoDD_RTNumber
)
:
m_iStatus
(
0
)
,
m_pScheduler
(
pScheduler
)
,
m_iVerbosity
(
iVerbosity
)
,
sServerName
(
sServerInterfaceName
)
,
uiPoDD_RT
(
uiPoDD_RTNumber
)
{
m_pServer
=
IRavenNetServer
::
Create
();
m_pServer
->
SetRavenSimulationScheduler
(
m_pScheduler
);
if
(
m_pScheduler
)
m_pScheduler
->
AttachSimulationResultHandler
(
this
);
IRavenNetServer
::
tPortList
liFreePoDD_RTs
;
liFreePoDD_RTs
.
push_back
(
IRavenNetServer
::
tPortRange
(
uiPoDD_RT
+
1
,
uiPoDD_RT
+
19
)
);
// blocking ...
int
iErr
=
m_pServer
->
Initialize
(
sServerName
,
(
int
)
uiPoDD_RT
,
liFreePoDD_RTs
,
IRavenNetServer
::
SCHEDULER
);
if
(
iErr
==
IRavenNetServer
::
RAVEN_NO_ERROR
)
m_iStatus
=
1
;
}
~
CUnkindnessFrontend
()
{