78 throw cRuntimeError(
"Application is not running");
80 EV_INFO <<
"Received packet `" << msg->getName() <<
"'\n";
81 EtherAppReq *req = check_and_cast<EtherAppReq *>(msg);
85 Ieee802Ctrl *ctrl = check_and_cast<Ieee802Ctrl *>(req->removeControlInfo());
86 MACAddress srcAddr = ctrl->getSrc();
87 int srcSap = ctrl->getSsap();
88 long requestId = req->getRequestId();
89 long replyBytes = req->getResponseBytes();
93 for (
int k = 0; replyBytes > 0;
k++) {
98 s << msg->getName() <<
"-resp-" <<
k;
100 EtherAppResp *datapacket =
new EtherAppResp(s.str().c_str(),
IEEE802CTRL_DATA);
101 datapacket->setRequestId(requestId);
102 datapacket->setByteLength(l);
104 EV_INFO <<
"Send response `" << datapacket->getName() <<
"' to " << srcAddr <<
" ssap=" <<
localSAP <<
" dsap=" << srcSap <<
" length=" << l <<
"B requestId=" << requestId <<
"\n";
Definition: Ieee802Ctrl_m.h:54
int localSAP
Definition: EtherAppSrv.h:38
long packetsReceived
Definition: EtherAppSrv.h:43
#define MAX_REPLY_CHUNK_SIZE
Definition: EtherAppSrv.h:30
void sendPacket(cPacket *datapacket, const MACAddress &destAddr, int destSap)
Definition: EtherAppSrv.cc:112
virtual bool isNodeUp()
Definition: EtherAppSrv.cc:57
value< double, units::s > s
Definition: Units.h:1049
static simsignal_t rcvdPkSignal
Definition: EtherAppSrv.h:45
const double k
Definition: QAM16Modulation.cc:24