OROCHI
 
Loading...
Searching...
No Matches
GxToolP2PSession.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14GX_P2P_NAMESPACE_BEGIN()
15
16//===========================================================================
18//===========================================================================
19class GxToolP2PSession : public GxToolBase
20{
21 //-------------------------------------------------------------
23 //-------------------------------------------------------------
25public:
26 // RTTI定義
27 GX_RTTI_CLASS_NAME_ICON(GxToolP2PSession, GxToolBase, "セッション管理", GxRtti::ICON_TYPE::P2P)
28 // ClassBaseReference継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxToolP2PSession)
30
31protected:
33 static constexpr u32 WINDOW_RECT_TOP = 100;
35 static constexpr u32 WINDOW_RECT_HEIGHT = 440;
37 static constexpr u32 WINDOW_RECT_WIDTH = 500;
39 static constexpr u32 SPLITTER_MARGIN = 20;
41 static constexpr u32 BUTTON_HEIGHT = 16;
42
44 static constexpr u32 GRAPH_RECORD_FRAME = 600;
46 static constexpr u32 GRAPH_DISP_BYTEPERSEC = 10000;
48 static constexpr u32 GRAPH_DISP_PACKETCOUNT = 200;
50 static constexpr u32 GRAPH_UPDATE_SPAN = 10;
52 static constexpr u32 GRAPH_SPLITTER_HEIGHT = 100;
54 static constexpr u32 GRAPH_SPLITTER_WIDTH = 120;
55
57 enum class P2P_TOOL_TAB
58 {
59 SESSION = 0,
60 DEBUG_SERVER,
61 STATION
62 };
63
65 //-------------------------------------------------------------
67 //-------------------------------------------------------------
69public:
71 GxToolP2PSession(void);
72
74 b32 initialize(void) override;
75
77 //-------------------------------------------------------------
79 //-------------------------------------------------------------
81public:
83 void update(void) override;
85 void onSize(const GxSize& size) override;
86
87private:
89 void eventLeaveSession(void);
90#if defined(_WINDOWS)
92 void eventUPnPOpenPort(void);
94 void eventUPnPClosePort(void);
95#endif // _WINDOWS
97 void eventConnectDebugServer(void);
98
99public:
101 static GxGuiBase* createGui(GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index = 0);
102
104 //-------------------------------------------------------------
106 //-------------------------------------------------------------
108
110 void getIsHostStation(void* const pValue);
112 void getIsLocalStation(void* const pValue);
114 void getIsReadyStation(void* const pValue);
116 void getStationId(void* const pValue);
118 void getStationIpAddress(void* const pValue);
120 void getStationPingAverage(void* const pValue);
122 void getStationRecvPacketBytesMomentary(void* const pValue);
124 void getStationSendPacketBytesMomentary(void* const pValue);
126 void getStationRecvPacketCountMomentary(void* const pValue);
128 void getStationSendPacketCountMomentary(void* const pValue);
130 void getStationRecvPacketBytesPeek(void* const pValue);
132 void getStationSendPacketBytesPeek(void* const pValue);
134 void getStationRecvPacketCountPeek(void* const pValue);
136 void getStationSendPacketCountPeek(void* const pValue);
137
138private:
140 b32 createGuiSessionTab(void);
142 b32 createGuiDebugServerTab(void);
144 b32 createGuiStationTab(u32 index);
145
147 //-------------------------------------------------------------
149 //-------------------------------------------------------------
151private:
152 GxGuiTab* _pGuiTab;
153 GxGuiSplitter* _pGuiSplitterRecieveCountToSendCount;
154 GxGuiSplitter* _pGuiSplitterSendByteToRecvCount;
155 GxGuiSplitter* _pGuiSplitterRecieveByteToSendByte;
156
157 GxString _sessionName;
158 b32 _isJoined;
160 u32 _sessionRecievePacketBytesMomentary;
161 u32 _sessionSendPacketBytesMomentary;
162 u32 _sessionRecievePacketBytesPeek;
163 u32 _sessionSendPacketBytesPeek;
164 u32 _sessionRecievePacketCountMomentary;
165 u32 _sessionSendPacketCountMomentary;
166 u32 _sessionRecievePacketCountPeek;
167 u32 _sessionSendPacketCountPeek;
168 u32 _sessionDebugSimulatePacketLatency;
169 f32 _sessionDebugSimulatePacketLost;
170
171#if defined(_WINDOWS)
172 u16 _upnpOpenPort;
173#endif // _WINDOWS
174
175 GxString _debugServerAddress;
176
178};
179
180GX_P2P_NAMESPACE_END()
181#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
static constexpr ns32 NETWORK_GAMER_MAX
ゲーマー数 (※最大接続人数)
Definition GxP2PSessionManager.h:148
Stationクラス
Definition GxP2PSessionManager.h:19
プロパティクラス
Definition GxProperty.h:48
実行時型情報クラス
Definition GxRtti.h:154
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173