Kaim::VisualDebugServerConfig Class Reference

#include <visualdebugserver.h>

Class Description

Configure the VisualDebugServer.

Call UseNavigationLab() or UseLocalFile() to determine how to run the VisualDebugServer. Note that Mode_UseLocalFile mode logs all sent data in to a file, it is mainly intended for testing.

+ Examples:

Public Types

enum  Mode { Mode_UseNavigationLab, Mode_UseLocalFile }
 Enumerates the visual debug information destination. More...
 
enum  WaitOnStart { DoNotWaitOnStart, DoWaitOnStart }
 Define the behavior for VisualDebugServer::Start. More...
 
enum  DisconnectionMode { UseSocketErrors, UseHeartbeat }
 Define how to detect disconnections. More...
 
enum  RunMode { RunSynchronously, RunAsynchronously }
 Determine how the data are sent. More...
 

Public Member Functions

void UseNavigationLab (KyUInt32 serverPort=DefaultServerPort(), KyUInt32 broadcastPort=DefaultBroadcastPort(), MessageReceiverRegistry *navigationLabCommandHandlers=nullptr)
 Reduce chances of selecting conflicting ports by looking at : More...
 
void SetMemoryConsumption (KyUInt32 expectedKiloBytesPerFrame, KyUInt32 maximumMegaBytesToUse)
 Define memory limitations for the VisualDebugServer. More...
 

For internal use only

Mode m_mode
 The visual debug information destination mode. More...
 

Relevant attributes if #m_mode = Mode_UseNavigationLab.

KyUInt32 m_serverPort
 The port used to listen to NavigationLab incoming connections. More...
 
KyUInt32 m_broadcastPort
 The port used to broadcast the existence of this server. More...
 
WaitOnStart m_waitOnStart
 
MessageReceiverRegistry * m_navigationLabCommandHandlers
 Optional, handles the commands that come from the Autodesk Navigation from the Network. More...
 

Relevant attributes if #m_mode = Mode_UseLocalFile.

const char * m_localFileName
 mandatory if m_mode = Mode_UseLocalFile. More...
 
FileOpenerBasem_localFileOpener
 if m_localFileOpener is NULL, DefaultFileOpener will be used More...
 
KyInt32 m_localFileMegaBytesLimit
 The size limit of the local file, when this limit is reached, the VisualDebugServer disconnects. More...
 

Memory allocations of messages

KyUInt32 m_maximumMegaBytes
 Specifies the maximum amount of memory this VisualDebugServer is allowed to allocate for creating messages. More...
 
KyUInt32 m_expectedKiloBytesPerFrame
 Specifies the expected amount of memory to allocate per frame. Used to define size of a message. More...
 

Various attributes

DisconnectionMode m_disconnectionMode
 Define how to detect disconnections. More...
 
RunMode m_runMode
 Define how to run the server, either directly in the current thread (recommended), or using secondary threads. More...
 
String m_serverName
 Associate a name to the server to ease identification of this server when connecting from the NavigationLab. More...
 

Member Enumeration Documentation

Define how to detect disconnections.

Enumerator
UseSocketErrors 

use socket errors to detect disconnections (recommended)

UseHeartbeat 

use heartbeat messages to detect disconnections (disconnection can occur when breakpointing)

Enumerates the visual debug information destination.

Enumerator
Mode_UseNavigationLab 

Sends visual debug information to the NavigationLab over the Network.

Mode_UseLocalFile 

Writes all visual debug information to a file on the platform.

Determine how the data are sent.

Enumerator
RunSynchronously 

run in current thread (recommended for most platforms)

RunAsynchronously 

use secondary threads for sending blobs

Define the behavior for VisualDebugServer::Start.

Enumerator
DoNotWaitOnStart 

Start won't wait for a connection.

DoWaitOnStart 

Start will block until a connection occurs.

Member Function Documentation

void Kaim::VisualDebugServerConfig::SetMemoryConsumption ( KyUInt32  expectedKiloBytesPerFrame,
KyUInt32  maximumMegaBytesToUse 
)
inline

Define memory limitations for the VisualDebugServer.

void Kaim::VisualDebugServerConfig::UseNavigationLab ( KyUInt32  serverPort = DefaultServerPort(),
KyUInt32  broadcastPort = DefaultBroadcastPort(),
MessageReceiverRegistry *  navigationLabCommandHandlers = nullptr 
)
inline

Reduce chances of selecting conflicting ports by looking at :

+ Examples:

Member Data Documentation

KyUInt32 Kaim::VisualDebugServerConfig::m_broadcastPort

The port used to broadcast the existence of this server.

DisconnectionMode Kaim::VisualDebugServerConfig::m_disconnectionMode

Define how to detect disconnections.

KyUInt32 Kaim::VisualDebugServerConfig::m_expectedKiloBytesPerFrame

Specifies the expected amount of memory to allocate per frame. Used to define size of a message.

KyInt32 Kaim::VisualDebugServerConfig::m_localFileMegaBytesLimit

The size limit of the local file, when this limit is reached, the VisualDebugServer disconnects.

const char* Kaim::VisualDebugServerConfig::m_localFileName

mandatory if m_mode = Mode_UseLocalFile.

FileOpenerBase* Kaim::VisualDebugServerConfig::m_localFileOpener

if m_localFileOpener is NULL, DefaultFileOpener will be used

KyUInt32 Kaim::VisualDebugServerConfig::m_maximumMegaBytes

Specifies the maximum amount of memory this VisualDebugServer is allowed to allocate for creating messages.

Mode Kaim::VisualDebugServerConfig::m_mode

The visual debug information destination mode.

MessageReceiverRegistry* Kaim::VisualDebugServerConfig::m_navigationLabCommandHandlers

Optional, handles the commands that come from the Autodesk Navigation from the Network.

This is typically set in our examples lightweight game engine, the LabGame and its LabEngine to control the examples from the NavigationLab. Works only if running in Mode_UseNavigationLab mode.

RunMode Kaim::VisualDebugServerConfig::m_runMode

Define how to run the server, either directly in the current thread (recommended), or using secondary threads.

String Kaim::VisualDebugServerConfig::m_serverName

Associate a name to the server to ease identification of this server when connecting from the NavigationLab.

KyUInt32 Kaim::VisualDebugServerConfig::m_serverPort

The port used to listen to NavigationLab incoming connections.


The documentation for this class was generated from the following file: