Search in sources :

Example 1 with MeterValue

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;
}
Also used : OsgpMeterValue(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.OsgpMeterValue) MeterValue(org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.MeterValue)

Aggregations

MeterValue (org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.MeterValue)1 OsgpMeterValue (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.OsgpMeterValue)1