|
INET Framework for OMNeT++/OMNEST
|
#include <RtpApplication.h>
◆ RtpApplication()
| inet::RtpApplication::RtpApplication |
( |
| ) |
|
|
inline |
◆ handleMessage()
| void inet::RtpApplication::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
84 if (msgIn->isSelfMessage()) {
85 switch (msgIn->getKind()) {
87 EV_INFO <<
"enterSession" << endl;
89 EV_WARN <<
"Session already entered\n";
93 RtpCiEnterSession *ci =
new RtpCiEnterSession();
99 cMessage *msg =
new RtpControlMsg(
"Enter Session");
100 msg->setControlInfo(ci);
106 EV_INFO <<
"startTransmission" << endl;
108 EV_WARN <<
"Session already left\n";
111 RtpCiSenderControl *ci =
new RtpCiSenderControl();
114 cMessage *msg =
new RtpControlMsg(
"senderModuleControl(PLAY)");
115 msg->setControlInfo(ci);
124 EV_INFO <<
"stopTransmission" << endl;
126 EV_WARN <<
"Session already left\n";
129 RtpCiSenderControl *ci =
new RtpCiSenderControl();
132 cMessage *msg =
new RtpControlMsg(
"senderModuleControl(STOP)");
133 msg->setControlInfo(ci);
139 EV_INFO <<
"leaveSession" << endl;
141 EV_WARN <<
"Session already left\n";
144 RtpCiLeaveSession *ci =
new RtpCiLeaveSession();
145 cMessage *msg =
new RtpControlMsg(
"Leave Session");
146 msg->setControlInfo(ci);
152 throw cRuntimeError(
"Invalid msgKind value %d in message '%s'", msgIn->getKind(), msgIn->getName());
156 cObject *obj = msgIn->removeControlInfo();
157 RtpControlInfo *ci =
dynamic_cast<RtpControlInfo *
>(obj);
159 switch (ci->getType()) {
161 EV_INFO <<
"Session Entered" << endl;
162 ssrc = (check_and_cast<RtpCiSessionEntered *>(ci))->getSsrc();
164 EV_INFO <<
"CreateSenderModule" << endl;
165 RtpCiCreateSenderModule *ci =
new RtpCiCreateSenderModule();
169 cMessage *msg =
new RtpControlMsg(
"createSenderModule()");
170 msg->setControlInfo(ci);
175 EV_INFO <<
"Receiver Module : leaveSession" << endl;
182 EV_INFO <<
"Sender Module Created" << endl;
190 RtpCiSenderStatus *rsim = check_and_cast<RtpCiSenderStatus *>(ci);
191 switch (rsim->getStatus()) {
193 EV_INFO <<
"PLAYING" << endl;
197 EV_INFO <<
"FINISHED" << endl;
203 EV_INFO <<
"STOPPED" << endl;
209 throw cRuntimeError(
"Invalid sender status: %d", rsim->getStatus());
216 EV_WARN <<
"Session already left\n";
222 EV_INFO <<
"Sender Module Deleted" << endl;
◆ initialize()
| virtual void inet::RtpApplication::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
◆ numInitStages()
| virtual int inet::RtpApplication::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ bandwidth
| double inet::RtpApplication::bandwidth = 0 |
|
protected |
◆ commonName
| const char* inet::RtpApplication::commonName = nullptr |
|
protected |
◆ destinationAddress
◆ fileName
| const char* inet::RtpApplication::fileName = nullptr |
|
protected |
◆ isActiveSession
| bool inet::RtpApplication::isActiveSession = false |
|
protected |
◆ payloadType
| int inet::RtpApplication::payloadType = -1 |
|
protected |
◆ port
| int inet::RtpApplication::port = -1 |
|
protected |
◆ profileName
| const char* inet::RtpApplication::profileName = nullptr |
|
protected |
◆ sessionEnterDelay
| simtime_t inet::RtpApplication::sessionEnterDelay |
|
protected |
◆ sessionLeaveDelay
| simtime_t inet::RtpApplication::sessionLeaveDelay |
|
protected |
◆ ssrc
| uint32_t inet::RtpApplication::ssrc = 0 |
|
protected |
◆ transmissionStartDelay
| simtime_t inet::RtpApplication::transmissionStartDelay |
|
protected |
◆ transmissionStopDelay
| simtime_t inet::RtpApplication::transmissionStopDelay |
|
protected |
The documentation for this class was generated from the following files:
@ RTPAPP_STOP_TRANSMISSION
Definition: RtpApplication_m.h:56
@ RTP_IFP_SESSION_ENTERED
Definition: RtpInterfacePacket_m.h:93
simtime_t transmissionStartDelay
Definition: RtpApplication.h:28
@ RTP_SENDER_STATUS_FINISHED
Definition: RtpSenderStatusMessage_m.h:67
const char * profileName
Definition: RtpApplication.h:23
@ RTP_SENDER_STATUS_PLAYING
Definition: RtpSenderStatusMessage_m.h:66
@ RTPAPP_START_TRANSMISSION
Definition: RtpApplication_m.h:55
simtime_t sessionLeaveDelay
Definition: RtpApplication.h:30
@ RTP_IFP_SENDER_STATUS
Definition: RtpInterfacePacket_m.h:99
simtime_t transmissionStopDelay
Definition: RtpApplication.h:29
bool isActiveSession
Definition: RtpApplication.h:35
Ipv4Address destinationAddress
Definition: RtpApplication.h:33
@ RTP_CONTROL_PLAY
Definition: RtpSenderControlMessage_m.h:78
int payloadType
Definition: RtpApplication.h:26
@ RTP_CONTROL_STOP
Definition: RtpSenderControlMessage_m.h:82
@ RTP_IFP_SENDER_MODULE_CREATED
Definition: RtpInterfacePacket_m.h:95
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
uint32_t ssrc
Definition: RtpApplication.h:34
@ RTPAPP_LEAVE_SESSION
Definition: RtpApplication_m.h:57
const char * commonName
Definition: RtpApplication.h:22
@ RTP_IFP_SESSION_LEFT
Definition: RtpInterfacePacket_m.h:101
@ RTP_SENDER_STATUS_STOPPED
Definition: RtpSenderStatusMessage_m.h:68
@ RTP_IFP_SENDER_MODULE_DELETED
Definition: RtpInterfacePacket_m.h:97
double bandwidth
Definition: RtpApplication.h:24
@ RTPAPP_ENTER_SESSION
Definition: RtpApplication_m.h:54
int port
Definition: RtpApplication.h:25
const char * fileName
Definition: RtpApplication.h:21