UdpVideoStreamClient

Package: inet.applications.udpapp

UdpVideoStreamClient

simple module

C++ definition

Video streaming client.

Sends one "video streaming request" to serverAddress:serverPort at time startTime and receives a stream from the ~UdpVideoStreamServer server.

<b>See also:</b> ~UdpVideoStreamServer

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
SimpleModule 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 inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode Description
packetReceived packets received packetReceived count, sum(packetBytes), vector(packetBytes) none
throughput throughput throughput(packetReceived) vector bps
endToEndDelay end-to-end delay dataAge(packetReceived) histogram, vector s none

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);
}

File: src/inet/applications/udpapp/UdpVideoStreamClient.ned