X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/38dfe4cc823740a962aa1da0f3be0c40582d7648..63ebf4be4ca6a243a64c7ded8df9b96a9d28d3ff:/include/simgrid/s4u/Link.hpp
diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp
index 81c392938b..df89744c97 100644
--- a/include/simgrid/s4u/Link.hpp
+++ b/include/simgrid/s4u/Link.hpp
@@ -30,6 +30,8 @@ class XBT_PUBLIC Link : public simgrid::xbt::Extendable {
kernel::resource::LinkImpl* const pimpl_;
public:
+ enum class SharingPolicy { SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
+
/** @brief Retrieve a link from its name */
static Link* by_name(const char* name);
@@ -50,7 +52,7 @@ public:
/** @brief The sharing policy is a @{link e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: SPLITDUPLEX)
*/
- int sharingPolicy();
+ SharingPolicy sharingPolicy();
/** @brief Returns the current load (in flops per second) */
double getUsage();
@@ -84,6 +86,9 @@ public:
/** @brief Callback signal fired when the state of a Link changes (when it is turned on or off) */
static simgrid::xbt::signal onStateChange;
+ /** @brief Callback signal fired when the bandwidth of a Link changes */
+ static simgrid::xbt::signal on_bandwidth_change;
+
/** @brief Callback signal fired when a communication starts */
static simgrid::xbt::signal onCommunicate;