Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void TxControlPolicyTCPTahoe::initialize(int step)
if(step == 0){
sigStatTCPTahoeCWND = registerSignal("TCP_Tahoe_CWND");
}
packetSize = par("packetSize").longValue();
packetSize = par("packetSize");
ackPolicy = check_and_cast<SenderAckPolicyTCP *>(getModuleByPath("^.senderAckPolicy"));//^.^.efcp
}

Expand Down
4 changes: 2 additions & 2 deletions policies/DIF/FA/MultilevelQoS/QoSIdComparer/QoSIdComparer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
Define_Module(QoSIdComparer);

void QoSIdComparer::initialize() {
mHops = par("maxHops").longValue();
mlBandw = par("mulBandw").longValue();
mHops = par("maxHops");
mlBandw = par("mulBandw");
setPolicyDisplayString(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
Define_Module(QoSMinComparer);

void QoSMinComparer::initialize() {
mHops = par("maxHops").longValue();
mlBandw = par("mulBandw").longValue();
mHops = par("maxHops");
mlBandw = par("mulBandw");
setPolicyDisplayString(this);
}

Expand Down
8 changes: 4 additions & 4 deletions policies/DIF/RA/PDUFG/GRE/Centralized/GRE_ClosFabric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ void GRE_ClosFabric::onPolicyInit() {
fwd = getRINAModule<Clos1 *>(this, 2,
{ MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD });

f = par("fabrics").longValue();
p = par("pods").longValue();
s = par("spines").longValue();
t = par("tors").longValue();
f = par("fabrics");
p = par("pods");
s = par("spines");
t = par("tors");

rawAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();
dif = getModuleByPath("^.^")->par("difName").stringValue();
Expand Down
8 changes: 4 additions & 4 deletions policies/DIF/RA/PDUFG/GRE/Centralized/GRE_ClosSpine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ void GRE_ClosSpine::onPolicyInit(){
rt = getRINAModule<RoutingDumb *>(this, 2, {MOD_POL_ROUTING});
fwd = getRINAModule<Clos2 *>(this, 2, {MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD});

f = par("fabrics").longValue();
p = par("pods").longValue();
s = par("spines").longValue();
t = par("tors").longValue();
f = par("fabrics");
p = par("pods");
s = par("spines");
t = par("tors");

rawAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();
dif = getModuleByPath("^.^")->par("difName").stringValue();
Expand Down
8 changes: 4 additions & 4 deletions policies/DIF/RA/PDUFG/GRE/Centralized/GRE_ClosToR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ void GRE_ClosToR::onPolicyInit() {
fwd = getRINAModule<Clos0 *>(this, 2,
{ MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD });

f = par("fabrics").longValue();
p = par("pods").longValue();
s = par("spines").longValue();
t = par("tors").longValue();
f = par("fabrics");
p = par("pods");
s = par("spines");
t = par("tors");

rawAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();
dif = getModuleByPath("^.^")->par("difName").stringValue();
Expand Down
8 changes: 4 additions & 4 deletions policies/DIF/RA/PDUFG/GRE/ClosRouting/GRE_ClosR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ void GRE_ClosR::removedFlow(const Address &addr, const QoSCube& qos, RMTPort * p

// Called after initialize
void GRE_ClosR::onPolicyInit(){
f = par("fabrics").longValue();
p = par("pods").longValue();
s = par("spines").longValue();
t = par("tors").longValue();
f = par("fabrics");
p = par("pods");
s = par("spines");
t = par("tors");

//Set Forwarding policy
fwd = getRINAModule<GREFWD *>(this, 2, {MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD});
Expand Down
2 changes: 1 addition & 1 deletion policies/DIF/RA/PDUFG/GRE/ClosStatic/GRE_Clos0S.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void GRE_ClosS0::routingUpdated(){}

// Called after initialize
void GRE_ClosS0::onPolicyInit(){
f = par("fabrics").longValue();
f = par("fabrics");

//Set Forwarding policy
fwd = getRINAModule<Clos0 *>(this, 2, {MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD});
Expand Down
6 changes: 3 additions & 3 deletions policies/DIF/RA/PDUFG/GRE/ClosStatic/GRE_Clos1S.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ void GRE_ClosS1::routingUpdated(){}

// Called after initialize
void GRE_ClosS1::onPolicyInit(){
f = par("spineS").longValue();
t = par("TEs").longValue();
s = par("spines").longValue();
f = par("spineS");
t = par("TEs");
s = par("spines");

//Set Forwarding policy
fwd = getRINAModule<Clos1 *>(this, 2, {MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD});
Expand Down
4 changes: 2 additions & 2 deletions policies/DIF/RA/PDUFG/GRE/ClosStatic/GRE_Clos2S.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ void GRE_ClosS2::routingUpdated(){}

// Called after initialize
void GRE_ClosS2::onPolicyInit(){
p = par("pods").longValue();
s = par("spineS").longValue();
p = par("pods");
s = par("spineS");

//Set Forwarding policy
fwd = getRINAModule<Clos2 *>(this, 2, {MOD_RELAYANDMUX, MOD_POL_RMT_PDUFWD});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void IQoSAwareMEntries::onPolicyInit(){
mType infMetric = par("infinite");
rt->setInfinite(infMetric);

maxLat = par("maxLat").longValue();
maxLat = par("maxLat");

string myAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();

Expand Down
14 changes: 7 additions & 7 deletions policies/DIF/RA/PDUFG/LatGenerator/LatGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ bool portMetric::operator < (const portMetric &other) const {
void LatGenerator::insertedFlow(const Address &addr, const QoSCube &qos, RMTPort * port){
std::string dst = addr.getIpcAddress().getName();

unsigned short metric = qos.getDelay()/par("redLinkCost").longValue();
unsigned short metric = qos.getDelay() / static_cast<long>(par("redLinkCost"));

if(metric < par("minLinkCost").longValue()) {
metric = par("minLinkCost").longValue();
} else if(metric > par("maxLinkCost").longValue()) {
metric = par("maxLinkCost").longValue();
if(metric < static_cast<long>(par("minLinkCost"))) {
metric = par("minLinkCost");
} else if(metric > static_cast<long>(par("maxLinkCost"))) {
metric = par("maxLinkCost");
}

if(qos.getQosId() == qos.MANAGEMENT.getQosId() || qos.getQosId() == VAL_UNDEF_QOSID) {
metric = par("maxLinkCost").longValue();
metric = par("maxLinkCost");
}

neighbours[dst].insert(portMetric(port, metric));
Expand All @@ -79,7 +79,7 @@ void LatGenerator::removedFlow(const Address &addr, const QoSCube& qos, RMTPort
neighbours.erase(dst);
routingUpdated();
} else {
unsigned short min = par("maxLinkCost").longValue();
unsigned short min = par("maxLinkCost");
for(portMetric mt : neighbours[dst]) {
if(min >= mt.metric) { min = mt.metric; }
}
Expand Down
14 changes: 7 additions & 7 deletions policies/DIF/RA/PDUFG/LatencySingle1Entry/LatencySingle1Entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ bool portMetric::operator < (const portMetric &other) const {
void LatencySingle1Entry::insertedFlow(const Address &addr, const QoSCube &qos, RMTPort * port){
string dst = addr.getIpcAddress().getName();

mType metric = qos.getDelay()/par("redLinkCost").longValue();
mType metric = qos.getDelay() / static_cast<long>(par("redLinkCost"));

if(metric < par("minLinkCost").longValue()) {
metric = par("minLinkCost").longValue();
} else if(metric > par("maxLinkCost").longValue()) {
metric = par("maxLinkCost").longValue();
if(metric < static_cast<long>(par("minLinkCost"))) {
metric = par("minLinkCost");
} else if(metric > static_cast<long>(par("maxLinkCost"))) {
metric = par("maxLinkCost");
}

if(qos.getQosId() == qos.MANAGEMENT.getQosId() || qos.getQosId() == VAL_UNDEF_QOSID) {
metric = par("maxLinkCost").longValue();
metric = par("maxLinkCost");
}

neighbours[dst].insert(portMetric(port, metric));
Expand All @@ -72,7 +72,7 @@ void LatencySingle1Entry::removedFlow(const Address &addr, const QoSCube& qos, R
neighbours.erase(dst);
routingUpdated();
} else {
unsigned short min = par("maxLinkCost").longValue();
unsigned short min = par("maxLinkCost");
for(portMetric mt : neighbours[dst]) {
if(min >= mt.metric) { min = mt.metric; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ bool portMetric::operator < (const portMetric &other) const {
void LatencySingleMEntries::insertedFlow(const Address &addr, const QoSCube &qos, RMTPort * port){
string dst = addr.getIpcAddress().getName();

mType metric = qos.getDelay()/par("redLinkCost").longValue();
mType metric = qos.getDelay() / static_cast<long>(par("redLinkCost"));

if(metric < par("minLinkCost").longValue()) {
metric = par("minLinkCost").longValue();
} else if(metric > par("maxLinkCost").longValue()) {
metric = par("maxLinkCost").longValue();
if(metric < static_cast<long>(par("minLinkCost"))) {
metric = par("minLinkCost");
} else if(metric > static_cast<long>(par("maxLinkCost"))) {
metric = par("maxLinkCost");
}

if(qos.getQosId() == qos.MANAGEMENT.getQosId() || qos.getQosId() == VAL_UNDEF_QOSID) {
metric = par("maxLinkCost").longValue();
metric = par("maxLinkCost");
}

neighbours[dst].insert(portMetric(port, metric));
Expand All @@ -72,7 +72,7 @@ void LatencySingleMEntries::removedFlow(const Address &addr, const QoSCube& qos,
neighbours.erase(dst);
routingUpdated();
} else {
unsigned short min = par("maxLinkCost").longValue();
unsigned short min = par("maxLinkCost");
for(portMetric mt : neighbours[dst]) {
if(min >= mt.metric) { min = mt.metric; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void PLQoSAwareMEntries::onPolicyInit(){
mType infMetric = par("infinite");
rt->setInfinite(infMetric);

maxLat = par("maxLat").longValue();
maxLat = par("maxLat");

string myAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();

Expand Down
2 changes: 1 addition & 1 deletion policies/DIF/RA/PDUFG/QoSAwareMEntries/QoSAwareMEntries.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void QoSAwareMEntries::onPolicyInit(){
mType infMetric = par("infinite");
rt->setInfinite(infMetric);

maxLat = par("maxLat").longValue();
maxLat = par("maxLat");

string myAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void SimpleLatOrHopMEntries::onPolicyInit(){
mType infMetric = par("infinite");
rt->setInfinite(infMetric);

maxLat = par("maxLat").longValue();
maxLat = par("maxLat");

string myAddr = getModuleByPath("^.^")->par("ipcAddress").stringValue();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ void QueuePerNQoSxPLen::onNM1PortInit(RMTPort* port) {


void QueuePerNQoSxPLen::onPolicyInit() {
maxHCount = par("maxHCount").longValue();
maxHCount = par("maxHCount");
if(maxHCount <= 0) { maxHCount = 1; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ string IDPerNQoSxPLen::generateInputQueueID(PDU* pdu)


void IDPerNQoSxPLen::initialize() {
maxHCount = par("maxHCount").longValue();
maxHCount = par("maxHCount");
if(maxHCount <= 0) { maxHCount = 1; }

cXMLElement* Xml = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Define_Module(IterativeStopMonitor);

void IterativeStopMonitor::onPolicyInit(){
schedMod= getRINAModule<IterativeScheduling*>(this, 1, {MOD_POL_RMT_SCHEDULER});
stopAt = par("stopAt").longValue();
restartAt = par("restartAt").longValue();
stopAt = par("stopAt");
restartAt = par("restartAt");

stopSignal = registerSignal(SIG_EFCP_StopSending);
startSignal = registerSignal(SIG_EFCP_StartSending);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Define_Module(MM_DL_Drop);

void MM_DL_Drop::initialize() {

defaultThreshold = par("defThreshold").longValue();
defaultThreshold = par("defThreshold");
if(defaultThreshold <= 0) { error("Error at DL_Drop. defThreshold must be >0!"); }

cXMLElement* Xml = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MM_DL_Out {
Define_Module(MM_DL_Out);

void MM_DL_Out::initialize() {
defaultPriority = par("defPriority").longValue();
defaultPriority = par("defPriority");
if(defaultPriority < 0) { error("Error at DL_Out. defPriority must be >=0!"); }

maxPriority = defaultPriority;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ QueueConfig::QueueConfig(string _id, int _absThreshold){

void MM_DQ_Drop::initialize() {

defaultThreshold = par("defaultThreshold").longValue();
defaultThreshold = par("defaultThreshold");
if(defaultThreshold < 0) { error("Error at DL_Drop. defThreshold must be >= 0!"); }

cXMLElement* Xml = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ QueueData::QueueData(){


void MM_DQ_Out::initialize() {
defaultPriority = par("defPriority").longValue();
defaultPriority = par("defPriority");
if(defaultPriority < 0) { error("Error at eDL_Out. defPriority must be >=0!"); }

int rateUnit = par("rateUnit").longValue();
int rateUnit = par("rateUnit");
if(defaultPriority < 0) { error("Error at eDL_Out. defPriority must be >=0!"); }

maxPriority = defaultPriority;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ QueueConfig::QueueConfig(string _id, int _absThreshold){

void MM_PDQ_Drop::initialize() {

defaultThreshold = par("defaultThreshold").longValue();
defaultThreshold = par("defaultThreshold");
if(defaultThreshold < 0) { error("Error at DL_Drop. defThreshold must be >= 0!"); }

cXMLElement* Xml = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MM_P_Out {
Define_Module(MM_P_Out);

void MM_P_Out::initialize() {
defaultPriority = par("defPriority").longValue();
defaultPriority = par("defPriority");
if(defaultPriority < 0) { error("Error at P_Out. defPriority must be >=0!"); }


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Define_Module(MM_WFQ_Drop);

void MM_WFQ_Drop::initialize() {

defaultThreshold = par("defThreshold").longValue();
defaultThreshold = par("defThreshold");
if(defaultThreshold <= 0) { error("Error at DL_Drop. defThreshold must be >0!"); }

cXMLElement* Xml = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Define_Module(MM_eDL_Drop);

void MM_eDL_Drop::initialize() {

defaultThreshold = par("defThreshold").longValue();
defaultThreshold = par("defThreshold");
if(defaultThreshold <= 0) { error("Error at DL_Drop. defThreshold must be >0!"); }

defaultAbsThreshold = par("defAbsThreshold").longValue();
defaultAbsThreshold = par("defAbsThreshold");
if(defaultAbsThreshold <= 0) { error("Error at DL_Drop. defAbsThreshold must be >0!"); }

defaultDropProb = par("defDropProb").doubleValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MM_eDL_Out {
Define_Module(MM_eDL_Out);

void MM_eDL_Out::initialize() {
defaultPriority = par("defPriority").longValue();
defaultPriority = par("defPriority");
if(defaultPriority < 0) { error("Error at eDL_Out. defPriority must be >=0!"); }

maxPriority = defaultPriority;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MM_maxDelayLimited_Out {
Define_Module(MM_maxDelayLimited_Out);

void MM_maxDelayLimited_Out::initialize() {
defaultMaxDel = par("defDelay").longValue();
defaultMaxDel = par("defDelay");
if(defaultMaxDel < 0) { error("Error at DL_Out. defDelay must be >=0!"); }


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MM_maxDelay_Out {
Define_Module(MM_maxDelay_Out);

void MM_maxDelay_Out::initialize() {
defaultMaxDel = par("defDelay").longValue();
defaultMaxDel = par("defDelay");
if(defaultMaxDel < 0) { error("Error at DL_Out. defDelay must be >=0!"); }


Expand Down
Loading