blob: 4ab8ca98d314907d1216de717aa8c771d5437d35 [file] [log] [blame]
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)
}
}