e_surf_resource_state_t old = Resource::getState();
Resource::setState(state);
surf_callback_emit(workstationStateChangedCallbacks, this, old, state);
+ p_cpu->setState(state);
}
int Workstation::getCore(){
return p_cpu->getNbPstates();
}
-void Workstation::setPowerPeakAt(int pstate_index)
+void Workstation::setPstate(int pstate_index)
{
- p_cpu->setPowerPeakAt(pstate_index);
+ p_cpu->setPstate(pstate_index);
+}
+int Workstation::getPstate()
+{
+ return p_cpu->getPstate();
}
xbt_dict_t Workstation::getProperties()
xbt_dynar_t Workstation::getVms()
{
- xbt_dynar_t dyn = xbt_dynar_new(sizeof(smx_host_t), NULL);
+ xbt_dynar_t dyn = xbt_dynar_new(sizeof(WorkstationVMPtr), NULL);
/* iterate for all virtual machines */
for (WorkstationVMModel::vm_list_t::iterator iter =
iter != WorkstationVMModel::ws_vms.end(); ++iter) {
WorkstationVMPtr ws_vm = &*iter;
- if (this == ws_vm-> p_subWs)
- xbt_dynar_push(dyn, &ws_vm->p_subWs);
+ if (this == ws_vm->p_subWs)
+ xbt_dynar_push(dyn, &ws_vm);
}
return dyn;