-/* Copyright (c) 2004-2013. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/** @ingroup SURF_callbacks
* @brief Callbacks handler which emit the callbacks after Cpu creation *
- * @detail Callback functions have the following signature: `void(CpuPtr)`
+ * @details Callback functions have the following signature: `void(CpuPtr)`
*/
-extern surf_callback(void, CpuPtr) createCpuCallbacks;
+extern surf_callback(void, CpuPtr) cpuCreatedCallbacks;
/** @ingroup SURF_callbacks
* @brief Callbacks handler which emit the callbacks after Cpu destruction *
- * @detail Callback functions have the following signature: `void(CpuPtr)`
+ * @details Callback functions have the following signature: `void(CpuPtr)`
*/
-extern surf_callback(void, CpuPtr) deleteCpuCallbacks;
+extern surf_callback(void, CpuPtr) cpuDestructedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after CpuAction update *
- * @detail Callback functions have the following signature: `void(CpuActionPtr)`
+ * @brief Callbacks handler which emit the callbacks after Cpu State changed *
+ * @details Callback functions have the following signature: `void(CpuActionPtr)`
*/
-extern surf_callback(void, CpuActionPtr) updateCpuActionCallbacks;
+extern surf_callback(void, CpuPtr) cpuStateChangedCallbacks;
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after CpuAction State changed *
+ * @details Callback functions have the following signature: `void(CpuActionPtr)`
+ */
+extern surf_callback(void, CpuActionPtr) cpuActionStateChangedCallbacks;
/*********
* Model *
*/
CpuPtr createResource(string name);
+ void setState(e_surf_resource_state_t state);
void updateActionsStateLazy(double now, double delta);
void updateActionsStateFull(double now, double delta);
int core, double powerPeak, double powerScale);
/**
- * @brieaf Cpu destructor
+ * @brief Cpu destructor
*/
~Cpu();
virtual void setPowerPeakAt(int pstate_index)=0;
+ void setState(e_surf_resource_state_t state);
+
void addTraces(void);
int m_core;
double m_powerPeak; /*< CPU power peak */
* @details [TODO]
*
* @param cpu [TODO]
- * @param long [TODO]
+ * @param mask [TODO]
*/
virtual void setAffinity(CpuPtr cpu, unsigned long mask);
*/
virtual void setBound(double bound);
+ void setState(e_surf_action_state_t state);
+
void updateRemainingLazy(double now);
double m_bound;
};