UdpVideoStreamClient¶
Package: inet.applications.udpapp
simple module UdpVideoStreamClient
Video streaming client.
Sends one “video streaming request” to serverAddress:serverPort at time startTime
and receives a stream from the UdpVideoStreamServer server.
See also: UdpVideoStreamServer
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
localPort |
int |
-1 |
Local port (-1: use ephemeral port) |
serverAddress |
string |
Server address |
|
serverPort |
int |
Server port |
|
startTime |
double |
1s |
|
stopOperationExtraTime |
double |
-1s |
Extra time after the lifecycle stop operation finished |
stopOperationTimeout |
double |
2s |
Timeout value for the lifecycle stop operation |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
UdpVideoStreamClient |
|
display |
i=block/app |
|
lifecycleSupport |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
socketIn |
input |
||
socketOut |
output |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
packetReceived |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
endToEndDelay |
end-to-end delay |
dataAge(packetReceived) |
histogram,vector |
s |
none |
|
packetReceived |
packets received |
packetReceived |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
||
throughput |
throughput |
throughput(packetReceived) |
vector |
bps |
Source code¶
//
// Video streaming client.
//
// Sends one "video streaming request" to `serverAddress:serverPort` at time `startTime`
// and receives a stream from the ~UdpVideoStreamServer server.
//
// @see ~UdpVideoStreamServer
//
simple UdpVideoStreamClient extends SimpleModule like IApp
{
parameters:
@class(UdpVideoStreamClient);
int localPort = default(-1); // Local port (-1: use ephemeral port)
string serverAddress; // Server address
int serverPort; // Server port
double startTime @unit(s) = default(1s);
@display("i=block/app");
@lifecycleSupport;
double stopOperationExtraTime @unit(s) = default(-1s); // Extra time after the lifecycle stop operation finished
double stopOperationTimeout @unit(s) = default(2s); // Timeout value for the lifecycle stop operation
@signal[packetReceived](type=inet::Packet);
@statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
@statistic[throughput](title="throughput"; unit=bps; source="throughput(packetReceived)"; record=vector);
@statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none);
gates:
input socketIn @labels(UdpCommand/up);
output socketOut @labels(UdpCommand/down);
}