出力ネットワークデバイスを定義しているクラスです。デバッグ用機能です。
[詳解]
#include <OnlineCore/src/Transport/Interface/OutputEmulationDevice.h>
出力ネットワークデバイスを定義しているクラスです。デバッグ用機能です。
出力ネットワークデバイスは、RootTransport::GetOutputEmulationDeviceで参照可能で、 RootTransport::GetInstance()->GetOutputEmulationDevice()とすることで取得可能です。
エミュレーションデバイスを使う前には、 RootTransport::GetInstance()->GetOutputEmulationDevice()->Enable() を呼び出す必要があります。
このクラスは、EmulationDeviceの派生クラスで、特別なメソッドは定義されておりません。
- 参照
- EmulationDevice, OutputEmulationDevice
-
RootTransport::GetOutputEmulationDevice
void nn::nex::EmulationDevice::SetLatency |
( |
qUnsignedInt |
ui16Latency | ) |
|
|
inherited |
伝送遅延をmsec単位で指定します。
- 引数
-
[in] | ui16Latency | 伝送遅延[msec]を設定します。初期値は0です。 |
- 参照
- GetLatency, Enable
void nn::nex::EmulationDevice::SetJitter |
( |
qUnsignedInt |
ui16Jitter | ) |
|
|
inherited |
遅延ジッターをmsec単位で指定します。
- 引数
-
[in] | ui16Jitter | ジッター遅延[msec]を設定します。初期値は0です。 0から設定値までの値がランダムに遅延が設定されれます。 |
- 参照
- GetJitter, Enable
void nn::nex::EmulationDevice::SetBandwidth |
( |
qUnsignedInt32 |
uiBandwidth | ) |
|
|
inherited |
帯域制限速度をbps単位で指定します。
- 引数
-
[in] | uiBandwidth | 帯域制限速度[bps]を設定します。初期値は、nn::nex::INFINITE_BANDWIDTHで、 帯域制限なしです。 |
- 参照
- GetBandwidth, Enable
void nn::nex::EmulationDevice::SetPacketDropProbability |
( |
qReal |
dProbability | ) |
|
|
inherited |
qReal nn::nex::EmulationDevice::GetPacketDropProbability |
( |
| ) |
|
|
inherited |
qBool nn::nex::EmulationDevice::IsEnabled |
( |
| ) |
|
|
inherited |
ネットワークエミュレーションが有効か無効を取得します。
- 戻り値一覧:
true ネットワークエミュレーションが有効です。
false ネットワークエミュレーションが無効です。初期値です。
- 参照
- Enable
virtual void nn::nex::EmulationDevice::Enable |
( |
void |
| ) |
|
|
virtualinherited |
ネットワークエミュレーションを有効にします。
一度有効にすると無効にはできません。また、各種パラメータを設定する前に有効にする必要があります。
- 参照
- IsEnabled