summaryrefslogtreecommitdiff
path: root/opendc-compute
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-10 17:32:43 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-11 17:05:10 +0200
commit1768292251957da5ce6411ecc7d2dffebf8709c8 (patch)
treee79f01046233efbbc2c8ec5432e23789e7ca0346 /opendc-compute
parentf0c0c6d45165ad0ce398ec7300b11bf77c7ae5a6 (diff)
simulator: Integrate power subsystem with compute subsystem
This change integrates the power subsystem of the simulator with the compute subsystem by exposing a new field on a SimBareMetalMachine, psu, which provides access to the machine's PSU, which in turn can be connected to a SimPowerOutlet.
Diffstat (limited to 'opendc-compute')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
index d36717af..540e27fe 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
@@ -129,7 +129,7 @@ public class SimHost(
_batch.put(_cpuWorkInterference, interferedWork.toDouble())
_batch.put(_cpuUsage, cpuUsage)
_batch.put(_cpuDemand, cpuDemand)
- _batch.put(_cpuPower, machine.powerDraw)
+ _batch.put(_cpuPower, machine.psu.powerDraw)
_batch.record()
}
}