Search in sources :

Example 1 with OctetStringData

use of org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData in project open-smart-grid-platform by OSGP.

the class DefaultDeviceProfile method deviceId5.

@Bean
public OctetStringData deviceId5() {
    final String obisCode = "0.0.96.1.4.255";
    this.dynamicValues().setDefaultAttributeValue(InterfaceClass.DATA.id(), new ObisCode(obisCode), OctetStringData.ATTRIBUTE_ID_VALUE, DataObject.newOctetStringData(new byte[0]));
    return new OctetStringData(obisCode);
}
Also used : OctetStringData(org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData) BitString(org.openmuc.jdlms.datatypes.BitString) ObisCode(org.openmuc.jdlms.ObisCode) Bean(org.springframework.context.annotation.Bean)

Example 2 with OctetStringData

use of org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData in project open-smart-grid-platform by OSGP.

the class DefaultDeviceProfile method deviceId4.

@Bean
public OctetStringData deviceId4() {
    final String obisCode = "0.0.96.1.3.255";
    this.dynamicValues().setDefaultAttributeValue(InterfaceClass.DATA.id(), new ObisCode(obisCode), OctetStringData.ATTRIBUTE_ID_VALUE, DataObject.newOctetStringData(new byte[0]));
    return new OctetStringData(obisCode);
}
Also used : OctetStringData(org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData) BitString(org.openmuc.jdlms.datatypes.BitString) ObisCode(org.openmuc.jdlms.ObisCode) Bean(org.springframework.context.annotation.Bean)

Example 3 with OctetStringData

use of org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData in project open-smart-grid-platform by OSGP.

the class DefaultDeviceProfile method deviceId9.

@Bean
public OctetStringData deviceId9() {
    final String obisCode = "0.0.96.1.8.255";
    this.dynamicValues().setDefaultAttributeValue(InterfaceClass.DATA.id(), new ObisCode(obisCode), OctetStringData.ATTRIBUTE_ID_VALUE, DataObject.newOctetStringData(new byte[0]));
    return new OctetStringData(obisCode);
}
Also used : OctetStringData(org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData) BitString(org.openmuc.jdlms.datatypes.BitString) ObisCode(org.openmuc.jdlms.ObisCode) Bean(org.springframework.context.annotation.Bean)

Example 4 with OctetStringData

use of org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData in project open-smart-grid-platform by OSGP.

the class DefaultDeviceProfile method deviceId2.

@Bean
public OctetStringData deviceId2() {
    final String obisCode = "0.0.96.1.1.255";
    final String deviceId2 = String.format("%s%010d%2d", String.format("%5s", this.kemaCode).substring(0, 5), this.serialNumber, this.productionYear);
    LOGGER.info("deviceId2 {}", deviceId2);
    this.dynamicValues().setDefaultAttributeValue(InterfaceClass.DATA.id(), new ObisCode(obisCode), OctetStringData.ATTRIBUTE_ID_VALUE, DataObject.newOctetStringData(deviceId2.getBytes(StandardCharsets.US_ASCII)));
    return new OctetStringData(obisCode);
}
Also used : OctetStringData(org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData) BitString(org.openmuc.jdlms.datatypes.BitString) ObisCode(org.openmuc.jdlms.ObisCode) Bean(org.springframework.context.annotation.Bean)

Example 5 with OctetStringData

use of org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData in project open-smart-grid-platform by OSGP.

the class DefaultDeviceProfile method deviceId1.

@Bean
public OctetStringData deviceId1() {
    final String obisCode = "0.0.96.1.0.255";
    this.dynamicValues().setDefaultAttributeValue(InterfaceClass.DATA.id(), new ObisCode(obisCode), OctetStringData.ATTRIBUTE_ID_VALUE, DataObject.newOctetStringData(String.valueOf(this.serialNumber).getBytes(StandardCharsets.US_ASCII)));
    return new OctetStringData(obisCode);
}
Also used : OctetStringData(org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData) BitString(org.openmuc.jdlms.datatypes.BitString) ObisCode(org.openmuc.jdlms.ObisCode) Bean(org.springframework.context.annotation.Bean)

Aggregations

ObisCode (org.openmuc.jdlms.ObisCode)6 BitString (org.openmuc.jdlms.datatypes.BitString)6 OctetStringData (org.opensmartgridplatform.simulator.protocol.dlms.cosem.OctetStringData)6 Bean (org.springframework.context.annotation.Bean)6