Commit 92f656f4 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing bugs in server method lookup table

parent 52382ec3
......@@ -159,9 +159,9 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SAMPLE, ServerRemoveSignalSourceSequencerSample() );
// Synchronization functions
SERVER_FUNCTION_MAPPING( VA_NP_LOCK_SCENE, ServerLockUpdate() );
SERVER_FUNCTION_MAPPING( VA_NP_UNLOCK_SCENE, ServerUnlockUpdate() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SCENE_LOCKED, ServerGetUpdateLocked() );
SERVER_FUNCTION_MAPPING( VA_NP_LOCK_UPDATE, ServerLockUpdate() );
SERVER_FUNCTION_MAPPING( VA_NP_UNLOCK_UPDATE, ServerUnlockUpdate() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_UPDATE_LOCKED, ServerGetUpdateLocked() );
// Sound sources
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_IDS, ServerGetSoundSourceIDs() );
......@@ -184,16 +184,21 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_SOUND_POWER, ServerGetSoundSourceSoundPower() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_MUTED, ServerSetSoundSourceMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_MUTED, ServerGetSoundSourceMuted() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_POSE, ServerSetSoundSourcePosition() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_POSE, ServerGetSoundSourcePosition() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_POSITION, ServerSetSoundSourcePosition() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_POSITION, ServerGetSoundSourcePosition() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_ORIENTATION, ServerSetSoundSourceOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_ORIENTATION, ServerGetSoundSourceOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_ORIENTATION_VU, ServerSetSoundSourceOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_ORIENTATION_VU, ServerGetSoundSourceOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_INFO, ServerGetSoundReceiverInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_INFO, ServerGetSoundSourceInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_SOURCE_GEOMETRY_MESH, ServerGetSoundSourceGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_SOURCE_GEOMETRY_MESH, ServerGetSoundSourceGeometryMesh() );
// SoundReceivers
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_IDS, ServerGetSoundReceiverIDs() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_INFO, ServerGetSoundReceiverInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_SOUND_RECEIVER, ServerCreateSoundReceiver() );
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_SOUND_RECEIVER_EXPLICIT_RENDERER, ServerCreateSoundReceiverExplicitRenderer() );
SERVER_FUNCTION_MAPPING( VA_NP_DELETE_SOUND_RECEIVER, ServerDeleteSoundReceiver() );
......@@ -207,23 +212,79 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_PARAMETERS, ServerGetSoundReceiverParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_DIRECTIVITY, ServerGetSoundReceiverDirectivity() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_DIRECTIVITY, ServerSetSoundReceiverDirectivity() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_POSE, ServerSetSoundReceiverPose() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_POSE, ServerGetSoundReceiverPose() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_POSITION, ServerSetSoundReceiverPosition() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_POSITION, ServerGetSoundReceiverPosition() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_ORIENTATION, ServerSetSoundReceiverOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_ORIENTATION, ServerGetSoundReceiverOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_ORIENTATION_VU, ServerSetSoundReceiverOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_ORIENTATION_VU, ServerGetSoundReceiverOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_HEAD_ABOVE_TORSO_ORIENTATION, ServerSetSoundReceiverHeadAboveTorsoOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_HEAD_ABOVE_TORSO_ORIENTATION, ServerGetSoundReceiverHeadAboveTorsoOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_REAL_WORLD_POSITION_ORIENTATION_VU, ServerSetSoundReceiverRealWorldPositionOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_REAL_WORLD_POSITION_ORIENTATION_VU, ServerGetSoundReceiverRealWorldPositionOrientationVU() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_GEOMETRY_MESH, ServerSetSoundReceiverGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_GEOMETRY_MESH, ServerGetSoundReceiverGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_REAL_WORLD_POSE, ServerSetSoundReceiverRealWorldPose() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_REAL_WORLD_POSE, ServerGetSoundReceiverRealWorldPose() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION, ServerSetSoundReceiverRealWorldHeadAboveTorsoOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION, ServerGetSoundReceiverRealWorldHeadAboveTorsoOrientation() );
// Scene
SERVER_FUNCTION_MAPPING( VA_NP_SCENE_CREATE, ServerCreateScene() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SCENE_IDS, ServerGetSceneIDs() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SCENE_INFO, ServerGetSceneInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SCENE_NAME, ServerGetSceneName() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SCENE_NAME, ServerGetSceneName() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SCENE_ENABLED, ServerGetSceneEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SCENE_ENABLED, ServerGetSceneEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_IDS, ServerGetSoundPortalIDs() );
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_SOUND_PORTAL, ServerCreateSoundPortal() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_NAME, ServerGetSoundPortalName() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_NAME, ServerSetSoundPortalName() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_IDS, ServerGetSoundPortalIDs() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_INFO, ServerGetSoundPortalInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_PARAMETERS, ServerGetSoundPortalParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_PARAMETERS, ServerSetSoundPortalParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_POSITION, ServerGetSoundPortalPosition() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_POSITION, ServerSetSoundPortalPosition() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_ORIENTATION, ServerGetSoundPortalOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_ORIENTATION, ServerSetSoundPortalOrientation() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_ENABLED, ServerGetSoundPortalEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_ENABLED, ServerSetSoundPortalEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_MATERIAL, ServerGetSoundPortalMaterial() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_MATERIAL, ServerSetSoundPortalMaterial() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_NEXT_SOUND_PORTAL, ServerGetSoundPortalNextPortal() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_NEXT_SOUND_PORTAL, ServerSetSoundPortalNextPortal() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_SOUND_SOURCE, ServerGetSoundPortalSoundSource() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_SOUND_SOURCE, ServerSetSoundPortalSoundSource() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_SOUND_PORTAL_SOUND_RECEIVER, ServerGetSoundPortalSoundReceiver() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_SOUND_PORTAL_SOUND_RECEIVER, ServerSetSoundPortalSoundReceiver() );
// Geometry meshes
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_GEOMETRY_MESH, ServerCreateGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_GEOMETRY_MESH_FROM_PARAMETERS, ServerCreateGeometryMeshFromParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_DELETE_GEOMETRY_MESH, ServerDeleteGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GEOMETRY_MESH, ServerGetGeometryMesh() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GEOMETRY_MESH_IDS, ServerGetGeometryMeshIDs() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GEOMETRY_MESH_PARAMETERS, ServerGetGeometryMeshParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_GEOMETRY_MESH_PARAMETERS, ServerSetGeometryMeshParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GEOMETRY_MESH_NAME, ServerGetGeometryMeshName() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_GEOMETRY_MESH_NAME, ServerSetGeometryMeshEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_GEOMETRY_MESH_ENABLED, ServerGetGeometryMeshEnabled() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_GEOMETRY_MESH_ENABLED, ServerSetGeometryMeshEnabled() );
// Acoustic materials
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_ACOUSTIC_MATERIAL, ServerCreateAcousticMaterial() );
SERVER_FUNCTION_MAPPING( VA_NP_CREATE_ACOUSTIC_MATERIAL_FROM_PARAMETERS, ServerCreateAcousticMaterialFromParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_DELETE_ACOUSTIC_MATERIAL, ServerDeleteAcousticMaterial() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACOUSTIC_MATERIAL_INFO, ServerGetAcousticMaterialInfo() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACOUSTIC_MATERIAL_INFOS, ServerGetAcousticMaterialInfos() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACOUSTIC_MATERIAL_NAME, ServerGetAcousticMaterialName() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_ACOUSTIC_MATERIAL_NAME, ServerSetAcousticMaterialName() );
SERVER_FUNCTION_MAPPING( VA_NP_GET_ACOUSTIC_MATERIAL_PARAMETERS, ServerGetAcousticMaterialParameters() );
SERVER_FUNCTION_MAPPING( VA_NP_SET_ACOUSTIC_MATERIAL_PARAMETERS, ServerSetAcousticMaterialParameters() );
// Medium
SERVER_FUNCTION_MAPPING( VA_NP_GET_HOMOGENEOUS_MEDIUM_SOUND_SPEED, ServerGetHomogeneousMediumSoundSpeed() );
......@@ -1241,7 +1302,7 @@ void CVANetNetworkProtocol::ServerAddSignalSourceSequencerPlayback()
void CVANetNetworkProtocol::ClientRemoveSignalSourceSequencerSample( const std::string& sSignalSourceID, const int iSoundID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_ADD_SIGNAL_SOURCE_SEQUENCER_PLAYBACK, MESSAGE_ALLOWS_BUFFERING );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_REMOVE_SIGNAL_SOURCE_SEQUENCER_SAMPLE, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteString( sSignalSourceID );
pMsg->WriteInt( iSoundID );
ClientSendCommand( pMsg );
......@@ -1258,7 +1319,7 @@ void CVANetNetworkProtocol::ServerRemoveSignalSourceSequencerSample()
void CVANetNetworkProtocol::ClientLockUpdate()
{
ClientPrepareMessageBuffering();
CVANetMessage* pMsg = ClientInitMessage( VA_NP_LOCK_SCENE, MESSAGE_ALLOWS_BUFFERING );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_LOCK_UPDATE, MESSAGE_ALLOWS_BUFFERING );
ClientSendCommand( pMsg );
}
......@@ -1271,13 +1332,13 @@ int CVANetNetworkProtocol::ClientUnlockUpdate()
{
if( m_bBufferingActive == false )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_UNLOCK_SCENE, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_UNLOCK_UPDATE, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
}
else
{
ClientInitMessage( VA_NP_UNLOCK_SCENE, MESSAGE_ALLOWS_BUFFERING );
ClientInitMessage( VA_NP_UNLOCK_UPDATE, MESSAGE_ALLOWS_BUFFERING );
return ClientEndMessageBuffering();
}
}
......@@ -1294,7 +1355,7 @@ bool CVANetNetworkProtocol::ClientGetUpdateLocked()
if( m_bBufferingActive )
return true;
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SCENE_LOCKED, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_UPDATE_LOCKED, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadBool();
}
......@@ -1739,7 +1800,7 @@ void CVANetNetworkProtocol::ServerGetSoundSourcePosition()
void CVANetNetworkProtocol::ClientSetSoundSourceOrientation( const int iID, const VAQuat& qOrient )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_SOUND_SOURCE_POSITION, MESSAGE_ALLOWS_BUFFERING );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_SOUND_SOURCE_ORIENTATION, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iID );
pMsg->WriteQuat( qOrient );
ClientSendCommand( pMsg );
......@@ -2009,7 +2070,7 @@ void CVANetNetworkProtocol::ServerGetActiveSoundReceiverExplicitRenderer()
pMsg->WriteInt( iID );
}
void CVANetNetworkProtocol::ClientSetActiveSoundReceiver(const int iID )
void CVANetNetworkProtocol::ClientSetActiveSoundReceiver( const int iID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_ACTIVE_SOUND_RECEIVER, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iID );
......@@ -2727,7 +2788,7 @@ void CVANetNetworkProtocol::ServerSetSoundPortalNextPortal()
int CVANetNetworkProtocol::ClientGetSoundPortalNextPortal( const int iSoundPortalID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_SOUND_PORTAL_NEXT_SOUND_PORTAL, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SOUND_PORTAL_NEXT_SOUND_PORTAL, MESSAGE_WITH_ANSWER );
pMsg->WriteInt( iSoundPortalID );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
......@@ -2759,7 +2820,7 @@ void CVANetNetworkProtocol::ServerSetSoundPortalSoundReceiver()
int CVANetNetworkProtocol::ClientGetSoundPortalSoundReceiver( const int iSoundPortalID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_SOUND_PORTAL_SOUND_RECEIVER, MESSAGE_WITH_ANSWER );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_SOUND_PORTAL_SOUND_RECEIVER, MESSAGE_WITH_ANSWER );
pMsg->WriteInt( iSoundPortalID );
ClientSendCommand( pMsg );
return pMsg->ReadInt();
......@@ -3097,14 +3158,14 @@ void CVANetNetworkProtocol::ServerGetGeometryMeshParameters()
CVANetMessage* pMsg = ServerGetMessage();
const int iID = pMsg->ReadInt();
CVAStruct oArgs;
pMsg->ReadVAStruct( oArgs);
pMsg->ReadVAStruct( oArgs );
CVAStruct oParams = m_pRealCore->GetGeometryMeshParameters( iID, oArgs );
pMsg->WriteVAStruct( oParams );
}
void CVANetNetworkProtocol::ClientSetGeometryMeshParameters( const int iPortalID, const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_GEOMETRY_MESH_ENABLED, MESSAGE_ALLOWS_BUFFERING );
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_GEOMETRY_MESH_PARAMETERS, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteInt( iPortalID );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
......
......@@ -117,9 +117,9 @@ public:
static const int VA_NP_CREATE_SIGNAL_SOURCE_TEXT_TO_SPEECH = 660;
// Synchronization functions
static const int VA_NP_LOCK_SCENE = 700;
static const int VA_NP_UNLOCK_SCENE = 701;
static const int VA_NP_GET_SCENE_LOCKED = 702;
static const int VA_NP_LOCK_UPDATE = 700;
static const int VA_NP_UNLOCK_UPDATE = 701;
static const int VA_NP_GET_UPDATE_LOCKED = 702;
// Sound sources
static const int VA_NP_GET_SOUND_SOURCE_IDS = 800;
......@@ -157,7 +157,6 @@ public:
// Sound receivers
static const int VA_NP_GET_SOUND_RECEIVER_IDS = 900;
static const int VA_NP_CREATE_SOUND_RECEIVER = 901;
static const int VA_NP_CREATE_SOUND_RECEIVER_EXPLICIT_RENDERER = 929;
static const int VA_NP_DELETE_SOUND_RECEIVER = 902;
static const int VA_NP_GET_SOUND_RECEIVER_NAME = 903;
static const int VA_NP_SET_SOUND_RECEIVER_NAME = 904;
......@@ -188,6 +187,7 @@ public:
static const int VA_NP_GET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION = 937;
static const int VA_NP_SET_SOUND_RECEIVER_REAL_WORLD_HEAD_ABOVE_TORSO_ORIENTATION = 938;
static const int VA_NP_GET_SOUND_RECEIVER_INFO = 939;
static const int VA_NP_CREATE_SOUND_RECEIVER_EXPLICIT_RENDERER = 940;
......
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