37 if(Update * u = dynamic_cast<Update*>(update)) {
38 if(modules.find(u->qos) == modules.end()) {
50 Update * up =
new Update();
51 up->setDestination(dst);
55 for(
const auto & md : modules) {
56 if(&md.second == module) {
69 Enter_Method_Silent();
71 AutoMsg * m =
new AutoMsg();
73 for(
const auto & md : modules) {
74 if(&md.second == module) {
87 virtual void insertFlow(
const Address &addr,
const string &dst,
const string& qos,
const T &metric) {
88 if(modules.find(qos) == modules.end()) {
91 modules[qos].
addFlow(addr, dst, metric);
94 if(modules.find(qos) == modules.end()) {
101 virtual map<string, map<string, nhLMetric<T> > >
getChanges() {
102 map<string, map<string, nhLMetric<T> > > ret;
103 for(
auto & md : modules) {
104 ret[md.first] = md.second.getChanges();
108 virtual map<string, map<string, nhLMetric<T> > >
getAll() {
109 map<string, map<string, nhLMetric<T> > > ret;
110 for(
auto & md : modules) {
111 ret[md.first] = md.second.getAll();
117 if(AutoMsg * m = dynamic_cast<AutoMsg*>(msg)) {
118 if(modules.find(m->qos) == modules.end()) {
139 for(
auto & md : modules) {
140 EV <<
"With QoS \"" << md.first <<
"\"" << endl;
virtual void removeFlow(const Address &addr, const string &dst, const string &qos)
virtual bool processUpdate(Routing_Update *update)
virtual void chSendUpdate(Routing_Update *update, const Address &dst, Routing_Alg_I *module)
virtual void removeFlow(const Address &_nAddr, const string &_addr)
map< string, LS_Module< T > > modules
virtual void chScheduleAt(Routing_Alg_I *module, const simtime_t &t)
virtual map< string, map< string, nhLMetric< T > > > getChanges()
virtual void sendUpdate()
virtual void insertFlow(const Address &addr, const string &dst, const string &qos, const T &metric)
virtual void addFlow(const Address &_nAddr, const string &_addr, const T &_metric)
virtual map< string, map< string, nhLMetric< T > > > getAll()
virtual void onPolicyInit()
void sendUpdate(IntRoutingUpdate *update)
virtual void handleMessage(cMessage *msg)
bool processUpdate(IntRoutingUpdate *update)
Address class holds IPC Process identification.