diff --git a/transformation-DNI3-to-Omnet/src/dni3toOmnetTransformation/Main.xtend b/transformation-DNI3-to-Omnet/src/dni3toOmnetTransformation/Main.xtend index 69d6cad18f4cc094c6733f71bf1995395e12a20d..a804fa4e5145251f8acf3cd00ae69de889a58e34 100644 --- a/transformation-DNI3-to-Omnet/src/dni3toOmnetTransformation/Main.xtend +++ b/transformation-DNI3-to-Omnet/src/dni3toOmnetTransformation/Main.xtend @@ -45,6 +45,7 @@ import dnimm3.PerformanceNetworkInterface import dnimm3.DNIUnit import dnimm3.DataUnit import dnimm3.FlowRoute +import dnimm3.ConstantDoubleVariable class Main { val static NAME = "dni3toomnet" @@ -241,8 +242,6 @@ class Main { netIF.name = iF.name netIF.type = "NetworkInterface" net.submodules.add(netIF) - //TODO: - //get native Switching Capacity and wrtie to ini writeIniLine(inig, "General", iF.name + ".mtu", iF.performance.MTU.toString(), "") writeIniLine(inig, "General", iF.name + ".isUp", iF.performance.isIsUp.toString(), "") @@ -252,6 +251,7 @@ class Main { //TODO // read values correctly and parse them correctly currently // toSTring will return like this dnimm3.impl.ConstantDoubleVariableImpl@80169cf (value: 1.0) + //CAST TO CONSTANTDOUBLEVARIABLE SEE BELOW // need to access value 1.0 directly and use DoubleParameter if (n.intermediate != null) { @@ -261,7 +261,7 @@ class Main { n.intermediate.performance.switchingCapacityPPS.unit.toString()) writeIniLine(inig, "General", n.name + ".nativeForwardingLatency", n.intermediate.performance.forwardingLatency.toString(), - n.intermediate.performance.forwardingLatency.unit.toString()) + (n.intermediate.performance.forwardingLatency as ConstantDoubleVariable).value.toString) writeIniLine(inig, "General", n.name + ".nativeForwardingBandwithBPS", n.intermediate.performance.forwardingBandwidthBPS.toString(), n.intermediate.performance.forwardingBandwidthBPS.unit.toString())