#ifndef SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
#define SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
-#include "src/surf/surf_interface.hpp"
+#include <simgrid/forward.h>
+#include <xbt/signal.hpp>
+#include <xbt/str.h>
+#include <xbt/utility.hpp>
+
+#include <string>
namespace simgrid {
namespace kernel {
* @param event What happened
* @param value [TODO]
*/
- virtual void apply_event(tmgr_trace_event_t event, double value) = 0;
+ virtual void apply_event(TraceEvent* event, double value) = 0;
/** @brief Check if the current Resource is used (if it currently serves an action) */
virtual bool isUsed() = 0;
private:
std::string name_;
Model* model_;
- bool isOn_ = true;
+ bool is_on_ = true;
public: /* LMM */
/** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
protected:
struct Metric {
- double peak; /**< The peak of the metric, ie its max value */
- double scale; /**< Current availability of the metric according to the traces, in [0,1] */
- tmgr_trace_event_t event; /**< The associated trace event associated to the metric */
+ double peak; /**< The peak of the metric, ie its max value */
+ double scale; /**< Current availability of the metric according to the traces, in [0,1] */
+ TraceEvent* event; /**< The associated trace event associated to the metric */
};
};
} // namespace resource