39 if(h >= maxHCount) { h = maxHCount; }
42 return qos +
"_" + to_string(h);
53 maxHCount = par(
"maxHCount").longValue();
54 if(maxHCount <= 0) { maxHCount = 1; }
56 cXMLElement* Xml = NULL;
57 if (par(
"data").xmlValue() != NULL && par(
"data").xmlValue()->hasChildren()) {
58 Xml = par(
"data").xmlValue();
60 cXMLElementList nodeList = Xml->getChildrenByTagName(
"node");
61 for(
auto & node : nodeList) {
62 if(!node->getAttribute(
"addr")) { error(
"node/addr parameter not initialized!"); }
63 if(!node->getAttribute(
"qos")) { error(
"node/qos parameter not initialized!"); }
64 if(!node->getAttribute(
"d")) { error(
"node/d parameter not initialized!"); }
66 string addr = node->getAttribute(
"addr");
67 string qos = node->getAttribute(
"qos");
68 int d = atoi(node->getAttribute(
"d"));
71 hCount[qos][addr] = d;
76 (getModuleByPath(par(
"genModPath").stdstringValue().c_str()));
83 (getModuleByPath(par(
"genModPath").stdstringValue().c_str()));
88 hCount[qos][addr] = d;
std::string getQoSId() const
Getter of selected QoS-cube identifier.
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
void registerQidsGen(IDPerNQoSxPLen *qId)
const std::string VAL_MGMTQOSID
virtual ConnectionId & getConnId()
void unregisterQidsGen(IDPerNQoSxPLen *qId)
virtual Address & getDstAddr()
string generateOutputQueueID(PDU *pdu)
string generateInputQueueID(PDU *pdu)
Define_Module(IDPerNQoSxPLen)
virtual unsigned int getHopCount() const
const std::string & getName() const
Gets APN string name representation.
void setDistance(string addr, string qos, int d)