-#ifndef DOXYGEN
- // Deprecated methods
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); }
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); }
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); }
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_sharing_policy()") SharingPolicy sharingPolicy() {return get_sharing_policy();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_usage()") double getUsage() {return get_usage();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::is_used()") bool isUsed() {return is_used();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth()") double bandwidth() {return get_bandwidth();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency()") double latency() {return get_latency();}
-
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::turn_on()") void turnOn() {turn_on();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::turn_off()") void turnOff() {turn_off();}
-
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_property()") const char* getProperty(const char* key) {return get_property(key);}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::set_property()") void setProperty(const std::string& key,
- const std::string& value)
- {
- set_property(key, value);
- }
-
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_data()") void* getData() {return get_data();}
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::set_data()") void setData(void* d) {set_data(d);}
-
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_state_profile()") void setStateTrace(
- kernel::profile::Profile* profile)
- {
- set_state_profile(profile);
- }
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth_profile()") void setBandwidthTrace(
- kernel::profile::Profile* profile)
- {
- set_bandwidth_profile(profile);
- }
- /** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency_profile()") void setLatencyTrace(
- kernel::profile::Profile* profile)
- {
- set_latency_profile(profile);
- }
-#endif
+/**
+ * @beginrst
+ * A SplitDuplexLink encapsulates the :cpp:class:`links <simgrid::s4u::Link>` which
+ * compose a Split-Duplex link. Remember that a Split-Duplex link is nothing more than
+ * a pair of up/down links.
+ * @endrst
+ */
+class XBT_PUBLIC SplitDuplexLink : public Link {
+public:
+ explicit SplitDuplexLink(kernel::resource::LinkImplIntf* pimpl) : Link(pimpl) {}
+ /** @brief Get the link direction up*/
+ Link* get_link_up() const;
+ /** @brief Get the link direction down */
+ Link* get_link_down() const;
+
+ /** @brief Retrieve a link from its name */
+ static SplitDuplexLink* by_name(const std::string& name);
+};
+
+/**
+ * @beginrst
+ * Another encapsulation for using links in the :cpp:func:`NetZone::add_route`
+ *
+ * When adding a route with split-duplex links, you need to specify the direction of the link
+ * so SimGrid can know exactly which physical link to insert in the route.
+ *
+ * For shared/fat-pipe links, use the :cpp:enum:`Direction::NONE` since they don't have
+ * the concept of UP/DOWN links.
+ * @endrst
+ */
+class XBT_PUBLIC LinkInRoute {
+public:
+ enum class Direction { UP = 2, DOWN = 1, NONE = 0 };
+
+ explicit LinkInRoute(const Link* link) : link_(link) {}
+ LinkInRoute(const Link* link, Direction d) : link_(link), direction_(d) {}
+
+ /** @brief Get direction of this link in the route: UP or DOWN */
+ Direction get_direction() const { return direction_; }
+ /** @brief Get pointer to the link */
+ const Link* get_link() const { return link_; }
+
+private:
+ const Link* link_;
+ Direction direction_ = Direction::NONE;