-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/*********
* Model *
*********/
-HostModel::HostModel(const char *name)
- : Model(name)
-{
- p_cpuModel = surf_cpu_model_pm;
-}
-
-HostModel::HostModel()
-: Model("Host") {
- p_cpuModel = surf_cpu_model_pm;
-}
-
-HostModel::~HostModel() {
-}
-
/* Each VM has a dummy CPU action on the PM layer. This CPU action works as the
* constraint (capacity) of the VM in the PM layer. If the VM does not have any
* active task, the dummy CPU action must be deactivated, so that the VM does
p_cpu->setState(state);
}
-int Host::getCore(){
- return p_cpu->getCore();
-}
-
-double Host::getSpeed(double load){
- return p_cpu->getSpeed(load);
-}
-
-double Host::getAvailableSpeed(){
- return p_cpu->getAvailableSpeed();
-}
-
-double Host::getCurrentPowerPeak()
-{
- return p_cpu->getCurrentPowerPeak();
-}
-
-double Host::getPowerPeakAt(int pstate_index)
-{
- return p_cpu->getPowerPeakAt(pstate_index);
-}
-
-int Host::getNbPstates()
-{
- return p_cpu->getNbPstates();
-}
-
-void Host::setPstate(int pstate_index)
-{
- p_cpu->setPstate(pstate_index);
-}
-int Host::getPstate()
-{
- return p_cpu->getPstate();
-}
-
xbt_dict_t Host::getProperties()
{
return p_cpu->getProperties();
return dyn;
}
-void Host::getParams(ws_params_t params)
+void Host::getParams(vm_params_t params)
{
*params = p_params;
}
-void Host::setParams(ws_params_t params)
+void Host::setParams(vm_params_t params)
{
/* may check something here. */
p_params = *params;