Thank you for your fast answer Johannes.
That's the thing that bothers me, why do you have 2 implementations for the same thing? Which one are you finally using?
About what you explain how bundle priority is working, I have figured it more or less reading the code, but it would be really helpful to now where specifically in the code is this ordered list defined, or where "storage sort all the bundles according to the priority and iterate them in this order." is implemented in the code.
I found that this function has something to do about this, but I don't understand really well how it works:
ibrcommon::Mutex https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classibrcommon_1_1Mutex.html _bundleslock;00112 std::setdtn::data::Bundle _bundles;00113 00114 struct CMP_BUNDLE_PRIORITY00115 {00116 bool operator() (const dtn::data::MetaBundle https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html& lhs, const dtn::data::MetaBundle https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html& rhs) const00117 {00118 if (lhs.getPriority https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html#a33826e733a1f3d5fbf0108e8764d509a() == rhs.getPriority https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html#a33826e733a1f3d5fbf0108e8764d509a())00119 return rhs > lhs;00120 00121 return (lhs.getPriority https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html#a33826e733a1f3d5fbf0108e8764d509a()
rhs.getPriority
https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/doxygen/0.8.0/classdtn_1_1data_1_1MetaBundle.html#a33826e733a1f3d5fbf0108e8764d509a());00122 }00123 };00124 00125 std::setdtn::data::MetaBundle, CMP_BUNDLE_PRIORITY _priority_index;00126 std::map<dtn::data::BundleID, ssize_t> _bundle_lengths;00127 00128 size_t _maxsize;00129 size_t _currentsize;
What's the meaning of rhs and lhs? It's maybe _priority_index the ordered list are you talking about? If it's so, where is the sorting process done? I think this function works to compare the priorities, but I can't find the function that pushes forward or pull back the files in the storage sorted list.
Thanks,
Alex López.
May
2013/1/11 Johannes Morgenroth morgenroth@ibr.cs.tu-bs.de
Hello Alex!
Bundle::getPriority() and MetaBundle::getPriority() does exactly the same thing. Both read the corresponding priority encoded in the processing flags. This is defined in the bundle protocol specification (RFC 5050).
The effect is, that bundles with higher priority are delivered preferential to bundles with a lower priority. This is implemented as ordered list in the bundle storages. A storage sort all the bundles according to the priority and iterate them in this order.
That means, a routing module will process the bundles with higher priority first.
Kind regards, Johannes Morgenroth
-- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to ibr-dtn-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn.