package templates.m2m.utils | |
import com.inchron.realtime.root.model.FrequencyUnit | |
import org.eclipse.app4mc.amalthea.model.Frequency | |
import templates.AbstractAmaltheaInchronTransformer | |
class FrequencyTransformer extends AbstractAmaltheaInchronTransformer { | |
def create inchronModelFactory.createFrequency createFrequency(Frequency amltFrequency) { | |
it.value = if(amltFrequency !== null) amltFrequency.value.floatValue else 0 | |
it.unit = FrequencyUnit.getByName(amltFrequency?.unit.getName) | |
} | |
} |