Virtual Acoustics (VA) C++ API  v2018a
Virtual Acoustics is a real-time auralization framework devoted to Virtual Reality.
Classes | Public Member Functions | Protected Attributes | List of all members
CVANetClientImpl Class Reference

#include <VANetClientImpl.h>

Inheritance diagram for CVANetClientImpl:
IVANetClient

Classes

class  CEventReceiver
 
class  CNetworkedVACore
 

Public Member Functions

 CVANetClientImpl ()
 
 ~CVANetClientImpl ()
 
IVAInterfaceGetCoreInstance () const
 Return client-side interface (networked calls) More...
 
bool IsConnected () const
 
std::string GetServerAddress () const
 Server address getter. More...
 
int Initialize (const std::string &sServerAddress, const int iServerPort, const int iHeadChannelMode=VA_HC_USE_EXISTING, const int IExceptionHandlingMode=EXC_CLIENT_THROW, const bool bBufferSynchronizedCommands=true)
 Initialize client and connect server. More...
 
int Disconnect ()
 Disconnect an established connection. More...
 
void SendConnectionEvent (const int nId)
 
void AttachEventHandler (IVAEventHandler *pCoreEventHandler)
 
void DetachEventHandler (IVAEventHandler *pCoreEventHandler)
 
bool AttachEventHandler (IVANetClient::IEventHandler *pHandler)
 Connection event handler attachment. More...
 
bool DetachEventHandler (IVANetClient::IEventHandler *pHandler)
 Connection event handler detachment. More...
 
void SetExceptionHandlingMode (const int nMode)
 Exception mode setter. More...
 
int GetExceptionhandlingMode () const
 Exception mode getter. More...
 
void ProcessNetEvent (const int iEventID)
 
void ProcessEventChannelError ()
 
- Public Member Functions inherited from IVANetClient
virtual ~IVANetClient ()
 Destructor. More...
 

Protected Attributes

CNetworkedVACorem_pVACore
 
CEventReceiverm_pEventReceiver
 
CVANetNetworkProtocolm_pProtocol
 
bool m_bConnected
 
bool m_bShutdownFlag
 
VistaConnectionIP * m_pCommandChannel
 
VistaConnectionIP * m_pEventChannel
 
VistaConnectionIP * m_pHeadChannel
 
std::string m_sServerIP
 
std::list< IEventHandler * > m_liEventHandlers
 
VistaMutex * m_pEventChannelLock
 

Additional Inherited Members

- Public Types inherited from IVANetClient
enum  ErrorType {
  VA_NO_ERROR = 0, VA_SERVER_CONNECTION_FAILED, VA_SERVER_NOT_RESPONDING, VA_SERVICE_IN_USE,
  VA_CONNECTION_ERROR, VA_PROTOCOL_INCOMPATIBLE, VA_UNKNOWN_ERROR
}
 Error types. More...
 
enum  HeadChannelMode { VA_HC_USE_EXISTING = 0, VA_HC_SEPARATE_TCP, VA_HC_SEPARATE_UDP }
 Head channel modi. More...
 
enum  ExceptionHandlingMode { EXC_CLIENT_THROW, EXC_SERVER_PRINT }
 Exception handling modi. More...
 
- Static Public Member Functions inherited from IVANetClient
static IVANetClientCreate ()
 Factory method. More...
 
- Protected Member Functions inherited from IVANetClient
 IVANetClient ()
 No default construction. More...
 

Detailed Description

Thread-Safe implementation

Definition at line 30 of file VANetClientImpl.h.

Constructor & Destructor Documentation

CVANetClientImpl::CVANetClientImpl ( )

Definition at line 1628 of file VANetClientImpl.cpp.

CVANetClientImpl::~CVANetClientImpl ( )

Definition at line 1641 of file VANetClientImpl.cpp.

Member Function Documentation

void CVANetClientImpl::AttachEventHandler ( IVAEventHandler pCoreEventHandler)

Definition at line 2035 of file VANetClientImpl.cpp.

bool CVANetClientImpl::AttachEventHandler ( IVANetClient::IEventHandler pHandler)
virtual

Connection event handler attachment.

Parameters
[in]pHandlerPointer to handler instance
Returns
True, if attachment possible

Implements IVANetClient.

Definition at line 2014 of file VANetClientImpl.cpp.

void CVANetClientImpl::DetachEventHandler ( IVAEventHandler pCoreEventHandler)

Definition at line 2043 of file VANetClientImpl.cpp.

bool CVANetClientImpl::DetachEventHandler ( IVANetClient::IEventHandler pHandler)
virtual

Connection event handler detachment.

Parameters
[in]pHandlerPointer to handler instance
Returns
True, if detachment possible

Implements IVANetClient.

Definition at line 2024 of file VANetClientImpl.cpp.

int CVANetClientImpl::Disconnect ( )
virtual

Disconnect an established connection.

Returns
Status code

Implements IVANetClient.

Definition at line 1839 of file VANetClientImpl.cpp.

IVAInterface * CVANetClientImpl::GetCoreInstance ( ) const
virtual

Return client-side interface (networked calls)

Returns
Interface pointerServer connection getter

Implements IVANetClient.

Definition at line 1647 of file VANetClientImpl.cpp.

int CVANetClientImpl::GetExceptionhandlingMode ( ) const
virtual

Exception mode getter.

Returns
Exception mode

Implements IVANetClient.

Definition at line 1897 of file VANetClientImpl.cpp.

std::string CVANetClientImpl::GetServerAddress ( ) const
virtual

Server address getter.

Returns
Server address string

Implements IVANetClient.

Definition at line 1662 of file VANetClientImpl.cpp.

int CVANetClientImpl::Initialize ( const std::string &  sServerAddress,
const int  iServerPort,
const int  iHeadChannelMode = VA_HC_USE_EXISTING,
const int  iExceptionHandlingMode = EXC_CLIENT_THROW,
const bool  bBufferSynchronizedCommands = true 
)
virtual

Initialize client and connect server.

Parameters
[in]sServerAddressServer address string
[in]iServerPortServer port (defaults to VANet definition)
[in]iHeadChannelModeServer port (defaults to VANet definition)
[in]iExceptionHandlingModeDefine exception mode handling
[in]bBufferSynchronizedCommandsBuffer synchronized commands on client side
Returns
Status code

Implements IVANetClient.

Definition at line 1667 of file VANetClientImpl.cpp.

bool CVANetClientImpl::IsConnected ( ) const
virtual
Returns
True, if connection is established

Implements IVANetClient.

Definition at line 1652 of file VANetClientImpl.cpp.

void CVANetClientImpl::ProcessEventChannelError ( )

Definition at line 1937 of file VANetClientImpl.cpp.

void CVANetClientImpl::ProcessNetEvent ( const int  iEventID)

Definition at line 1954 of file VANetClientImpl.cpp.

void CVANetClientImpl::SendConnectionEvent ( const int  nId)

Definition at line 1877 of file VANetClientImpl.cpp.

void CVANetClientImpl::SetExceptionHandlingMode ( const int  nMode)
virtual

Exception mode setter.

Parameters
[in]nModeException mode

Implements IVANetClient.

Definition at line 1893 of file VANetClientImpl.cpp.

Member Data Documentation

bool CVANetClientImpl::m_bConnected
protected

Definition at line 71 of file VANetClientImpl.h.

bool CVANetClientImpl::m_bShutdownFlag
protected

Definition at line 72 of file VANetClientImpl.h.

std::list<IEventHandler*> CVANetClientImpl::m_liEventHandlers
protected

Definition at line 80 of file VANetClientImpl.h.

VistaConnectionIP* CVANetClientImpl::m_pCommandChannel
protected

Definition at line 74 of file VANetClientImpl.h.

VistaConnectionIP* CVANetClientImpl::m_pEventChannel
protected

Definition at line 75 of file VANetClientImpl.h.

VistaMutex* CVANetClientImpl::m_pEventChannelLock
protected

Definition at line 81 of file VANetClientImpl.h.

CEventReceiver* CVANetClientImpl::m_pEventReceiver
protected

Definition at line 66 of file VANetClientImpl.h.

VistaConnectionIP* CVANetClientImpl::m_pHeadChannel
protected

Definition at line 76 of file VANetClientImpl.h.

CVANetNetworkProtocol* CVANetClientImpl::m_pProtocol
protected

Definition at line 69 of file VANetClientImpl.h.

CNetworkedVACore* CVANetClientImpl::m_pVACore
protected

Definition at line 63 of file VANetClientImpl.h.

std::string CVANetClientImpl::m_sServerIP
protected

Definition at line 78 of file VANetClientImpl.h.


The documentation for this class was generated from the following files:
Virtual Acoustics (VA) | http://www.virtualacoustics.org
Source code licensed under the Apache License, Version 2.0
C++ API documentation auto generated and licensed under Creative Commons Attribution License 4.0
© 2017-2018 Institute of Technical Acoustics (ITA)
RWTH Aachen University, Germany.