A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tgax-virtual-desktop-example.cc File Reference

A simple Virtual Desktop Infrastructure (VDI) traffic generator example over Wi-Fi. More...

#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/mobility-module.h"
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"
Include dependency graph for tgax-virtual-desktop-example.cc:

Go to the source code of this file.

Functions

void PacketReceived (std::string context, Ptr< const Packet > packet, const Address &address)
 Callback invoked when the PacketSink receives a packet.
void VdiPacketSent (std::string context, Ptr< const Packet > packet)
 Callback invoked when a VDI packet is transmitted.

Detailed Description

A simple Virtual Desktop Infrastructure (VDI) traffic generator example over Wi-Fi.

This example demonstrates how to set up a basic ns-3 simulation with VDI traffic over a Wi-Fi network. VDI traffic models remote desktop applications where a server sends desktop display data to clients.

The simulation consists of:

  • A simple Wi-Fi network with one AP (Access Point) and one STA (Station)
  • VDI traffic flowing from the AP (server) to the STA (client) for downlink
  • Optional uplink traffic from STA to AP for navigation/feedback
  • Application-level tracing to observe VDI packets being sent

The VDI traffic model follows IEEE 802.11-14/0571r12 TGAX evaluation methodology:

  • Packet inter-arrival times follow an exponential distribution
  • Packet sizes follow a normal distribution (bimodal for downlink)
  • Initial packet arrival is uniformly distributed in [0, 20ms]

Traffic direction parameters from the specification:

  • Downlink (AP to STA): Mean arrival 60.2269ms, bimodal packet size (41/1478 bytes)
  • Uplink (STA to AP): Mean arrival 48.2870ms, normal packet size (mean 50.598 bytes)

To run downlink traffic (default): ./ns3 run tgax-virtual-desktop-example To run uplink traffic: ./ns3 run "tgax-virtual-desktop-example --direction=uplink" To run bidirectional: ./ns3 run "tgax-virtual-desktop-example --direction=bidirectional"

To disable verbose logging: ./ns3 run "tgax-virtual-desktop-example --verbose=false"

Definition in file tgax-virtual-desktop-example.cc.

Function Documentation

◆ PacketReceived()

void PacketReceived ( std::string context,
Ptr< const Packet > packet,
const Address & address )

Callback invoked when the PacketSink receives a packet.

Parameters
contextThe context string
packetThe received packet
addressThe sender's address

Definition at line 273 of file tgax-virtual-desktop-example.cc.

References NS_LOG_INFO.

◆ VdiPacketSent()

void VdiPacketSent ( std::string context,
Ptr< const Packet > packet )

Callback invoked when a VDI packet is transmitted.

Parameters
contextThe context string identifying the source
packetThe transmitted packet

Definition at line 267 of file tgax-virtual-desktop-example.cc.

References NS_LOG_INFO.