Search in sources :

Example 16 with SelectiveAccessDescription

use of org.openmuc.jdlms.SelectiveAccessDescription in project open-smart-grid-platform by OSGP.

the class GetPeriodicMeterReadsCommandExecutorIntegrationTest method createSelectiveAccessDescriptionDsmr4Interval.

private SelectiveAccessDescription createSelectiveAccessDescriptionDsmr4Interval(final DataObject from, final DataObject to) {
    final DataObject selectedValues = DataObject.newArrayData(Collections.emptyList());
    final DataObject expectedAccessParam = DataObject.newStructureData(Arrays.asList(this.CLOCK, from, to, selectedValues));
    return new SelectiveAccessDescription(1, expectedAccessParam);
}
Also used : DataObject(org.openmuc.jdlms.datatypes.DataObject) SelectiveAccessDescription(org.openmuc.jdlms.SelectiveAccessDescription)

Example 17 with SelectiveAccessDescription

use of org.openmuc.jdlms.SelectiveAccessDescription in project open-smart-grid-platform by OSGP.

the class GetPeriodicMeterReadsGasCommandExecutorIntegrationTest method createSelectiveAccessDescriptionDsmr4Daily.

private SelectiveAccessDescription createSelectiveAccessDescriptionDsmr4Daily(final DataObject from, final DataObject to) {
    final DataObject selectedValues = DataObject.newArrayData(Arrays.asList(this.CLOCK, this.STATUS, this.GAS_VALUE_DSMR4, this.GAS_CAPTURE_TIME_DSMR4));
    final DataObject expectedAccessParam = DataObject.newStructureData(Arrays.asList(this.CLOCK, from, to, selectedValues));
    return new SelectiveAccessDescription(1, expectedAccessParam);
}
Also used : DataObject(org.openmuc.jdlms.datatypes.DataObject) SelectiveAccessDescription(org.openmuc.jdlms.SelectiveAccessDescription)

Aggregations

SelectiveAccessDescription (org.openmuc.jdlms.SelectiveAccessDescription)17 DataObject (org.openmuc.jdlms.datatypes.DataObject)16 AttributeAddress (org.openmuc.jdlms.AttributeAddress)6 DlmsObject (org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.dlmsobjectconfig.model.DlmsObject)5 Test (org.junit.jupiter.api.Test)3 Medium (org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.dlmsobjectconfig.model.Medium)3 DateTime (org.joda.time.DateTime)2 ObisCode (org.openmuc.jdlms.ObisCode)2 DlmsProfile (org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.dlmsobjectconfig.model.DlmsProfile)2 ProtocolAdapterException (org.opensmartgridplatform.adapter.protocol.dlms.exceptions.ProtocolAdapterException)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 List (java.util.List)1 Optional (java.util.Optional)1 Collectors (java.util.stream.Collectors)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 Assertions.assertThatExceptionOfType (org.assertj.core.api.Assertions.assertThatExceptionOfType)1 Fail.fail (org.assertj.core.api.Fail.fail)1