Package: inet.applications.udpapp
UdpVideoStreamServer
simple moduleVideo stream server. To be used with UdpVideoStreamClient.
The server will wait for incoming "video streaming requests". When a request arrives, it draws a random video stream size using the videoSize parameter, and starts streaming to the client. During streaming, it will send UDP packets of size packetLen at every sendInterval, until videoSize is reached. The parameters packetLen and sendInterval can be set to constant values to create CBR traffic, or to random values (e.g. sendInterval=uniform(1e-6, 1.01e-6)) to accomodate jitter.
The server can serve several clients, and several streams per client.
See also: UdpVideoStreamClient
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
localPort | int |
port to listen on |
|
sendInterval | double |
interval between sending video stream packets |
|
packetLen | int |
length of a video packet in bytes |
|
videoSize | int |
length of full a video stream in bytes |
|
timeToLive | int | -1 |
if not -1, set the TTL (IPv4) or Hop Limit (IPv6) field of sent packets to this value |
dscp | int | -1 |
if not -1, set the DSCP field (on IPv4/IPv6) of sent packets to this value |
tos | int | -1 |
if not -1, set the Type Of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value |
stopOperationExtraTime | double | -1s |
extra time after lifecycle stop operation finished |
stopOperationTimeout | double | 2s |
timeout value for lifecycle stop operation |
Properties
Name | Value | Description |
---|---|---|
display | i=block/app | |
lifecycleSupport |
Gates
Name | Direction | Size | Description |
---|---|---|---|
socketIn | input | ||
socketOut | output |
Signals
Name | Type | Unit |
---|---|---|
packetSent | inet::Packet | |
reqStreamBytes | long |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetSent | packets sent | packetSent | count, sum(packetBytes), vector(packetBytes) | none | |
reqStreamBytes | requested stream bytes | count, sum, vector | none |
Scheduled messages (observed)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 0 | VideoStreamTmr |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
socketIn | Indication | 1 (UdpStatusInd::UDP_I_ERROR) | UdpErrorIndication | Udp | L3AddressInd, L4PortInd, SocketInd |
socketIn | Packet | 0 (UdpStatusInd::UDP_I_DATA) | Udp | DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd, ErrorRateInd?, Ieee802SapInd?, MacAddressInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, Ieee80211ChannelInd?, Ieee80211ModeInd? |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
socketOut | Packet | 0 (UdpCommandCode::UDP_C_DATA) | Udp | DispatchProtocolReq, L3AddressReq, L4PortReq, SocketReq | |
socketOut | Request | 1 (UdpCommandCode::UDP_C_BIND) | UdpBindCommand | Udp | DispatchProtocolReq, SocketReq |
Packet operations (observed)
chunkType | packetAction |
---|---|
ByteCountChunk | insertAtBack |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
L3AddressInd | getTag |
L3AddressReq | addTagIfAbsent |
L4PortInd | getTag |
L4PortReq | addTagIfAbsent |
SocketInd | findTag |
SocketReq | addTagIfAbsent |
Region Tagging operations (observed)
tagType | tagAction |
---|---|
CreationTimeTag | addTag |
Source code
// // Video stream server. To be used with ~UdpVideoStreamClient. // // The server will wait for incoming "video streaming requests". // When a request arrives, it draws a random video stream size // using the videoSize parameter, and starts streaming to the client. // During streaming, it will send UDP packets of size packetLen at every // sendInterval, until videoSize is reached. The parameters packetLen // and sendInterval can be set to constant values to create CBR traffic, // or to random values (e.g. sendInterval=uniform(1e-6, 1.01e-6)) to // accomodate jitter. // // The server can serve several clients, and several streams per client. // // @see ~UdpVideoStreamClient // simple UdpVideoStreamServer like IApp { parameters: int localPort; // port to listen on volatile double sendInterval @unit(s); // interval between sending video stream packets volatile int packetLen @unit(B); // length of a video packet in bytes volatile int videoSize @unit(B); // length of full a video stream in bytes int timeToLive = default(-1); // if not -1, set the TTL (IPv4) or Hop Limit (IPv6) field of sent packets to this value int dscp = default(-1); // if not -1, set the DSCP field (on IPv4/IPv6) of sent packets to this value int tos = default(-1); // if not -1, set the Type Of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value @display("i=block/app"); @lifecycleSupport; double stopOperationExtraTime @unit(s) = default(-1s); // extra time after lifecycle stop operation finished double stopOperationTimeout @unit(s) = default(2s); // timeout value for lifecycle stop operation @signal[packetSent](type=inet::Packet); @signal[reqStreamBytes](type=long); @statistic[reqStreamBytes](title="requested stream bytes"; record=count,sum,vector; interpolationmode=none); @statistic[packetSent](title="packets sent"; source=packetSent; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); gates: input socketIn @labels(UdpControlInfo/up); output socketOut @labels(UdpControlInfo/down); }File: src/inet/applications/udpapp/UdpVideoStreamServer.ned