CTR Pia
4.11.3
Game Communication Engine
|
The TransportAnalyzer
class reports on packet analysis results, RTT, packet loss rates, and so on.
.
More...
Public Types | |
typedef void(* | AnalysisPrintCallback) (const char *pStr) |
Defines the type of the print callback used for transport analysis data. More... | |
Public Member Functions | |
const struct TransportAnalysisData & | GetTransportAnalysisData () const |
Gets the data. | |
AnalysisPrintCallback | RegisterPrintCallback (AnalysisPrintCallback pCallback) |
Registers the print callback. More... | |
nn::Result | SetMarker (const char *pComment) |
Outputs a string to the console to delimit flags. More... | |
void | Trace (u64 flag) const |
Prints information that is useful for debugging. More... | |
nn::Result | Update () |
Updates the data. More... | |
Static Public Member Functions | |
static TransportAnalyzer * | GetInstance () |
Gets the TransportAnalyzer class instance (singleton pattern). This function returns a NULL pointer if the instance has not yet been created using the CreateInstance function. This function is thread-safe. More... | |
The TransportAnalyzer
class reports on packet analysis results, RTT, packet loss rates, and so on.
.
2014-09-18 Changed the specifications so that ResultAlreadyExists
is returned if you call CreateInstance
when an instance already exists.
2014-07-01 Added a feature that lets you pass analysis data as a text string to a user-defined function.
2013-11-25 Added the SetMarker
function.
2013-11-14 Made the CreateInstance
, DestroyInstance
, Initialize
, Finalize
, Startup
, and Cleanup
functions private.
2013-11-14 Made changes so that instances are implicitly created within PiaTransport
.
2013-10-29 Initial version.
typedef void(* nn::pia::transport::TransportAnalyzer::AnalysisPrintCallback) (const char *pStr) |
Defines the type of the print callback used for transport analysis data.
Use this type when you want to pass an output string containing transport analysis data to a user-defined function.
[in] | pStr | Takes the transport analysis data as a text string. Does not add a newline character. |
|
inlinestatic |
Gets the TransportAnalyzer
class instance (singleton pattern). This function returns a NULL
pointer if the instance has not yet been created using the CreateInstance
function. This function is thread-safe.
TransportAnalyzer
instance. AnalysisPrintCallback nn::pia::transport::TransportAnalyzer::RegisterPrintCallback | ( | AnalysisPrintCallback | pCallback | ) |
Registers the print callback.
[in] | pCallback | Specifies a pointer to the callback function to register. |
nn::Result nn::pia::transport::TransportAnalyzer::SetMarker | ( | const char * | pComment | ) |
Outputs a string to the console to delimit flags.
[in] | pComment | A pointer to the string that is the name of the delimiter line. The string cannot include whitespace characters. Also, NULL cannot be specified. |
ResultInvalidArgument
Specifies that an argument is invalid. NULL
pointers and strings that include whitespace characters cannot be provided as arguments. Programming error. Fix your program so that this error is not returned.
ResultInvalidState
Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.
void nn::pia::transport::TransportAnalyzer::Trace | ( | u64 | flag | ) | const |
Prints information that is useful for debugging.
[in] | flag | Specifies the bitwise OR of trace flags. For more information, see the TraceFlag type. |
nn::Result nn::pia::transport::TransportAnalyzer::Update | ( | ) |
Updates the data.
The application does not need to call this API function if (A) a positive value has been set for the analysisInterval
member variable in the Transport::Setting
structure and (B) automatic printing of analysis data is enabled. When the application gets analysis data when the automatic printing feature is disabled and a value of 0
is set for the analysisInterval
member variable, update the data by calling this API function explicitly.
Result
value for which the IsSuccess
function returns true
if the procedure was successful. You must make sure that the implementation of this function in your application does not return any errors. ResultNotInitialized
Indicates that the TransportAnalyzer
instance is not initialized. Programming error. Fix your program so that this error is not returned.
ResultInvalidState
Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.