CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::WatermarkManager Class Reference

This class manages a collection of Watermark instances (not supported). More...

+ Inheritance diagram for nn::pia::common::WatermarkManager:

Public Member Functions

void DisableAllWatermark (void)
 Disables the Update feature of all Watermark instances managed by the WatermarkManager instance. More...
 
void EnableAllWatermark (void)
 Enables the Update feature of all Watermark instances managed by the WatermarkManager instance. More...
 
WatermarkGetWatermark (int key)
 Gets a Watermark instance (non-const version). More...
 
const WatermarkGetWatermark (int key) const
 Gets a Watermark instance (const version). More...
 
virtual void Trace (u64 flag) const
 Prints information useful for debugging. More...
 

Static Public Member Functions

static nn::Result CreateInstance (void)
 Creates the class instance in the common module (singleton pattern). More...
 
static void DestroyInstance (void)
 Destroys the class instance in the common module (singleton pattern).
 
static WatermarkManagerGetInstance (void)
 Gets the class instance in the common module (singleton pattern). More...
 

Static Public Attributes

static const int KEY_RECEIVETHREADSTREAM_BUFFER_NUM = 1
 This key is for the buffer usage of the receive thread.
 
static const int KEY_RELIABLE_PROTOCOL_RECEIVE_BUFFER_NUM = 4
 This key is for the receive buffer usage of the ReliableProtocol instance.
 
static const int KEY_RELIABLE_PROTOCOL_SEND_BUFFER_NUM = 3
 This key is for the send buffer usage of the ReliableProtocol instance.
 
static const int KEY_SENDTHREADSTREAM_BUFFER_NUM = 0
 This key is for the buffer usage of the send thread.
 
static const int KEY_SESSION_PROTOCOL_RELIABLE_RECEIVE_BUFFER_NUM = 8
 This key is for the Reliable receive buffer usage of the SessionProtocol instance.
 
static const int KEY_SESSION_PROTOCOL_RELIABLE_SEND_BUFFER_NUM = 7
 This key is for the Reliable send buffer usage of the SessionProtocol instance.
 
static const int KEY_STATION_PROTOCOL_RELIABLE_RECEIVE_BUFFER_NUM = 6
 This key is for the receive buffer usage of the StationProtocolReliable instance.
 
static const int KEY_STATION_PROTOCOL_RELIABLE_SEND_BUFFER_NUM = 5
 This key is for the send buffer usage of the StationProtocolReliable instance.
 
static const int KEY_UNRELIABLE_PROTOCOL_RECEIVE_BUFFER_NUM = 9
 This key is for the receive buffer usage of the UnreliableProtocol instance.
 
static const int WATERMARK_INSTANCES = 10
 The maximum number of Watermark instances managed by the WatermarkManager class.
 

Detailed Description

This class manages a collection of Watermark instances (not supported).

The WatermarkManager class is provided for managing collections of Watermark instances. You can use it to get information like the peak buffer usage of the Pia library.

Revision History:

2014-09-18 Changed the specifications so that ResultAlreadyExists is returned if you call CreateInstance when an instance already exists.

2013-05-14 Added KEY_UNRELIABLE_PROTOCOL_RECEIVE_BUFFER_NUM.

2013-04-01 Removed KEY_PACKETPARSER_BUFFUR_NUM and KEY_PACKETCREATOR_BUFFUR_NUM.

2013-03-21 Added keys for Reliable send and receive buffers in SessionProtocol.

2012-05-09 Added keys for ReliableProtocol and StationProtocolReliable send and receive buffers.

2012-04-25 Added documentation.

2012-04-04 Initial version.

Member Function Documentation

static nn::Result nn::pia::common::WatermarkManager::CreateInstance ( void  )
static

Creates the class instance in the common module (singleton pattern).

Returns
Returns a Result value that indicates success if the instance is created successfully. Your application's implementation must ensure that this function does not return any errors.
Error Return Values:

ResultNotInitialized Indicates that the common module is not initialized. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Indicates that the timing at which the CreateInstance function was called is incorrect. Make this call between the BeginSetup and EndSetup functions. Programming error. Fix your program so that this error is not returned.

ResultAlreadyExists Indicates that an instance has already been created. Programming error. Fix your program so that this error is not returned.

void nn::pia::common::WatermarkManager::DisableAllWatermark ( void  )

Disables the Update feature of all Watermark instances managed by the WatermarkManager instance.

See also
EnableAllWatermark
void nn::pia::common::WatermarkManager::EnableAllWatermark ( void  )

Enables the Update feature of all Watermark instances managed by the WatermarkManager instance.

See also
DisableAllWatermark
static WatermarkManager* nn::pia::common::WatermarkManager::GetInstance ( void  )
inlinestatic

Gets the class instance in the common module (singleton pattern).

Returns a NULL pointer if the instance has not yet been created using the CreateInstance function.

Returns
Returns a pointer to the instance.
Watermark* nn::pia::common::WatermarkManager::GetWatermark ( int  key)

Gets a Watermark instance (non-const version).

Parameters
[in]keySpecifies the key. The following relation must hold: 0 <= key <= KEY_MAX. The function asserts if a key outside this range is specified.
Returns
On success, returns a pointer to a Watermark instance. On failure, returns a NULL pointer.
const Watermark* nn::pia::common::WatermarkManager::GetWatermark ( int  key) const

Gets a Watermark instance (const version).

Parameters
[in]keySpecifies the key. The following relation must hold: 0 <= key <= KEY_MAX. The function asserts if a key outside this range is specified.
Returns
On success, returns a pointer to a Watermark instance. On failure, returns a NULL pointer.
virtual void nn::pia::common::WatermarkManager::Trace ( u64  flag) const
virtual

Prints information useful for debugging.

Parameters
[in]flagSpecifies the bitwise OR of trace flags. For more information, see the TraceFlag type.