Commit f0bc5a6b authored by shengjh's avatar shengjh 🇨🇳
Browse files

Last commit is wrong! Rename HomaPkt.msg to HomaPktBase.msg. add helper class...

Last commit is wrong! Rename HomaPkt.msg to HomaPktBase.msg. add helper class to return info about a HomaPkt.
parent 8ba7b59c
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<buildspec version="4.0">
<dir makemake-options="--deep --meta:recurse --meta:use-exported-include-paths --meta:export-library --meta:use-exported-libs" path="src" type="makemake"/>
<dir makemake-options="--deep -o dctransport --meta:recurse --meta:use-exported-include-paths --meta:export-library --meta:use-exported-libs" path="src" type="makemake"/>
<dir path="." type="custom"/>
</buildspec>
......@@ -16,8 +16,11 @@
*/
MsgSizeDistributions::MsgSizeDistributions(const char* distFileName,
int maxDataBytesPerPkt, InterArrivalDist interArrivalDist,
DistributionChoice sizeDistSelector, double avgRate, int callerHostId)
int maxDataBytesPerPkt,
InterArrivalDist interArrivalDist,
DistributionChoice sizeDistSelector,
double avgRate,
int callerHostId)
: msgSizeProbDistVector()
, msgSizeDestInterarrivalQueue()
, sizeDistSelector(sizeDistSelector)
......
......@@ -17,11 +17,13 @@
#include<iterator>
#include<iostream>
#include "WorkloadSynthesizer.h"
#include "dctrans/transportlayer/homa/HomaPkt.h"
#include "inet/networklayer/common/L3AddressResolver.h"
#include "inet/networklayer/common/NetworkInterface.h"
#include "inet/networklayer/common/InterfaceTable.h"
#include "inet/networklayer/ipv4/Ipv4InterfaceData.h"
namespace inet {
Define_Module(WorkloadSynthesizer);
simsignal_t WorkloadSynthesizer::sentMsgSignal = registerSignal("sentMsg");
......@@ -37,15 +39,20 @@ WorkloadSynthesizer::WorkloadSynthesizer()
sendMsgSize = -1;
nextDestHostId = -1;
hostIdAddrMap.clear();
//
//
maxDataBytesPerEthFrame = MAX_ETHERNET_PAYLOAD_BYTES - IP_HEADER_SIZE - UDP_HEADER_SIZE;
maxDataBytesPerPkt = maxDataBytesPerEthFrame - HomaPktHelper::getHomaPktHeaderSize(PktType::UNSCHED_DATA);
}
WorkloadSynthesizer::~WorkloadSynthesizer()
{
delete msgSizeGenerator;
}
void
WorkloadSynthesizer::registerTemplatedStats(const char* msgSizeRanges)
void WorkloadSynthesizer::registerTemplatedStats(const char* msgSizeRanges)
{
std::stringstream sstream(msgSizeRanges);
std::istream_iterator<uint64_t> begin(sstream);
......@@ -122,162 +129,169 @@ WorkloadSynthesizer::registerTemplatedStats(const char* msgSizeRanges)
}
}
void
WorkloadSynthesizer::initialize()
void WorkloadSynthesizer::initialize(int stage)
{
// read in module parameters
nicLinkSpeed = par("nicLinkSpeed").intValue();
fabricLinkSpeed = par("fabricLinkSpeed").intValue();
edgeLinkDelay = 1e-6 * par("edgeLinkDelay").doubleValue();
fabricLinkDelay = 1e-6 * par("fabricLinkDelay").doubleValue();
hostSwTurnAroundTime = 1e-6 * par("hostSwTurnAroundTime").doubleValue();
hostNicSxThinkTime = 1e-6 * par("hostNicSxThinkTime").doubleValue();
switchFixDelay = 1e-6 * par("switchFixDelay").doubleValue();
isFabricCutThrough = par("isFabricCutThrough").boolValue();
isSingleSpeedFabric = par("isSingleSpeedFabric").boolValue();
startTime = par("startTime").doubleValue();
stopTime = par("stopTime").doubleValue();
xmlConfig = par("appConfig").xmlValue();
// Setup templated statistics ans signals
const char* msgSizeRanges = par("msgSizeRanges").stringValue();
registerTemplatedStats(msgSizeRanges);
// Find host id for parent host module of this app
cModule* parentHost = this->getParentModule();
if (strcmp(parentHost->getName(), "host") != 0) {
throw cRuntimeError("'%s': Not a valid parent module type. Expected"
" \"HostBase\" for parent module type.",
parentHost->getName());
}
parentHostIdx = parentHost->getIndex();
// Initialize the msgSizeGenerator
const char* workLoadType = par("workloadType").stringValue();
MsgSizeDistributions::DistributionChoice distSelector;
std::string distFileName;
if (strcmp(workLoadType, "DCTCP") == 0) {
distSelector = MsgSizeDistributions::DistributionChoice::DCTCP;
distFileName = std::string(
"../../sizeDistributions/DCTCP_MsgSizeDist.txt");
} else if (strcmp(workLoadType, "TEST_DIST") == 0) {
distSelector = MsgSizeDistributions::DistributionChoice::TEST_DIST;
distFileName = std::string(
"../../sizeDistributions/TestDistribution.txt");
} else if (strcmp(workLoadType, "FACEBOOK_KEY_VALUE") == 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::FACEBOOK_KEY_VALUE;
distFileName = std::string(
"../../sizeDistributions/FacebookKeyValueMsgSizeDist.txt");
} else if (strcmp(workLoadType, "FACEBOOK_WEB_SERVER_INTRACLUSTER")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_WEB_SERVER_INTRACLUSTER;
distFileName = std::string("../../sizeDistributions/"
"Facebook_WebServerDist_IntraCluster.txt");
} else if (strcmp(workLoadType, "FACEBOOK_CACHE_FOLLOWER_INTRACLUSTER")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_CACHE_FOLLOWER_INTRACLUSTER;
distFileName = std::string("../../sizeDistributions/"
"Facebook_CacheFollowerDist_IntraCluster.txt");
} else if (strcmp(workLoadType, "GOOGLE_ALL_RPC")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
GOOGLE_ALL_RPC;
distFileName = std::string("../../sizeDistributions/"
"Google_AllRPC.txt");
} else if (strcmp(workLoadType, "FACEBOOK_HADOOP_ALL")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_HADOOP_ALL;
distFileName = std::string("../../sizeDistributions/"
"Facebook_HadoopDist_All.txt");
} else if (strcmp(workLoadType, "FABRICATED_HEAVY_MIDDLE")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FABRICATED_HEAVY_MIDDLE;
distFileName = std::string("../../sizeDistributions/"
"Fabricated_Heavy_Middle.txt");
} else if (strcmp(workLoadType, "GOOGLE_SEARCH_RPC")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::GOOGLE_SEARCH_RPC;
distFileName = std::string("../../sizeDistributions/"
"Google_SearchRPC.txt");
} else if (strcmp(workLoadType, "FABRICATED_HEAVY_HEAD")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FABRICATED_HEAVY_HEAD;
distFileName = std::string("../../sizeDistributions/"
"Fabricated_Heavy_Head.txt");
} else if (strcmp(workLoadType, "PRESET_IN_FILE") == 0){
distSelector =
MsgSizeDistributions::DistributionChoice::SIZE_IN_FILE;
distFileName = std::string(
"../../sizeDistributions/HostidSizeInterarrival.txt");
} else {
throw cRuntimeError("'%s': Not a valie workload type.",workLoadType);
}
ApplicationBase::initialize(stage);
if (stage == INITSTAGE_LOCAL) {
// read in module parameters
nicLinkSpeed = par("nicLinkSpeed").intValue();
fabricLinkSpeed = par("fabricLinkSpeed").intValue();
edgeLinkDelay = 1e-6 * par("edgeLinkDelay").doubleValue();
fabricLinkDelay = 1e-6 * par("fabricLinkDelay").doubleValue();
hostSwTurnAroundTime = 1e-6 * par("hostSwTurnAroundTime").doubleValue();
hostNicSxThinkTime = 1e-6 * par("hostNicSxThinkTime").doubleValue();
switchFixDelay = 1e-6 * par("switchFixDelay").doubleValue();
isFabricCutThrough = par("isFabricCutThrough").boolValue();
isSingleSpeedFabric = par("isSingleSpeedFabric").boolValue();
startTime = par("startTime").doubleValue();
stopTime = par("stopTime").doubleValue();
xmlConfig = par("appConfig").xmlValue();
// Setup templated statistics ans signals
const char* msgSizeRanges = par("msgSizeRanges").stringValue();
registerTemplatedStats(msgSizeRanges);
// Find host id for parent host module of this app
cModule* parentHost = this->getParentModule();
if (strcmp(parentHost->getName(), "host") != 0) {
throw cRuntimeError("'%s': Not a valid parent module type. Expected"
" \"HostBase\" for parent module type.",
parentHost->getName());
}
parentHostIdx = parentHost->getIndex();
// Initialize the msgSizeGenerator
const char* workLoadType = par("workloadType").stringValue();
MsgSizeDistributions::DistributionChoice distSelector;
std::string distFileName;
if (strcmp(workLoadType, "DCTCP") == 0) {
distSelector = MsgSizeDistributions::DistributionChoice::DCTCP;
distFileName = std::string(
"../../sizeDistributions/DCTCP_MsgSizeDist.txt");
} else if (strcmp(workLoadType, "TEST_DIST") == 0) {
distSelector = MsgSizeDistributions::DistributionChoice::TEST_DIST;
distFileName = std::string(
"../../sizeDistributions/TestDistribution.txt");
} else if (strcmp(workLoadType, "FACEBOOK_KEY_VALUE") == 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::FACEBOOK_KEY_VALUE;
distFileName = std::string(
"../../sizeDistributions/FacebookKeyValueMsgSizeDist.txt");
} else if (strcmp(workLoadType, "FACEBOOK_WEB_SERVER_INTRACLUSTER")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_WEB_SERVER_INTRACLUSTER;
distFileName = std::string("../../sizeDistributions/"
"Facebook_WebServerDist_IntraCluster.txt");
} else if (strcmp(workLoadType, "FACEBOOK_CACHE_FOLLOWER_INTRACLUSTER")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_CACHE_FOLLOWER_INTRACLUSTER;
distFileName = std::string("../../sizeDistributions/"
"Facebook_CacheFollowerDist_IntraCluster.txt");
} else if (strcmp(workLoadType, "GOOGLE_ALL_RPC")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
GOOGLE_ALL_RPC;
distFileName = std::string("../../sizeDistributions/"
"Google_AllRPC.txt");
} else if (strcmp(workLoadType, "FACEBOOK_HADOOP_ALL")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FACEBOOK_HADOOP_ALL;
distFileName = std::string("../../sizeDistributions/"
"Facebook_HadoopDist_All.txt");
} else if (strcmp(workLoadType, "FABRICATED_HEAVY_MIDDLE")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FABRICATED_HEAVY_MIDDLE;
distFileName = std::string("../../sizeDistributions/"
"Fabricated_Heavy_Middle.txt");
} else if (strcmp(workLoadType, "GOOGLE_SEARCH_RPC")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::GOOGLE_SEARCH_RPC;
distFileName = std::string("../../sizeDistributions/"
"Google_SearchRPC.txt");
} else if (strcmp(workLoadType, "FABRICATED_HEAVY_HEAD")
== 0) {
distSelector =
MsgSizeDistributions::DistributionChoice::
FABRICATED_HEAVY_HEAD;
distFileName = std::string("../../sizeDistributions/"
"Fabricated_Heavy_Head.txt");
} else if (strcmp(workLoadType, "PRESET_IN_FILE") == 0){
distSelector =
MsgSizeDistributions::DistributionChoice::SIZE_IN_FILE;
distFileName = std::string(
"../../sizeDistributions/HostidSizeInterarrival.txt");
} else {
throw cRuntimeError("'%s': Not a valie workload type.",workLoadType);
}
HomaPkt homaPkt = HomaPkt();
homaPkt.setPktType(PktType::UNSCHED_DATA);
maxDataBytesPerEthFrame =
MAX_ETHERNET_PAYLOAD_BYTES - IP_HEADER_SIZE - UDP_HEADER_SIZE;
maxDataBytesPerPkt = maxDataBytesPerEthFrame - homaPkt.headerSize();
MsgSizeDistributions::InterArrivalDist interArrivalDist;
if (strcmp(par("interArrivalDist").stringValue(), "exponential") == 0) {
interArrivalDist = MsgSizeDistributions::InterArrivalDist::EXPONENTIAL;
} else if (strcmp(par("interArrivalDist").stringValue(),
"preset_in_file") == 0) {
interArrivalDist =
MsgSizeDistributions::InterArrivalDist::INTERARRIVAL_IN_FILE;
} else if (strcmp(par("interArrivalDist").stringValue(),
"facebook_key_value") == 0){
interArrivalDist =
MsgSizeDistributions::InterArrivalDist::FACEBOOK_PARETO;
} else {
throw cRuntimeError("'%s': Not a valid Interarrival Distribution",
par("interArrivalDist").stringValue());
}
double avgRate = par("loadFactor").doubleValue() * nicLinkSpeed;
msgSizeGenerator = new MsgSizeDistributions(distFileName.c_str(),
maxDataBytesPerPkt, interArrivalDist, distSelector, avgRate,
parentHostIdx);
// Send timer settings
if (stopTime >= SIMTIME_ZERO && stopTime < startTime)
throw cRuntimeError("Invalid startTime/stopTime parameters");
MsgSizeDistributions::InterArrivalDist interArrivalDist;
if (strcmp(par("interArrivalDist").stringValue(), "exponential") == 0) {
interArrivalDist = MsgSizeDistributions::InterArrivalDist::EXPONENTIAL;
} else if (strcmp(par("interArrivalDist").stringValue(),
"preset_in_file") == 0) {
interArrivalDist =
MsgSizeDistributions::InterArrivalDist::INTERARRIVAL_IN_FILE;
} else if (strcmp(par("interArrivalDist").stringValue(),
"facebook_key_value") == 0){
interArrivalDist =
MsgSizeDistributions::InterArrivalDist::FACEBOOK_PARETO;
} else {
throw cRuntimeError("'%s': Not a valid Interarrival Distribution",
par("interArrivalDist").stringValue());
}
selfMsg = new cMessage("sendTimer");
simtime_t start = std::max(startTime, simTime());
if ((stopTime < SIMTIME_ZERO) || (start < stopTime)) {
selfMsg->setKind(START);
scheduleAt(start, selfMsg);
}
double avgRate = par("loadFactor").doubleValue() * nicLinkSpeed;
msgSizeGenerator = new MsgSizeDistributions(distFileName.c_str(),
maxDataBytesPerPkt, interArrivalDist, distSelector, avgRate,
parentHostIdx);
// Send timer settings
if (stopTime >= SIMTIME_ZERO && stopTime < startTime)
throw cRuntimeError("Invalid startTime/stopTime parameters");
selfMsg = new cMessage("sendTimer");
simtime_t start = std::max(startTime, simTime());
if ((stopTime < SIMTIME_ZERO) || (start < stopTime)) {
selfMsg->setKind(START);
scheduleAt(start, selfMsg);
}
if (stopTime < SIMTIME_ZERO) {
stopTime = SIMTIME_MAX;
}
if (stopTime < SIMTIME_ZERO) {
stopTime = SIMTIME_MAX;
// Initialize statistic tracker variables
numSent = 0;
numReceived = 0;
WATCH(numSent);
WATCH(numReceived);
}
// Initialize statistic tracker variables
numSent = 0;
numReceived = 0;
WATCH(numSent);
WATCH(numReceived);
}
void WorkloadSynthesizer::handleStartOperation(LifecycleOperation *operation) {
}
void WorkloadSynthesizer::handleStopOperation(LifecycleOperation *operation) {
void
WorkloadSynthesizer::parseAndProcessXMLConfig()
}
void WorkloadSynthesizer::handleCrashOperation(LifecycleOperation *operation) {
}
void WorkloadSynthesizer::parseAndProcessXMLConfig()
{
// determine if this app is also a sender or only a receiver
const char* isSenderParam =
......@@ -339,8 +353,13 @@ WorkloadSynthesizer::parseAndProcessXMLConfig()
}
}
void WorkloadSynthesizer::handleMessageWhenUp(cMessage *msg) {
//do nothing;
}
void
WorkloadSynthesizer::handleMessage(cMessage *msg)
WorkloadSynthesizer::handleSelfMessage(cMessage *msg)
{
if (msg->isSelfMessage()) {
ASSERT(msg == selfMsg);
......@@ -412,12 +431,12 @@ WorkloadSynthesizer::processStart()
inet::InterfaceTable* ifaceTable =
check_and_cast<inet::InterfaceTable*>(
getModuleByPath(par("interfaceTableModule").stringValue()));
inet::InterfaceEntry* srcIface = nullptr;
inet::Ipv4InterfaceData* srcIPv4Data = nullptr;
inet::NetworkInterface* srcIface = nullptr;
auto srcIPv4Data = srcIface->findProtocolData<inet::Ipv4InterfaceData>();
for (int i=0; i < ifaceTable->getNumInterfaces(); i++) {
if ((srcIface = ifaceTable->getInterface(i))
if ( (srcIface = ifaceTable->getInterface(i))
&& !srcIface->isLoopback()
&& (srcIPv4Data = srcIface->findProtocolData<inet::Ipv4InterfaceData>())) {
&& srcIPv4Data ) {
break;
}
}
......@@ -621,7 +640,7 @@ WorkloadSynthesizer::idealMsgEndToEndDelay(AppMessage* rcvdMsg)
// src and dest in the same rack
totalSwitchDelay = edgeSwitchFixDelay;
if (!isFabricCutThrough) {
totalSwitchDelay =+ edgeSwitchSerialDelay;
totalSwitchDelay += edgeSwitchSerialDelay;
}
// Add 2 edge link delays
......@@ -667,10 +686,20 @@ WorkloadSynthesizer::idealMsgEndToEndDelay(AppMessage* rcvdMsg)
return msgSerializationDelay + totalSwitchDelay + hostDelayOverheads;
}
void
WorkloadSynthesizer::finish()
void WorkloadSynthesizer::refreshDisplay() const
{
ApplicationBase::refreshDisplay();
char buf[40];
sprintf(buf, "sent: %d pks\nrcvd: %d pks", numSent, numReceived);
getDisplayString().setTagArg("t", 0, buf);
}
void WorkloadSynthesizer::finish()
{
recordScalar("packets sent", numSent);
recordScalar("packets received", numReceived);
cancelAndDelete(selfMsg);
}
}
......@@ -15,17 +15,23 @@
#ifndef __HOMATRANSPORT_WORKLOADSYNTHESIZER_H_
#define __HOMATRANSPORT_WORKLOADSYNTHESIZER_H_
#include <dctrans/common/Minimal.h>
#include "dctrans/common/DCTRANSDefs.h"
#include <vector>
#include <string>
#include <unordered_map>
#include <sstream>
#include "dctrans/common/Minimal.h"
#include "dctrans/common/DCTRANSDefs.h"
#include "inet/networklayer/common/L3Address.h"
#include "inet/applications/base/ApplicationBase.h"
#include "MsgSizeDistributions.h"
#include "AppMessage_m.h"
#include "dctrans/transportlayer/homa/HomaConfigDepot.h"
#include "dctrans/transportlayer/homa/HomaPkt_m.h"
#include "dctrans/transportlayer/homa/HomaPktHelper.h"
namespace inet {
/**
* Mocks message generating behaviour of an application. Given a messge size
......@@ -33,7 +39,7 @@
* message sizes of that distribution and sends them in interarrival times
* sampled from the interarrival distribution.
*/
class WorkloadSynthesizer : public cSimpleModule
class WorkloadSynthesizer : public ApplicationBase
{
public:
WorkloadSynthesizer();
......@@ -76,6 +82,7 @@ class WorkloadSynthesizer : public cSimpleModule
std::unordered_map<int, inet::L3Address> hostIdAddrMap;
// statistics
// TODO:is int enough?
int numSent;
int numReceived;
......@@ -101,10 +108,19 @@ class WorkloadSynthesizer : public cSimpleModule
static simsignal_t mesgStatsSignal;
protected:
virtual void initialize();
virtual void handleMessage(cMessage* msg);
virtual void finish();
virtual void initialize(int stage) override;
virtual int numInitStages() const override { return NUM_INIT_STAGES; }
virtual void handleMessageWhenUp(cMessage *msg) override;
virtual void handleSelfMessage(cMessage *msg);
// Lifecycle methods
virtual void handleStartOperation(LifecycleOperation *operation) override;
virtual void handleStopOperation(LifecycleOperation *operation) override;
virtual void handleCrashOperation(LifecycleOperation *operation) override;
//virtual void handleMessage(cMessage* msg);
virtual void finish() override;
virtual void refreshDisplay() const override;
inet::L3Address chooseDestAddr();
void processStart();
void processSend();
......@@ -132,4 +148,5 @@ class MesgStats : public cObject, noncopyable
simtime_t transportSchedDelay;
};
}
#endif //__HOMATRANSPORT_WORKLOADSYNTHESIZER_H_
/*
* DCTRANSDefs.h
*
* Created on: 202169
* Created on: 2021��6��9��
* Author: USER
*/
......@@ -33,7 +33,19 @@ using namespace omnetpp;
//using omnetpp::getThisPtr; //This is only for EV_INFO!!
using std::cout;
using std::endl;
/**
* All of the constants packet and header byte sizes for different types of
* datagrams.
*/
static const uint32_t ETHERNET_PREAMBLE_SIZE = 8;
static const uint32_t ETHERNET_HDR_SIZE = 14;
static const uint32_t MAX_ETHERNET_PAYLOAD_BYTES = 1500;
static const uint32_t MIN_ETHERNET_PAYLOAD_BYTES = 46;
static const uint32_t MIN_ETHERNET_FRAME_SIZE = 64;
static const uint32_t IP_HEADER_SIZE = 20;
static const uint32_t UDP_HEADER_SIZE = 8;
static const uint32_t ETHERNET_CRC_SIZE = 4;
static const uint32_t INTER_PKT_GAP = 12;
#endif /* DCTRANS_COMMON_DCTRANSDEFS_H_ */
/*
* Util.cc
*
* Created on: Jan 27, 2016
* Author: behnamm
*/
#include "Util.h"
#include "dctrans/transportlayer/homa/HomaTransport.h"
Register_ResultFilter("homaMsgSize", HomaMsgSizeFilter);
Register_ResultFilter("homaPktBytes", HomaPktBytesFilter);
Register_ResultFilter("homaUnschedPktBytes", HomaUnschedPktBytesFilter);
Register_ResultFilter("homaGrantPktBytes", HomaGrantPktBytesFilter);
void
HomaMsgSizeFilter::receiveSignal(cResultFilter *prev, simtime_t_cref t, cObject *object, cObject *details)
{
HomaPkt* homaPkt = check_and_cast<HomaPkt*>(object);
uint32_t msgSize;
PktType pktType = (PktType)homaPkt->getPktType();
switch (pktType) {
case PktType::REQUEST:
case PktType::UNSCHED_DATA:
msgSize = homaPkt->getUnschedFields().msgByteLen;
break;
case PktType::SCHED_DATA:
case PktType::GRANT: {
HomaTransport::InboundMessage* inbndMsg;
HomaTransport::OutboundMessage* outMsg;
HomaTransport* transport = homaPkt->ownerTransport;
if ((inbndMsg =
transport->rxScheduler.lookupInboundMesg(homaPkt))) {
msgSize = inbndMsg->getMsgSize();
} else {
outMsg = &(transport->sxController.getOutboundMsgMap()->at(
homaPkt->getMsgId()));
ASSERT((transport->getLocalAddr() == homaPkt->getDestAddr()
&& pktType == PktType::GRANT) ||
(transport->getLocalAddr() == homaPkt->getSrcAddr()
&& pktType == PktType::SCHED_DATA));
msgSize = outMsg->getMsgSize();
}
break;
}
default:
throw cRuntimeError("PktType %d is not known!", pktType);
}
fire(this, t , (double)msgSize, details);
}
void
HomaPktBytesFilter::receiveSignal(cResultFilter *prev, simtime_t_cref t, cObject *object, cObject *details)
{