CTR Pia  4.11.3
Game Communication Engine
nn::pia::clone::CloneProtocol::Setting Struct Reference

Stores settings specified during initialization. More...

Public Types

Public Member Functions

 Setting ()
 Instantiates the object with default parameters (default constructor). More...
 

Public Attributes

u32 clockPerFrame
 Specifies the value to advance the clock per frame. More...
 
f32 clockPerSec
 Specifies the value to advance the clock per second. More...
 
ClockPriorityJudgeFunction clockPriorityJudgeFunction
 Specifies the function for determining which station was first when an event occurs at the time clock value. More...
 
ClockPriorityJudgeMethod clockPriorityJudgeMethod
 Specifies the method for determining which station was first when an event occurs at the time clock value. More...
 
f32 clockRegulationRate
 Specifies the rate at which to speed up or slow down the clock when re-regulating the clock. More...
 
ClockType clockType
 Specifies the standard to use for advancing the clock. More...
 
u32 dataCompressionLevel
 Specifies the compression level for data to send. More...
 

Detailed Description

Stores settings specified during initialization.

Specify the same values on stations being communicated with.

Member Enumeration Documentation

Enumerates the method for determining which station was first when an event occurs at the time clock value.

Enumerator
CLOCK_PRIORITY_JUDGE_METHOD_SIMPLE 

Specifies that the station with a smaller station ID value was first.

CLOCK_PRIORITY_JUDGE_METHOD_IMPARTIAL 

Specifies that the priority is changed based on the clock value so that no single station has an advantage over the long term.

CLOCK_PRIORITY_JUDGE_METHOD_USER_DEFINE 

Specifies that the application defines the method to use.

Enumerates the standard used for advancing the clock.

Enumerator
CLOCK_TYPE_RTC 

Specifies that the clock advances based on RTC.

CLOCK_TYPE_FRAME 

Specifies that the clock advances based on the number of times CloneProtocol::UpdateClock is called.

Constructor & Destructor Documentation

nn::pia::clone::CloneProtocol::Setting::Setting ( )
inline

Instantiates the object with default parameters (default constructor).

This function initializes the object using default values.

Member Data Documentation

u32 nn::pia::clone::CloneProtocol::Setting::clockPerFrame

Specifies the value to advance the clock per frame.

This setting is ignored if clockType is set to something other than CLOCK_TYPE_FRAME.

See also
clockType
f32 nn::pia::clone::CloneProtocol::Setting::clockPerSec

Specifies the value to advance the clock per second.

This setting is ignored if clockType is set to something other than CLOCK_TYPE_RTC.

See also
clockType
ClockPriorityJudgeFunction nn::pia::clone::CloneProtocol::Setting::clockPriorityJudgeFunction

Specifies the function for determining which station was first when an event occurs at the time clock value.

This setting is ignored if clockPriorityJudgeMethod is set to something other than CLOCK_PRIORITY_JUDGE_METHOD_USER_DEFINE.

See also
clockPriorityJudgeMethod;
ClockPriorityJudgeMethod nn::pia::clone::CloneProtocol::Setting::clockPriorityJudgeMethod

Specifies the method for determining which station was first when an event occurs at the time clock value.

If CLOCK_PRIORITY_JUDGE_METHOD_USER_DEFINE is specified, specify the function to use for determining the order in clockPriorityJudgeFunction.

See also
clockPriorityJudgeFunction
f32 nn::pia::clone::CloneProtocol::Setting::clockRegulationRate

Specifies the rate at which to speed up or slow down the clock when re-regulating the clock.

When the clock is re-regulated using CloneProtocol::RegulateClock, it advances faster or slower than usual at the rate specified here. For example, if 0.1 is specified and the station clock is behind the clocks of other stations, the clock advances at a speed of 110%. On the other hand, if the clock is ahead of the other stations, it advances at a speed of 90%.

ClockType nn::pia::clone::CloneProtocol::Setting::clockType

Specifies the standard to use for advancing the clock.

If CLOCK_TYPE_RTC is specified, the clock advances based on RTC. After a session begins and the clock has been regulated, time differences between systems do not need to be considered. However, the clock may not advance the same amount for each frame depending on when CloneProtocol::UpdateClock is called. Specify the speed at which to advance the clock in clockPerSec.

If CLOCK_TYPE_FRAME is specified, usually the clock advances a set value each time CloneProtocol::UpdateClock is called. However, if the number of calls to CloneProtocol::UpdateClock differs between stations due to lag or other factors, the clock may no longer match between stations. Specify the speed at which to advance the clock in clockPerFrame.

For more information about managing the clock, see the programming manual.

See also
clockPerSec
clockPerFrame
u32 nn::pia::clone::CloneProtocol::Setting::dataCompressionLevel

Specifies the compression level for data to send.

Not compressed when CloneProtocol::COMPRESSION_LEVEL_NONE is specified. Specifying CloneProtocol::COMPRESSION_LEVEL_LOW emphasizes speed; CloneProtocol::COMPRESSION_LEVEL_HIGH emphasizes the compression rate. Specifying CloneProtocol::COMPRESSION_LEVEL_MIDDLE results in a level of compression in between the other two. The default value is CloneProtocol::COMPRESSION_LEVEL_NONE. Other values are not supported. Execution time varies significantly based on the CPU performance of the platform.