Search in sources :

Example 6 with PushSetupSms

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupSms in project open-smart-grid-platform by OSGP.

the class PushSetupSmsConverter method convertFrom.

@Override
public PushSetupSms convertFrom(final org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.PushSetupSms source, final Type<PushSetupSms> destinationType, final MappingContext context) {
    if (source == null) {
        return null;
    }
    final PushSetupSms.Builder builder = new PushSetupSms.Builder();
    final String destination = source.getHost() + ":" + source.getPort();
    final SendDestinationAndMethod sendDestinationAndMethod = new SendDestinationAndMethod(TransportServiceType.TCP, destination, MessageType.MANUFACTURER_SPECIFIC);
    builder.withSendDestinationAndMethod(sendDestinationAndMethod);
    return builder.build();
}
Also used : SendDestinationAndMethod(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SendDestinationAndMethod) PushSetupSms(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupSms)

Aggregations

PushSetupSms (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupSms)6 Test (org.junit.jupiter.api.Test)3 PushSetupSmsDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.PushSetupSmsDto)3 CosemObjectDefinition (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemObjectDefinition)2 SendDestinationAndMethod (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SendDestinationAndMethod)2 WindowElement (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.WindowElement)2 BigInteger (java.math.BigInteger)1 ArrayList (java.util.ArrayList)1 ClockStatus (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ClockStatus)1 CosemDate (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemDate)1 CosemDateTime (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemDateTime)1 CosemObisCode (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemObisCode)1 CosemTime (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemTime)1