Commit c6e455f7 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Merge branch 'ma2020_palenda' into APIdevelop

parents 57f73d0a b19c6364
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#include <ITASimulationScheduler/Raven/RavenNetClient.h> #include <ITASimulationScheduler/Raven/RavenNetClient.h>
#include <ITASimulationScheduler/Raven/RavenNetServer.h> #include <ITASimulationScheduler/Raven/RavenNetServer.h>
#include <ITASimulationScheduler/Raven/R_RavenLocalScheduler.h> #include <ITASimulationScheduler/LocalScheduler.h>
#include <ITASimulationScheduler/Raven/R_RavenUtils.h> #include <ITASimulationScheduler/Utils.h>
#include <ITAStringUtils.h> #include <ITAStringUtils.h>
#include <ITAStopWatch.h> #include <ITAStopWatch.h>
...@@ -19,24 +19,24 @@ void test() ...@@ -19,24 +19,24 @@ void test()
std::string sServerName = "localhost"; std::string sServerName = "localhost";
unsigned int uiPort = 12480; unsigned int uiPort = 12480;
IRavenNetServer::tPortList liFreePorts; ITASimulationScheduler::RAVEN::IRavenNetServer::tPortList liFreePorts;
liFreePorts.push_back( IRavenNetServer::tPortRange( uiPort + 1, 12499 ) ); liFreePorts.push_back( ITASimulationScheduler::RAVEN::IRavenNetServer::tPortRange( uiPort + 1, 12499 ) );
std::cout << "This is the RavenNet simulation server" << std::endl; std::cout << "This is the RavenNet simulation server" << std::endl;
std::cout << "Waiting for connections to " << sServerName << " on port " << uiPort << std::endl << std::endl; std::cout << "Waiting for connections to " << sServerName << " on port " << uiPort << std::endl << std::endl;
// Create and set up Standalone Raven Simulator // Create and set up Standalone Raven Simulator
std::string sRavenDataPath = "../../../VAData"; std::string sRavenDataPath = "../../../VAData";
CLocalScheduler::CConfiguration oConf; ITASimulationScheduler::CLocalScheduler::CConfiguration oConf;
oConf.sRavenDataBasePath = sRavenDataPath; oConf.sRavenDataBasePath = sRavenDataPath;
CLocalScheduler* pScheduler = new CLocalScheduler( oConf ); ITASimulationScheduler::CLocalScheduler* pScheduler = new ITASimulationScheduler::CLocalScheduler( oConf );
// Create server and connect Raven instance // Create server and connect Raven instance
IRavenNetServer* pServer = IRavenNetServer::Create(); ITASimulationScheduler::RAVEN::IRavenNetServer* pServer = ITASimulationScheduler::RAVEN::IRavenNetServer::Create();
pServer->SetRavenSimulationScheduler( ( ISimulationSchedulerInterface* ) pScheduler ); pServer->SetRavenSimulationScheduler( ( ITASimulationScheduler::ISimulationSchedulerInterface* ) pScheduler );
int err = pServer->Initialize( sServerName, ( int ) uiPort, liFreePorts, IRavenNetServer::SCHEDULER ); int err = pServer->Initialize( sServerName, ( int ) uiPort, liFreePorts, ITASimulationScheduler::RAVEN::IRavenNetServer::SCHEDULER );
if( err != IRavenNetServer::RAVEN_NO_ERROR ) { if( err != ITASimulationScheduler::RAVEN::IRavenNetServer::RAVEN_NO_ERROR ) {
std::cout << "Could not initialize Raven simulation server" << std::endl; std::cout << "Could not initialize Raven simulation server" << std::endl;
} }
else { else {
...@@ -49,38 +49,38 @@ void test() ...@@ -49,38 +49,38 @@ void test()
std::cout << "Raven simulation server provides (serial) simulator (SimulationInterface)" << std::endl; std::cout << "Raven simulation server provides (serial) simulator (SimulationInterface)" << std::endl;
IRavenNetClient* pClient = IRavenNetClient::Create(); ITASimulationScheduler::RAVEN::IRavenNetClient* pClient = ITASimulationScheduler::RAVEN::IRavenNetClient::Create();
pClient->Initialize( sServerName ); pClient->Initialize( sServerName );
ISimulationSchedulerInterface* pRemoteScheduler = pClient->GetRavenSimulationScheduler(); ITASimulationScheduler::ISimulationSchedulerInterface* pRemoteScheduler = pClient->GetRavenSimulationScheduler();
pRemoteScheduler->Reset(); pRemoteScheduler->Reset();
CSimulationResultDumper oResultDumper( "./Output" ); ITASimulationScheduler::CSimulationResultDumper oResultDumper( "./Output" );
pRemoteScheduler->AttachSimulationResultHandler( &oResultDumper ); pRemoteScheduler->AttachSimulationResultHandler( &oResultDumper );
CSimulationTask oTask; ITASimulationScheduler::CSimulationTask oTask;
oTask.oConfig.oGeometry.sSceneFileName = "$(RavenDataBasePath)/Models/San Juan/SJ Double-Chapel Centered.ac"; oTask.oConfig.oGeometry.sSceneFileName = "$(RavenDataBasePath)/Models/San Juan/SJ Double-Chapel Centered.ac";
oTask.oConfig.SetDefaults(); oTask.oConfig.SetDefaults();
oTask.oScene.AddReceiver( 0 ); oTask.oScene.AddReceiver( 0 );
CSourceState oState; ITASimulationScheduler::RAVEN::CSourceState oState;
oTask.oScene.AddSource( 0 ); oTask.oScene.AddSource( 0 );
oState.vPos.init( 2, 1.7f, 2 ); oState.vPos.init( 2, 1.7f, 2 );
oTask.oScene.SetSourceState( 0, oState ); oTask.oScene.SetSourceState( 0, oState );
unsigned int uiIDCounter = 0; unsigned int uiIDCounter = 0;
CSimulationTask oTask1( oTask ); ITASimulationScheduler::CSimulationTask oTask1( oTask );
oTask1.uiID = uiIDCounter++; oTask1.uiID = uiIDCounter++;
oTask1.iSimulationType = CSimulationTask::SIM_DS; oTask1.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DS;
CSimulationTask oTask2( oTask ); ITASimulationScheduler::CSimulationTask oTask2( oTask );
oTask2.uiID = uiIDCounter++; oTask2.uiID = uiIDCounter++;
oTask2.iSimulationType = CSimulationTask::SIM_ER_IS; oTask2.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
CSimulationTask oTask3( oTask ); ITASimulationScheduler::CSimulationTask oTask3( oTask );
oTask3.uiID = uiIDCounter++; oTask3.uiID = uiIDCounter++;
oTask3.iSimulationType = CSimulationTask::SIM_DD_RT; oTask3.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
ITAStopWatch sw1; ITAStopWatch sw1;
for( int i = 0; i < 10000; i++ ) for( int i = 0; i < 10000; i++ )
...@@ -92,7 +92,7 @@ void test() ...@@ -92,7 +92,7 @@ void test()
} }
std::cout << "Added 10k DS tasks in " << sw1.ToString() << std::endl; std::cout << "Added 10k DS tasks in " << sw1.ToString() << std::endl;
ISimulationSchedulerInterface::CProfiler oProfilerState; ITASimulationScheduler::ISimulationSchedulerInterface::CProfiler oProfilerState;
if( pRemoteScheduler->GetProfilerStatus( oProfilerState ) ) if( pRemoteScheduler->GetProfilerStatus( oProfilerState ) )
{ {
cout << oProfilerState.oAll.dTaskComputeAvrg << endl; cout << oProfilerState.oAll.dTaskComputeAvrg << endl;
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
#include <ITASimulationScheduler/Raven/RavenNetClient.h> #include <ITASimulationScheduler/Raven/RavenNetClient.h>
// Raven includes // Raven includes
#include <ITASimulationScheduler/Raven/R_Raven.h> #include <ITASimulationScheduler/Interfaces.h>
#include <ITASimulationScheduler/Raven/R_RavenSimulator.h> #include <ITASimulationScheduler/Raven/Simulator.h>
#include <ITASimulationScheduler/Raven/R_RavenLocalScheduler.h> #include <ITASimulationScheduler/LocalScheduler.h>
#include <ITASimulationScheduler/Raven/R_RavenUtils.h> #include <ITASimulationScheduler/Utils.h>
// ITA includes // ITA includes
#include <ITADebug.h> #include <ITADebug.h>
...@@ -29,7 +29,7 @@ static const string sRavenProjectPath = "$(RavenDataBasePath)/Models/Quader/quad ...@@ -29,7 +29,7 @@ static const string sRavenProjectPath = "$(RavenDataBasePath)/Models/Quader/quad
void normalize_0dB( ITASampleFrame* ); void normalize_0dB( ITASampleFrame* );
void testSimulator( ISimulationInterface* pRavenSimulator ) void testSimulator( ITASimulationScheduler::ISimulationInterface* pRavenSimulator )
{ {
cout << " * Loading scene geometry ... "; cout << " * Loading scene geometry ... ";
pRavenSimulator->LoadScene( sRavenProjectPath ); pRavenSimulator->LoadScene( sRavenProjectPath );
...@@ -37,19 +37,19 @@ void testSimulator( ISimulationInterface* pRavenSimulator ) ...@@ -37,19 +37,19 @@ void testSimulator( ISimulationInterface* pRavenSimulator )
int iCounter = 0; int iCounter = 0;
CReceiverState oReceiverState; ITASimulationScheduler::RAVEN::CReceiverState oReceiverState;
oReceiverState.vPos.init( 0.1f, 1.6f, 0.9f ); oReceiverState.vPos.init( 0.1f, 1.6f, 0.9f );
oReceiverState.vView.init( 0, 0, -1 ); oReceiverState.vView.init( 0, 0, -1 );
oReceiverState.vUp.init( 0, 1, 0 ); oReceiverState.vUp.init( 0, 1, 0 );
oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff"; oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff";
CSourceState oSourceState; ITASimulationScheduler::RAVEN::CSourceState oSourceState;
oSourceState.vPos.init( 1, 0.5f, -1.1f ); oSourceState.vPos.init( 1, 0.5f, -1.1f );
oSourceState.vView.init( 0, 0, 1 ); oSourceState.vView.init( 0, 0, 1 );
oSourceState.vUp.init( 0, 1, 0 ); oSourceState.vUp.init( 0, 1, 0 );
oSourceState.sDirectivityFilename = "$(RavenDataBasePath)/Directivity/Slenczka_2005_energetic_3d_octave/Bratsche.daff"; oSourceState.sDirectivityFilename = "$(RavenDataBasePath)/Directivity/Slenczka_2005_energetic_3d_octave/Bratsche.daff";
CSimulationTask oTask1; ITASimulationScheduler::CSimulationTask oTask1;
oTask1.oScene.AddReceiver( 0 ); oTask1.oScene.AddReceiver( 0 );
oTask1.oScene.SetReceiverState( 0, oReceiverState ); oTask1.oScene.SetReceiverState( 0, oReceiverState );
oTask1.oScene.AddSource( 0 ); oTask1.oScene.AddSource( 0 );
...@@ -57,18 +57,18 @@ void testSimulator( ISimulationInterface* pRavenSimulator ) ...@@ -57,18 +57,18 @@ void testSimulator( ISimulationInterface* pRavenSimulator )
oTask1.oConfig.SetDefaults(); oTask1.oConfig.SetDefaults();
oTask1.uiID = ( unsigned int ) iCounter++; oTask1.uiID = ( unsigned int ) iCounter++;
oTask1.uiReferenceID = 0; oTask1.uiReferenceID = 0;
oTask1.iSimulationType = CSimulationTask::SIM_DS; oTask1.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DS;
oTask1.oConfig.oGeometry.sSceneFileName = sRavenProjectPath; oTask1.oConfig.oGeometry.sSceneFileName = sRavenProjectPath;
CSimulationTask oTask2( oTask1 ); ITASimulationScheduler::CSimulationTask oTask2( oTask1 );
oTask2.uiID = ( unsigned int ) iCounter++; oTask2.uiID = ( unsigned int ) iCounter++;
oTask2.iSimulationType = CSimulationTask::SIM_ER_IS; oTask2.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
CSimulationTask oTask3( oTask1 ); ITASimulationScheduler::CSimulationTask oTask3( oTask1 );
oTask3.uiID = ( unsigned int ) iCounter++; oTask3.uiID = ( unsigned int ) iCounter++;
oTask3.iSimulationType = CSimulationTask::SIM_DD_RT; oTask3.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
ITAStopWatch swInit, swSimDS, swSimIS, swSimRT; ITAStopWatch swInit, swSimDS, swSimIS, swSimRT;
CSimulationResult oResult; ITASimulationScheduler::CSimulationResult oResult;
// Initial config adaption // Initial config adaption
cout << "Sending initial configuration ..." << endl; cout << "Sending initial configuration ..." << endl;
...@@ -129,11 +129,11 @@ void testSimulator( ISimulationInterface* pRavenSimulator ) ...@@ -129,11 +129,11 @@ void testSimulator( ISimulationInterface* pRavenSimulator )
return; return;
} }
void testScheduler( ISimulationSchedulerInterface* pRavenScheduler ) void testScheduler( ITASimulationScheduler::ISimulationSchedulerInterface* pRavenScheduler )
{ {
// ResultHandler angeben, um Resultate abzufangen // ResultHandler angeben, um Resultate abzufangen
CSimulationResultDumper oDumper( "./" ); ITASimulationScheduler::CSimulationResultDumper oDumper( "./" );
pRavenScheduler->AttachSimulationResultHandler( &oDumper ); pRavenScheduler->AttachSimulationResultHandler( &oDumper );
// Preload scene // Preload scene
...@@ -144,32 +144,32 @@ void testScheduler( ISimulationSchedulerInterface* pRavenScheduler ) ...@@ -144,32 +144,32 @@ void testScheduler( ISimulationSchedulerInterface* pRavenScheduler )
pRavenScheduler->LoadScene( sRavenProjectPath ); pRavenScheduler->LoadScene( sRavenProjectPath );
CReceiverState oReceiverState; ITASimulationScheduler::RAVEN::CReceiverState oReceiverState;
oReceiverState.vPos.init( 0.1f, 1.6f, 0.9f ); oReceiverState.vPos.init( 0.1f, 1.6f, 0.9f );
oReceiverState.vView.init( 0, 0, -1 ); oReceiverState.vView.init( 0, 0, -1 );
oReceiverState.vUp.init( 0, 1, 0 ); oReceiverState.vUp.init( 0, 1, 0 );
//oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff"; //oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff";
CSourceState oSourceState; ITASimulationScheduler::RAVEN::CSourceState oSourceState;
oSourceState.vPos.init( 1, 0.5f, -0.1f ); oSourceState.vPos.init( 1, 0.5f, -0.1f );
oSourceState.vView.init( 0, 0, 1 ); oSourceState.vView.init( 0, 0, 1 );
oSourceState.vUp.init( 0, 1, 0 ); oSourceState.vUp.init( 0, 1, 0 );
//oSourceState.sDirectivityFilename = "$(RavenDataBasePath)/Directivity/Slenczka_2005_energetic_3d_octave/Bratsche.daff"; //oSourceState.sDirectivityFilename = "$(RavenDataBasePath)/Directivity/Slenczka_2005_energetic_3d_octave/Bratsche.daff";
CSimulationTask oTask1; ITASimulationScheduler::CSimulationTask oTask1;
oTask1.oScene.AddReceiver( 0 ); oTask1.oScene.AddReceiver( 0 );
oTask1.oScene.SetReceiverState( 0, oReceiverState ); oTask1.oScene.SetReceiverState( 0, oReceiverState );
oTask1.oScene.AddSource( 0 ); oTask1.oScene.AddSource( 0 );
oTask1.oScene.SetSourceState( 0, oSourceState ); oTask1.oScene.SetSourceState( 0, oSourceState );
oTask1.iSimulationType = CSimulationTask::SIM_DS; oTask1.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DS;
oTask1.uiReferenceID = 0; oTask1.uiReferenceID = 0;
oTask1.oConfig.SetDefaults(); oTask1.oConfig.SetDefaults();
oTask1.oConfig.oGeometry.sSceneFileName = sRavenProjectPath; oTask1.oConfig.oGeometry.sSceneFileName = sRavenProjectPath;
CSimulationTask oTask2( oTask1 ); ITASimulationScheduler::CSimulationTask oTask2( oTask1 );
oTask2.iSimulationType = CSimulationTask::SIM_ER_IS; oTask2.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_ER_IS;
CSimulationTask oTask3( oTask1 ); ITASimulationScheduler::CSimulationTask oTask3( oTask1 );
oTask3.iSimulationType = CSimulationTask::SIM_DD_RT; oTask3.iSimulationType = ITASimulationScheduler::CSimulationTask::SIM_DD_RT;
int iNumTasksAdded = 0; int iNumTasksAdded = 0;
...@@ -233,14 +233,14 @@ int main( int argc, char* argv[] ) ...@@ -233,14 +233,14 @@ int main( int argc, char* argv[] )
string sServerAdress = string( argv[ 1 ] ); string sServerAdress = string( argv[ 1 ] );
IRavenNetClient* pClient = IRavenNetClient::Create(); ITASimulationScheduler::RAVEN::IRavenNetClient* pClient = ITASimulationScheduler::RAVEN::IRavenNetClient::Create();
int iPort = 12480; int iPort = 12480;
cout << "Attempting to connect to " << sServerAdress << " on port " << iPort << endl; cout << "Attempting to connect to " << sServerAdress << " on port " << iPort << endl;
int err; int err;
if( ( err = pClient->Initialize( sServerAdress, iPort ) ) != IRavenNetClient::RAVEN_NO_ERROR ) if( ( err = pClient->Initialize( sServerAdress, iPort ) ) != ITASimulationScheduler::RAVEN::IRavenNetClient::RAVEN_NO_ERROR )
{ {
cout << "[ERROR] " << err << endl; cout << "[ERROR] " << err << endl;
return 255; return 255;
...@@ -249,7 +249,7 @@ int main( int argc, char* argv[] ) ...@@ -249,7 +249,7 @@ int main( int argc, char* argv[] )
if( pClient->IsConnected() ) if( pClient->IsConnected() )
cout << "Successfully connected to Raven server!" << endl; cout << "Successfully connected to Raven server!" << endl;
pClient->SetExceptionHandlingMode( IRavenNetClient::EXC_SERVER_PRINT ); pClient->SetExceptionHandlingMode( ITASimulationScheduler::RAVEN::IRavenNetClient::EXC_SERVER_PRINT );
// --- Raven steuern --- // --- Raven steuern ---
...@@ -284,7 +284,7 @@ int main( int argc, char* argv[] ) ...@@ -284,7 +284,7 @@ int main( int argc, char* argv[] )
std::cout << "Server has no scheduler" << std::endl; std::cout << "Server has no scheduler" << std::endl;
} }
if( pClient->Disconnect() == IRavenNetClient::RAVEN_NO_ERROR ) if( pClient->Disconnect() == ITASimulationScheduler::RAVEN::IRavenNetClient::RAVEN_NO_ERROR )
cout << " * Successfully disconnected." << endl; cout << " * Successfully disconnected." << endl;
delete pClient; delete pClient;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#include <ITASimulationScheduler/Raven/RavenNetServer.h> #include <ITASimulationScheduler/Raven/RavenNetServer.h>
#include <ITASimulationScheduler/Raven/R_RavenSimulator.h> #include <ITASimulationScheduler/Raven/Simulator.h>
#include <ITASimulationScheduler/Raven/R_RavenLocalScheduler.h> #include <ITASimulationScheduler/LocalScheduler.h>
#include <ITAFilesystemUtils.h> #include <ITAFilesystemUtils.h>
...@@ -31,35 +31,35 @@ int main(int argc, char** argv) { ...@@ -31,35 +31,35 @@ int main(int argc, char** argv) {
string sServerName = "0.0.0.0"; // all interfaces string sServerName = "0.0.0.0"; // all interfaces
unsigned int uiPort = 12480; unsigned int uiPort = 12480;
IRavenNetServer::tPortList liFreePorts; ITASimulationScheduler::RAVEN::IRavenNetServer::tPortList liFreePorts;
liFreePorts.push_back( IRavenNetServer::tPortRange( uiPort+1, 12499 ) ); liFreePorts.push_back( ITASimulationScheduler::RAVEN::IRavenNetServer::tPortRange( uiPort+1, 12499 ) );
cout << "Waiting for connections on all interfaces using port " << uiPort << endl; cout << "Waiting for connections on all interfaces using port " << uiPort << endl;
IRavenNetServer* pServer = IRavenNetServer::Create(); ITASimulationScheduler::RAVEN::IRavenNetServer* pServer = ITASimulationScheduler::RAVEN::IRavenNetServer::Create();
int iMode = IRavenNetServer::SCHEDULER; int iMode = ITASimulationScheduler::RAVEN::IRavenNetServer::SCHEDULER;
if (iMode & IRavenNetServer::SIMULATOR) if (iMode & ITASimulationScheduler::RAVEN::IRavenNetServer::SIMULATOR)
{ {
// Create and set up Standalone Raven Simulator // Create and set up Standalone Raven Simulator
CRavenSimulator* pSimulator = new CRavenSimulator(sRavenDataBasePath); ITASimulationScheduler::RAVEN::CRavenSimulator* pSimulator = new ITASimulationScheduler::RAVEN::CRavenSimulator(sRavenDataBasePath);
// Create server and connect Raven instance // Create server and connect Raven instance
pServer->SetRavenSimulator( (ISimulationInterface*) pSimulator ); pServer->SetRavenSimulator( (ITASimulationScheduler::ISimulationInterface*) pSimulator );
} }
if (iMode & IRavenNetServer::SCHEDULER) if (iMode & ITASimulationScheduler::RAVEN::IRavenNetServer::SCHEDULER)
{ {
// Create and set up Raven Scheduler on this machine // Create and set up Raven Scheduler on this machine
CLocalScheduler::CConfiguration oConf; ITASimulationScheduler::CLocalScheduler::CConfiguration oConf;
oConf.sRavenDataBasePath = sRavenDataBasePath; oConf.sRavenDataBasePath = sRavenDataBasePath;
CLocalScheduler* pScheduler = new CLocalScheduler( oConf ); ITASimulationScheduler::CLocalScheduler* pScheduler = new ITASimulationScheduler::CLocalScheduler( oConf );
pServer->SetRavenSimulationScheduler( (ISimulationSchedulerInterface*) pScheduler ); pServer->SetRavenSimulationScheduler( (ITASimulationScheduler::ISimulationSchedulerInterface*) pScheduler );
} }
// Start // Start
if( pServer->Initialize(sServerName, (int) uiPort, liFreePorts, iMode) != IRavenNetServer::RAVEN_NO_ERROR ) { if( pServer->Initialize(sServerName, (int) uiPort, liFreePorts, iMode) != ITASimulationScheduler::RAVEN::IRavenNetServer::RAVEN_NO_ERROR ) {
cerr << "Could not initialize server" << endl; cerr << "Could not initialize server" << endl;
} }
...@@ -70,4 +70,4 @@ int main(int argc, char** argv) { ...@@ -70,4 +70,4 @@ int main(int argc, char** argv) {
pServer->Finalize(); // Lscht auch den Simulator pServer->Finalize(); // Lscht auch den Simulator
return 0; return 0;
} }
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <ITASimulationScheduler/Raven/RavenNetServer.h> #include <ITASimulationScheduler/Raven/RavenNetServer.h>
#include <ITASimulationScheduler/Raven/R_RavenLocalScheduler.h> #include <ITASimulationScheduler/LocalScheduler.h>
using namespace std; using namespace std;
...@@ -37,24 +37,24 @@ int main( int argc, void** argv ) { ...@@ -37,24 +37,24 @@ int main( int argc, void** argv ) {
//string sServerName = "192.168.1.100"; //string sServerName = "192.168.1.100";
//string sServerName = "137.226.61.244"; // vrakustik3 ita netz //string sServerName = "137.226.61.244"; // vrakustik3 ita netz
unsigned int uiPort = 12480; unsigned int uiPort = 12480;
IRavenNetServer::tPortList liFreePorts; ITASimulationScheduler::RAVEN::IRavenNetServer::tPortList liFreePorts;
liFreePorts.push_back( IRavenNetServer::tPortRange( uiPort + 1, 12499 ) ); liFreePorts.push_back( ITASimulationScheduler::RAVEN::IRavenNetServer::tPortRange( uiPort + 1, 12499 ) );
cout << "This is the RavenNet simulation server" << endl; cout << "This is the RavenNet simulation server" << endl;
cout << "Waiting for connections to " << sServerName << " on port " << uiPort << endl << endl; cout << "Waiting for connections to " << sServerName << " on port " << uiPort << endl << endl;
// Create and set up Standalone Raven Simulator // Create and set up Standalone Raven Simulator
std::string sRavenDataPath = "../../../VAData"; std::string sRavenDataPath = "../../../VAData";
CLocalScheduler::CConfiguration oConf; ITASimulationScheduler::CLocalScheduler::CConfiguration oConf;
oConf.sRavenDataBasePath = sRavenDataPath; oConf.sRavenDataBasePath = sRavenDataPath;
CLocalScheduler* pScheduler = new CLocalScheduler( oConf ); ITASimulationScheduler::CLocalScheduler* pScheduler = new ITASimulationScheduler::CLocalScheduler( oConf );
// Create server and connect Raven instance // Create server and connect Raven instance
IRavenNetServer* pServer = IRavenNetServer::Create(); ITASimulationScheduler::RAVEN::IRavenNetServer* pServer = ITASimulationScheduler::RAVEN::IRavenNetServer::Create();
pServer->SetRavenSimulationScheduler( ( ISimulationSchedulerInterface* ) pScheduler ); pServer->SetRavenSimulationScheduler( ( ITASimulationScheduler::ISimulationSchedulerInterface* ) pScheduler );
int err = pServer->Initialize( sServerName, ( int ) uiPort, liFreePorts, IRavenNetServer::SCHEDULER ); int err = pServer->Initialize( sServerName, ( int ) uiPort, liFreePorts, ITASimulationScheduler::RAVEN::IRavenNetServer::SCHEDULER );
if( err != IRavenNetServer::RAVEN_NO_ERROR ) { if( err != ITASimulationScheduler::RAVEN::IRavenNetServer::RAVEN_NO_ERROR ) {
cout << "[ERROR] Could not initialize Raven simulation server" << endl; cout << "[ERROR] Could not initialize Raven simulation server" << endl;
} }
else { else {
...@@ -73,4 +73,4 @@ int main( int argc, void** argv ) { ...@@ -73,4 +73,4 @@ int main( int argc, void** argv ) {
pServer->Finalize(); // Lscht auch den Simulator pServer->Finalize(); // Lscht auch den Simulator
return 0; return 0;
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <ITAStopWatch.h> #include <ITAStopWatch.h>
#include <ITAStringUtils.h> #include <ITAStringUtils.h>
#include <ITASimulationScheduler/Raven/R_RavenSimulator.h> #include <ITASimulationScheduler/Raven/Simulator.h>
#include <RG_Vector.h> #include <RG_Vector.h>
using namespace std; using namespace std;
...@@ -22,8 +22,8 @@ void normalize_0dB( ITASampleFrame* ); ...@@ -22,8 +22,8 @@ void normalize_0dB( ITASampleFrame* );
int main( int argc, char** argv ) { int main( int argc, char** argv ) {
ISimulationInterface* pRavenSimulator; ITASimulationScheduler::ISimulationInterface* pRavenSimulator;
pRavenSimulator = ( ISimulationInterface* ) new CRavenSimulator( sRavenDataBasePath ); pRavenSimulator = ( ITASimulationScheduler::ISimulationInterface* ) new ITASimulationScheduler::RAVEN::CRavenSimulator( sRavenDataBasePath );
ITAStopWatch sw; ITAStopWatch sw;
...@@ -36,40 +36,40 @@ int main( int argc, char** argv ) { ...@@ -36,40 +36,40 @@ int main( int argc, char** argv ) {
sw.start(); sw.start();
cout << "\tSetting up scene, config, tasks and result ...\n"; cout << "\tSetting up scene, config, tasks and result ...\n";
CReceiverState oReceiverState; ITASimulationScheduler::RAVEN::CReceiverState oReceiverState;
oReceiverState.vPos.init( 0, 1.6f, 0 ); oReceiverState.vPos.init( 0, 1.6f, 0 );
oReceiverState.vView.init( 0, 0, -1 ); oReceiverState.vView.init( 0, 0, -1 );
oReceiverState.vUp.init( 0, 1, 0 ); oReceiverState.vUp.init( 0, 1, 0 );
oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff"; oReceiverState.sHRIRFilename = "$(RavenDataBasePath)/HRIR/ITA-Kunstkopf_HRIR_Mess01_D180_1x5_128.daff";
CSourceState oSourceState;