CTR Pia  4.11.3
Game Communication Engine
nn::pia::transport::Transport::Setting Struct Reference

Stores parameters passed to the CreateInstance function. More...

Public Member Functions

 Setting (void)
 Instantiates the object with default parameters (default constructor). Each member variable is set to 0 or NULL.
 
 Setting (NetworkFactory *pFactory, size_t maxStationNum=0, size_t maxSendThreadBufferNum=0, size_t maxReceiveThreadBufferNum=0, s32 analysisInterval=0)
 Instantiates the object with arguments. The values specified in the arguments are set in the variables of each member. More...
 

Public Attributes

s32 analysisInterval
 The interval at which measurement results from the TransportAnalyzer feature are automatically output to the console. The unit is seconds. When 0 is specified, output is not automatic, and it is left to the application to get the data.
 
size_t maxReceiveThreadBufferNum
 The number of buffers that the receiving thread of the Pia library uses to receive packets (about 1.5 KB per buffer). You must set this value to 2 or greater.
 
size_t maxSendThreadBufferNum
 The number of buffers that the sending thread of the Pia library uses to send packets (about 1.5 KB per buffer). You must set this value to 2 or greater.
 
size_t maxStationNum
 Specifies the maximum number of Stations that can join a single network.
 
NetworkFactorypFactory
 Pointer to an instance of the concrete class that inherits NetworkFactory (factory pattern).
 

Detailed Description

Stores parameters passed to the CreateInstance function.

The buffer parameter you configure in this struct has a direct effect on the memory usage of the PiaTransport class. You can set this parameter to a large value to reduce the frequency of ResultBufferIsFull errors caused by buffer exhaustion when sending and receiving data. This helps make communication function more smoothly, although of course it increases memory usage. The amount of memory required by the PiaTransport class depends on the communication specifications of your application. The library provides the common::WatermarkManager() class to help tune these parameters. You can use this watermark feature to discover the peak buffer usage when your program actually runs. It helps application developers determine the optimum buffer size to use in the Pia library.

See also
CreateInstance, common::WatermarkManager, ThreadStreamManager

Constructor & Destructor Documentation

nn::pia::transport::Transport::Setting::Setting ( NetworkFactory pFactory,
size_t  maxStationNum = 0,
size_t  maxSendThreadBufferNum = 0,
size_t  maxReceiveThreadBufferNum = 0,
s32  analysisInterval = 0 
)

Instantiates the object with arguments. The values specified in the arguments are set in the variables of each member.

Parameters
[in]pFactorySpecifies a pointer to an instance of a concrete class that inherits NetworkFactory (factory pattern).
[in]maxStationNumSpecifies the maximum number of Stations that can join a single network.
[in]maxSendThreadBufferNumSpecifies the number of buffers that the Pia library's sending thread uses to send packets (about 1.5 KB per buffer). You must set this value to 2 or greater.
[in]maxReceiveThreadBufferNumSpecifies the number of buffers that the Pia library's receiving thread uses to receive packets (about 1.5 KB per buffer). You must set this value to 2 or greater.
[in]analysisIntervalThe interval at which measurement results from the TransportAnalyzer feature are automatically output to the console. The unit is seconds. When 0 is specified, output is not automatic, and it is left to the application to get the data.