#include <xbt.h>
#include <string>
#include <vector>
-#include <iostream>
#include <memory>
#include <boost/function.hpp>
#include <boost/intrusive/list.hpp>
extern double sg_sender_gap;
XBT_PUBLIC(int) SURF_CPU_LEVEL; //Surf cpu level
+extern surf_callback(void, void) surfExitCallbacks;
+
int __surf_is_absolute_file_path(const char *file_path);
/***********
const char *p_name;
xbt_dict_t p_properties;
ModelPtr p_model;
- void *p_resource;
bool m_running;
e_surf_resource_state_t m_stateCurrent;
*/
virtual void setState(e_surf_action_state_t state);
+ /**
+ * @brief Get the bound of the current Action
+ *
+ * @return The bound of the current Action
+ */
+ double getBound();
+
+ /**
+ * @brief Set the bound of the current Action
+ *
+ * @param bound The new bound of the current Action
+ */
+ void setBound(double bound);
+
/**
* @brief Get the start time of the current action
*
*/
double getRemainsNoUpdate();
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- /**
- * @brief Check if the action is limited by latency.
- *
- * @return 1 if action is limited by latency, 0 otherwise
- */
- int getLatencyLimited();
-#endif
-
/**
* @brief Get the priority of the current Action
*
s_xbt_swag_hookup_t p_stateHookup;
+ ModelPtr getModel() {return p_model;}
+
protected:
ActionListPtr p_stateSet;
double m_priority; /**< priority (1.0 by default) */
double m_maxDuration; /*< max_duration (may fluctuate until the task is completed) */
double m_finish; /**< finish time : this is modified during the run and fluctuates until the task is completed */
- ModelPtr getModel() {return p_model;}
-
private:
int resourceUsed(void *resource_id);
#ifdef HAVE_LATENCY_BOUND_TRACKING
int m_latencyLimited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
- int m_cost;
+ double m_cost;
ModelPtr p_model;
void *p_data; /**< for your convenience */