- double getUsage();
-
- /** @brief Check if the Link is used */
- bool isUsed();
-
- void turnOn();
- void turnOff();
-
- void* getData();
- void setData(void* d);
-
- void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain
- boolean values. */
- void setBandwidthTrace(tmgr_trace_t trace); /*< setup the trace file with bandwidth events (peak speed changes due to
- external load). Trace must contain percentages (value between 0 and 1). */
- void setLatencyTrace(tmgr_trace_t trace); /*< setup the trace file with latency events (peak latency changes due to
- external load). Trace must contain absolute values */
-
- const char* getProperty(const char* key);
- void setProperty(std::string key, std::string value);
+ double get_usage();
+
+ /** @brief Check if the Link is used (at least one flow uses the link) */
+ bool is_used();
+
+ void turn_on();
+ bool is_on() const;
+ void turn_off();
+
+ void* get_data(); /** Should be used only from the C interface. Prefer extensions in C++ */
+ void set_data(void* d);
+
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_state_profile(profile);
+ }
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_bandwidth_profile()") void set_bandwidth_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_bandwidth_profile(profile);
+ }
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_latency_profile()") void set_latency_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_latency_profile(profile);
+ }
+#endif
+
+ /** Setup the profile with states events (ON or OFF). The profile must contain boolean values. */
+ void set_state_profile(kernel::profile::Profile* profile);
+ /** Setup the profile with bandwidth events (peak speed changes due to external load).
+ * The profile must contain percentages (value between 0 and 1). */
+ void set_bandwidth_profile(kernel::profile::Profile* profile);
+ /** Setup the profile file with latency events (peak latency changes due to external load).
+ * The profile must contain absolute values */
+ void set_latency_profile(kernel::profile::Profile* profile);
+
+ const char* get_property(const std::string& key) const;
+ void set_property(const std::string& key, const std::string& value);