CTR Pia  4.11.3
Game Communication Engine
session_types.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: session_types.h
4 
5  Copyright Nintendo. All rights reserved.
6 
7  These coded instructions, statements, and computer programs contain
8  proprietary information of Nintendo of America Inc. and/or Nintendo
9  Company Ltd., and are protected by Federal copyright law. They may
10  not be disclosed to third parties or copied or duplicated in any form,
11  in whole or in part, without the prior written consent of Nintendo.
12  *---------------------------------------------------------------------------*/
13 
14 
15 #pragma once
16 
17 
18 namespace nn
19 {
20 namespace pia
21 {
22 namespace session
23 {
24 
25 static const u32 NN_PIA_SESSION_JOIN_TIMEOUT_DEFAULT = 15000; //!< The default value of the timeout time (in milliseconds) for the <tt>JoinMesh</tt> process.
26 static const u32 NN_PIA_SESSION_DESTROY_TIMEOUT_DEFAULT = 5000; //!< The default value of the timeout time (in milliseconds) for the <tt>DestroyMesh</tt> process.
27 static const u32 NN_PIA_SESSION_LEAVE_TIMEOUT_DEFAULT = 5000; //!< The default value of the timeout time (in milliseconds) for the <tt>LeaveMesh</tt> process.
28 
29 static const s32 NN_PIA_SESSION_KEEP_ALIVE_INTERVAL_DEFAULT = 1000; //!< The default value for the sending interval (in milliseconds) for keep-alive.
30 static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_DEFAULT = 10000; //!< The default value for the amount of time without communication (in milliseconds) after which it is determined that the communication with the station has been disconnected.
31 static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_MAX = 30000; //!< The maximum value that can be set for the amount of time without communication (in milliseconds) after which it is determined that the communication with the station has been disconnected.
32 static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_MIN = 1000; //!< The minimum value that can be set for the amount of time without communication (in milliseconds) after which it is determined that the communication with the station has been disconnected.
33 
34 static const u16 NN_PIA_SESSION_MAX_RTT_DEFAULT = 500; //!< The default maximum total RTT (in milliseconds) for a relay route.
35 
36 static const s32 NN_PIA_SESSION_INVALID_UPLINK_BIT_RATE_LOWER_LIMIT = -1; //!< This constant represents an invalid bitrate in the bitrate detection feature.
37 
38 /*!
39 @brief Enumerated type for configuring the network topology of a mesh created with the <tt>Session</tt> class or the <tt>Mesh</tt> class.
40 
41 @details This feature will be added to the <tt>Session</tt> class and the <tt>Mesh</tt> class in a future release.
42 */
44 {
45  NetworkTopology_FullMesh = 0, //!< Full-Mesh Network Topology
46 /*! @cond PRIVATE */
47  NetworkTopology_Star, //!< Star network topology (not available to third party developers).
48 /*! @endcond */
49  NetworkTopology_RelayMesh //!< Mesh Network Topology With Relay Connections Enabled
50 };
51 
52 
53 /*!
54 @brief Enumerated type for setting the bitrate detection feature.
55 */
57 {
58  BitRateCheck_Disable = 0, //!< Do not measure the bitrate.
59  BitRateCheck_Enable //!< Measure the bitrate.
60 };
61 
62 /*!
63 @cond PRIVATE
64 @brief Enumerated type for configuring the host migration of a mesh created with the <tt>Session</tt> class or the <tt>Mesh</tt> class.
65 
66 @details This feature will be added to the <tt>Session</tt> class and the <tt>Mesh</tt> class in a future release.
67 
68 */
69 enum HostMigrationMode
70 {
71  HostMigrationMode_None = 0, //!< Do not use host migration.
72  HostMigrationMode_SoleCandidate, //!< Use host migration. Only one candidate for the next session host.
73  HostMigrationMode_MultiCandidate //!< Use host migration. Multiple candidates for the next session host.
74 };
75 //! @endcond
76 
77 /*!
78 @brief Constant that indicates an invalid <tt>SessionId</tt>.
79 */
80 static const u32 INVALID_SESSION_ID = 0;
81 
82 }
83 }
84 }
static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_MAX
The maximum value that can be set for the amount of time without communication (in milliseconds) afte...
Definition: session_types.h:31
Definition: assert.h:115
static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_MIN
The minimum value that can be set for the amount of time without communication (in milliseconds) afte...
Definition: session_types.h:32
Full-Mesh Network Topology.
Definition: session_types.h:45
Do not measure the bitrate.
Definition: session_types.h:58
Mesh Network Topology With Relay Connections Enabled.
Definition: session_types.h:49
NetworkTopology
Enumerated type for configuring the network topology of a mesh created with the Session class or the ...
Definition: session_types.h:43
static const u32 INVALID_SESSION_ID
Constant that indicates an invalid SessionId.
Definition: session_types.h:80
static const s32 NN_PIA_SESSION_KEEP_ALIVE_INTERVAL_DEFAULT
The default value for the sending interval (in milliseconds) for keep-alive.
Definition: session_types.h:29
static const u16 NN_PIA_SESSION_MAX_RTT_DEFAULT
The default maximum total RTT (in milliseconds) for a relay route.
Definition: session_types.h:34
static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_DEFAULT
The default value for the amount of time without communication (in milliseconds) after which it is de...
Definition: session_types.h:30
BitRateCheckMode
Enumerated type for setting the bitrate detection feature.
Definition: session_types.h:56
static const s32 NN_PIA_SESSION_INVALID_UPLINK_BIT_RATE_LOWER_LIMIT
This constant represents an invalid bitrate in the bitrate detection feature.
Definition: session_types.h:36
Measure the bitrate.
Definition: session_types.h:59
static const u32 NN_PIA_SESSION_JOIN_TIMEOUT_DEFAULT
The default value of the timeout time (in milliseconds) for the JoinMesh process. ...
Definition: session_types.h:25
static const u32 NN_PIA_SESSION_DESTROY_TIMEOUT_DEFAULT
The default value of the timeout time (in milliseconds) for the DestroyMesh process.
Definition: session_types.h:26
static const u32 NN_PIA_SESSION_LEAVE_TIMEOUT_DEFAULT
The default value of the timeout time (in milliseconds) for the LeaveMesh process.
Definition: session_types.h:27