1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package org.simgrid.surf;
12 * The generic model for the Cpu component
16 public class CpuModel extends Model {
17 private long swigCPtr;
19 protected CpuModel(long cPtr, boolean cMemoryOwn) {
20 super(SurfJNI.CpuModel_SWIGUpcast(cPtr), cMemoryOwn);
24 protected static long getCPtr(CpuModel obj) {
25 return (obj == null) ? 0 : obj.swigCPtr;
28 protected void finalize() {
32 public synchronized void delete() {
36 SurfJNI.delete_CpuModel(swigCPtr);
43 protected void swigDirectorDisconnect() {
48 public void swigReleaseOwnership() {
50 SurfJNI.CpuModel_change_ownership(this, swigCPtr, false);
53 public void swigTakeOwnership() {
55 SurfJNI.CpuModel_change_ownership(this, swigCPtr, true);
60 * CpuModel constructon
61 * @param name The name of the cpumodel
63 public CpuModel(String name) {
64 this(SurfJNI.new_CpuModel(name), true);
65 SurfJNI.CpuModel_director_connect(this, swigCPtr, swigCMemOwn, true);
78 * @param state_initial
80 * @param cpu_properties
84 public Cpu createResource(String name, double[] power_peak, int pstate, double power_scale, TmgrTrace power_trace, int core, ResourceState state_initial, TmgrTrace state_trace, XbtDict cpu_properties) {
85 long cPtr = SurfJNI.CpuModel_createResource(swigCPtr, this, name, power_peak, pstate, power_scale, TmgrTrace.getCPtr(power_trace), power_trace, core, state_initial.swigValue(), TmgrTrace.getCPtr(state_trace), state_trace, XbtDict.getCPtr(cpu_properties), cpu_properties);
86 return (Cpu)Surf.getCpuDirector(cPtr);
89 public void addTraces() {
90 SurfJNI.CpuModel_addTraces(swigCPtr, this);