use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues in project open-smart-grid-platform by OSGP.
the class PushSetupAlarmMappingTest method createPushObjectList.
private static List<PushObject> createPushObjectList() {
final PushObject pushObject = new PushObject();
final ObisCodeValues obisCode = new ObisCodeValues();
obisCode.setA((short) PUSH_OBJECT_OBIS_CODE.getA());
obisCode.setB((short) PUSH_OBJECT_OBIS_CODE.getB());
obisCode.setC((short) PUSH_OBJECT_OBIS_CODE.getC());
obisCode.setD((short) PUSH_OBJECT_OBIS_CODE.getD());
obisCode.setE((short) PUSH_OBJECT_OBIS_CODE.getE());
obisCode.setF((short) PUSH_OBJECT_OBIS_CODE.getF());
pushObject.setClassId(PUSH_OBJECT_CLASS_ID);
pushObject.setLogicalName(obisCode);
pushObject.setAttributeIndex((byte) PUSH_OBJECT_ATTRIBUTE_ID);
pushObject.setDataIndex(PUSH_OBJECT_DATA_INDEX);
return Collections.singletonList(pushObject);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues in project open-smart-grid-platform by OSGP.
the class GetSpecificAttributeValueRequestMappingTest method makeRequest.
private GetSpecificAttributeValueRequest makeRequest() {
final GetSpecificAttributeValueRequest result = new GetSpecificAttributeValueRequest();
final ObisCodeValues obiscode = new ObisCodeValues();
obiscode.setA((short) 1);
result.setObisCode(obiscode);
result.setDeviceIdentification("12345");
return result;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues in project open-smart-grid-platform by OSGP.
the class PushObjectConverter method convertTo.
@Override
public PushObject convertTo(final CosemObjectDefinition source, final Type<PushObject> destinationType, final MappingContext context) {
if (source == null) {
return null;
}
final ObisCodeValues obisCodeValues = this.mapperFacade.map(source.getLogicalName(), ObisCodeValues.class);
final PushObject convertedPushObject = new PushObject();
convertedPushObject.setClassId(source.getClassId());
convertedPushObject.setLogicalName(obisCodeValues);
convertedPushObject.setAttributeIndex((byte) source.getAttributeIndex());
convertedPushObject.setDataIndex(source.getDataIndex());
return convertedPushObject;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues in project open-smart-grid-platform by OSGP.
the class ObisCodeValuesConverter method convertFrom.
@Override
public ObisCodeValues convertFrom(final org.opensmartgridplatform.domain.core.valueobjects.smartmetering.ObisCodeValues source, final Type<ObisCodeValues> destinationType, final MappingContext context) {
final ObisCodeValues result = new ObisCodeValues();
result.setA((short) (source.getA() & 0xFF));
result.setB((short) (source.getB() & 0xFF));
result.setC((short) (source.getC() & 0xFF));
result.setD((short) (source.getD() & 0xFF));
result.setE((short) (source.getE() & 0xFF));
result.setF((short) (source.getF() & 0xFF));
return result;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.common.ObisCodeValues in project open-smart-grid-platform by OSGP.
the class SetPushSetupSms method getObisCodeValues.
private ObisCodeValues getObisCodeValues() {
final ObisCodeValues values = new ObisCodeValues();
values.setA((short) 0);
values.setB((short) 2);
values.setC((short) 25);
values.setD((short) 9);
values.setE((short) 0);
values.setF((short) 255);
return values;
}
Aggregations