Commit 3305c31e authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Merge branch 'develop' of https://git.rwth-aachen.de/ita/VANet into develop

parents 0ada2b3d 87cc323a
Copyright 2015-2017 Institute of Technical Acoustics, RWTH Aachen University
Copyright 2015-2017 Institute of Technical Acoustics (ITA), RWTH Aachen University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
......
......@@ -5,7 +5,7 @@ VANet is a C++ protocol, server and client library that enables to communicate w
### License
Copyright 2015-2017 Institute of Technical Acoustics, RWTH Aachen University
Copyright 2015-2017 Institute of Technical Acoustics (ITA), RWTH Aachen University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include <VANetAudioStreamServer.h>
#include "VANetAudioStreamServerImpl.h"
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VANetAudioStreamServerImpl.h"
#include <VANetAudioStreamServer.h>
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VANET_AUDIO_STREAM_SERVER_IMPL
#define IW_VANET_AUDIO_STREAM_SERVER_IMPL
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include <VANetClient.h>
#include "VANetClientImpl.h"
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* ---------------------------------------------------------------------------------
*
* Datei: VANetClientImpl.cpp
*
* Zweck: Implementierung des Netzwerk-Clients fr den VA-Kernel
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de),
* Dominik Rausch (rausch@vr.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
// $Id: VANetClientImpl.cpp 4600 2016-02-29 20:06:32Z stienen $
#include "VANetClientImpl.h"
#include "VANetNetworkProtocol.h"
#include "VANetVistaCompatibility.h"
......
#ifndef __VANET_CLIENTIMPL_H__
#define __VANET_CLIENTIMPL_H__
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VANET_CLIENT_IMPL
#define IW_VANET_CLIENT_IMPL
#include <VANetClient.h>
......@@ -68,4 +81,4 @@ protected:
VistaMutex* m_pEventChannelLock;
};
#endif// __VANET_CLIENTIMPL_H__
#endif// IW_VANET_CLIENT_IMPL
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VANetMessage.h"
#include "VANetNetworkProtocol.h"
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VANetNetworkProtocol.h"
#include "VANetServerImpl.h"
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institutr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* ---------------------------------------------------------------------------------
*
* Datei: VANetNetworkProtocol.h
*
* Zweck: Protokoll-Klasse mit Serialisierung/Deserialisierung
*
* Autor(en): Dominik Rausch (rausch@vr.rwth-aachen.de),
* Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
// $Id: VANetNetworkProtocol.h 4600 2016-02-29 20:06:32Z stienen $
#ifndef __VANET_NETWORKPROTOCOL_H__
#define __VANET_NETWORKPROTOCOL_H__
#ifndef IW_VANET_NETWORK_PROTOCOL
#define IW_VANET_NETWORK_PROTOCOL
#include <VACore.h>
#include <VANetDefinitions.h>
......@@ -935,4 +925,4 @@ private:
int m_iReceiveTimeout;
};
#endif// __VANET_NETWORKPROTOCOL_H__
#endif // IW_VANET_NETWORK_PROTOCOL
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* ---------------------------------------------------------------------------------
*
* Datei: VANetServer.h
*
* Zweck: Schnittstelle des Netzwerk-Servers fr den VA-Kernel
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de),
* Dominik Rausch (rausch@vr.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
// $Id: VANetServer.cpp 3417 2013-08-07 14:09:17Z stienen $
#include <VANetServer.h>
#include "VANetServerImpl.h"
IVANetServer* IVANetServer::Create() {
IVANetServer* IVANetServer::Create()
{
return new CVANetServerImpl();
}
......
......@@ -76,7 +76,7 @@ public:
#endif
}
};
inline ~CConnectionAccepter()
{
delete m_pServer;
......@@ -487,15 +487,18 @@ void CVANetServerImpl::Reset()
/** @todo: reset core? */
}
std::string CVANetServerImpl::GetServerAdress() const {
std::string CVANetServerImpl::GetServerAdress() const
{
return m_sServerIP;
}
int CVANetServerImpl::GetServerPort() const {
int CVANetServerImpl::GetServerPort() const
{
return m_iServerPort;
}
IVACore* CVANetServerImpl::GetCoreInstance() const {
IVACore* CVANetServerImpl::GetCoreInstance() const
{
return m_pRealCore;
}
......@@ -519,21 +522,26 @@ void CVANetServerImpl::SetCoreInstance( IVACore* pCore ) {
// m_bRunning = bActive;
//}
bool CVANetServerImpl::IsClientConnected() const {
bool CVANetServerImpl::IsClientConnected() const
{
return ( m_vecClients.empty() == false );
}
int CVANetServerImpl::GetNumConnectedClients() const {
int CVANetServerImpl::GetNumConnectedClients() const
{
return ( int ) m_vecClients.size();
}
std::string CVANetServerImpl::GetClientHostname( const int iClientIndex ) const {
std::string CVANetServerImpl::GetClientHostname( const int iClientIndex ) const
{
VistaMutexLock oLock( *m_pServerChangeLock );
if( iClientIndex < 0 || iClientIndex >( int )m_vecClients.size() )
return "";
return m_vecClients[ iClientIndex ].m_sHost;
}
bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler ) {
bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler )
{
VistaMutexLock oLock( *m_pEventChannelLock );
std::list<IEventHandler*>::iterator itEntry = std::find( m_liEventHandlers.begin(),
m_liEventHandlers.end(), pHandler );
......@@ -542,7 +550,8 @@ bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler ) {
m_liEventHandlers.push_back( pHandler );
return true;
}
bool CVANetServerImpl::DetachEventHandler( IEventHandler* pHandler ) {
bool CVANetServerImpl::DetachEventHandler( IEventHandler* pHandler )
{
VistaMutexLock oLock( *m_pEventChannelLock );
std::list<IEventHandler*>::iterator itEntry = std::find( m_liEventHandlers.begin(),
m_liEventHandlers.end(), pHandler );
......@@ -802,7 +811,9 @@ void CVANetServerImpl::RemoveClient( int iClientID, int iStatusCode )
VistaMutexLock oEventChannelLock( *m_pEventChannelLock );
VistaMutexLock oHandlerLock( *m_pEventHandlerLock );
assert( iClientID >= 0 && iClientID < ( int ) m_vecClients.size() );
if( m_vecClients.size() == 0 )
return; // Clients already gone ...
std::vector<CClientData>::iterator itClient = m_vecClients.begin() + iClientID;
#ifdef VANET_SERVER_VERBOSE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment