RtVideoStreamingSender¶
Package: simu5g.apps.mec.RealTimeVideoStreamingApp
simple module RtVideoStreamingSender
This application is to be instantiated on the UE side. It requires that a DeviceApp is also instantiated on the UE. This module requests the DeviceApp to instantiate a MecRTVideoStreamingReceiver in the MEC system. Once the peer MEC application is up and running, this module starts sending packets containing video frames as read from the trace file specified in the configuration.
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
mobilityModule |
string |
||
localPort |
int |
4000 |
Connection parameters |
deviceAppPort |
int |
4000 |
Port of the DeviceApp |
deviceAppAddress |
string |
IP address of the DeviceApp |
|
packetSize |
int |
10B |
|
tos |
int |
-1 |
If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value |
period |
double |
1s |
Auto-scheduling parameters |
startTime |
double |
0s |
|
stopTime |
double |
120s |
|
mecAppName |
string |
“MecrtVideoStreamingReceiverApp” |
The “appName” of the application descriptor to instantiate |
sessionDuration |
double |
uniform(30s,120s) |
TODO is this the right distribution? |
periodBetweenSession |
double |
uniform(10s,60s) |
TODO is this the right distribution? |
fileName |
string |
||
sendAllOnOneTime |
bool |
true |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/source |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
socketOut |
output |
||
socketIn |
input |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
positionX |
double |
||
positionY |
double |
||
positionZ |
double |
||
rtVideoStreamingEnd2endDelaySegment |
simtime_t |
||
rtVideoStreamingFirstFrameElapsedTime |
simtime_t |
||
rtVideoStreamingFramesDisplayed |
double |
||
rtVideoStreamingFrameSize |
int |
||
rtVideoStreamingInterArrivalTimeSegment |
simtime_t |
||
rtVideoStreamingPlayoutBufferLength |
int |
||
rtVideoStreamingPlayoutDelay |
simtime_t |
||
rtVideoStreamingPlayoutDelayAll |
simtime_t |
||
rtVideoStreamingSegmentLoss |
int |
||
rtVideoStreamingSegmentPacketSize |
int |
||
rtVideoStreamingStartSession |
simtime_t |
||
rtVideoStreamingStopSession |
simtime_t |
||
velocity |
double |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
positionX |
UE positionX |
positionX |
vector |
|||
positionY |
UE positionY |
positionY |
vector |
|||
positionZ |
UE positionY |
positionZ |
vector |
|||
rtVideoStreamingEnd2endDelaySegment |
end to end delay of segment packets |
rtVideoStreamingEnd2endDelaySegment |
mean,vector |
|||
rtVideoStreamingFirstFrameElapsedTime |
Frames displayed |
rtVideoStreamingFirstFrameElapsedTime |
vector |
none |
||
rtVideoStreamingFramesDisplayed |
Frames displayed |
rtVideoStreamingFramesDisplayed |
count,vector |
none |
||
rtVideoStreamingFrameSize |
size of frames |
rtVideoStreamingFrameSize |
mean,vector |
|||
rtVideoStreamingInterArrivalTimeSegment |
inter arrival of segment packets |
rtVideoStreamingInterArrivalTimeSegment |
mean,vector |
|||
rtVideoStreamingPlayoutBufferLength |
playout buffer Length |
rtVideoStreamingPlayoutBufferLength |
mean,vector |
|||
rtVideoStreamingPlayoutDelay |
playout delay |
rtVideoStreamingPlayoutDelay |
mean,vector |
|||
rtVideoStreamingPlayoutDelayAll |
playout delay |
rtVideoStreamingPlayoutDelayAll |
mean,vector |
|||
rtVideoStreamingSegmentLoss |
segment packets lost |
rtVideoStreamingSegmentLoss |
mean,vector |
none |
||
rtVideoStreamingSegmentPacketSize |
size of segment packets |
rtVideoStreamingSegmentPacketSize |
mean,vector |
|||
rtVideoStreamingStartSession |
start session timestamps |
rtVideoStreamingStartSession |
mean,vector |
none |
||
rtVideoStreamingStopSession |
stop session timestamps |
rtVideoStreamingStopSession |
mean,vector |
none |
||
velocity |
UE velocity |
velocity |
vector |
Source code¶
//
// This application is to be instantiated on the UE side. It requires that a ~DeviceApp is
// also instantiated on the UE. This module requests the ~DeviceApp to instantiate a
// ~MecRTVideoStreamingReceiver in the MEC system.
// Once the peer MEC application is up and running, this module starts sending packets
// containing video frames as read from the trace file specified in the configuration.
//
simple RtVideoStreamingSender like IApp
{
parameters:
@display("i=block/source");
string mobilityModule;
// Connection parameters
int localPort = default(4000);
int deviceAppPort = default(4000); // Port of the DeviceApp
string deviceAppAddress; // IP address of the DeviceApp
int packetSize @unit(B) = default(10B);
int tos = default(-1); // If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value
// Auto-scheduling parameters
double period @unit("s") = default(1s);
double startTime @unit("s") = default(0s);
double stopTime @unit("s") = default(120s);
string mecAppName = default("MecrtVideoStreamingReceiverApp"); // The "appName" of the application descriptor to instantiate
// Session parameters
volatile double sessionDuration @unit("s") = default(uniform(30s,120s)); // TODO is this the right distribution?
volatile double periodBetweenSession @unit("s") = default(uniform(10s,60s)); // TODO is this the right distribution?
string fileName;
bool sendAllOnOneTime = true;
@signal[positionX](type=double);
@statistic[positionX](title="UE positionX"; source=positionX; record=vector);
@signal[positionY](type=double);
@statistic[positionY](title="UE positionY"; source=positionY; record=vector);
@signal[positionZ](type=double);
@statistic[positionZ](title="UE positionY"; source=positionZ; record=vector);
@signal[velocity](type=double);
@statistic[velocity](title="UE velocity"; source=velocity; record=vector);
@signal[rtVideoStreamingFirstFrameElapsedTime](type=simtime_t);
@statistic[rtVideoStreamingFirstFrameElapsedTime](title="Frames displayed"; source="rtVideoStreamingFirstFrameElapsedTime"; record=vector; interpolationmode=none);
@signal[rtVideoStreamingFramesDisplayed](type=double);
@statistic[rtVideoStreamingFramesDisplayed](title="Frames displayed"; source="rtVideoStreamingFramesDisplayed"; record=count,vector; interpolationmode=none);
@signal[rtVideoStreamingEnd2endDelaySegment](type=simtime_t);
@statistic[rtVideoStreamingEnd2endDelaySegment](title="end to end delay of segment packets"; source="rtVideoStreamingEnd2endDelaySegment"; record=mean,vector);
@signal[rtVideoStreamingSegmentPacketSize](type=int);
@statistic[rtVideoStreamingSegmentPacketSize](title="size of segment packets"; source="rtVideoStreamingSegmentPacketSize"; record=mean,vector);
@signal[rtVideoStreamingFrameSize](type=int);
@statistic[rtVideoStreamingFrameSize](title="size of frames"; source="rtVideoStreamingFrameSize"; record=mean,vector);
@signal[rtVideoStreamingPlayoutBufferLength](type=int);
@statistic[rtVideoStreamingPlayoutBufferLength](title="playout buffer Length"; source="rtVideoStreamingPlayoutBufferLength"; record=mean,vector);
@signal[rtVideoStreamingInterArrivalTimeSegment](type=simtime_t);
@statistic[rtVideoStreamingInterArrivalTimeSegment](title="inter arrival of segment packets"; source="rtVideoStreamingInterArrivalTimeSegment"; record=mean,vector);
@signal[rtVideoStreamingPlayoutDelay](type=simtime_t);
@statistic[rtVideoStreamingPlayoutDelay](title="playout delay"; source="rtVideoStreamingPlayoutDelay"; record=mean,vector);
@signal[rtVideoStreamingPlayoutDelayAll](type=simtime_t);
@statistic[rtVideoStreamingPlayoutDelayAll](title="playout delay"; source="rtVideoStreamingPlayoutDelayAll"; record=mean,vector);
@signal[rtVideoStreamingSegmentLoss](type=int);
@statistic[rtVideoStreamingSegmentLoss](title="segment packets lost"; source="rtVideoStreamingSegmentLoss"; record=mean,vector; interpolationmode=none);
@signal[rtVideoStreamingStartSession](type=simtime_t);
@statistic[rtVideoStreamingStartSession](title="start session timestamps"; source="rtVideoStreamingStartSession"; record=mean,vector; interpolationmode=none);
@signal[rtVideoStreamingStopSession](type=simtime_t);
@statistic[rtVideoStreamingStopSession](title="stop session timestamps"; source="rtVideoStreamingStopSession"; record=mean,vector; interpolationmode=none);
gates:
output socketOut;
input socketIn;
}
File: src/simu5g/apps/mec/RealTimeVideoStreamingApp/RtVideoStreamingSender.ned