use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.MeterValue in project open-smart-grid-platform by OSGP.
the class MeterValueConverter method convert.
@Override
public MeterValue convert(final OsgpMeterValue source, final Type<? extends MeterValue> destinationType, final MappingContext context) {
if (source == null) {
return null;
}
final MeterValue m = new MeterValue();
m.setValue(source.getValue());
m.setUnit(OsgpUnitType.fromValue(source.getOsgpUnit().name()));
return m;
}
Aggregations