@Test public void testMakeChannelElementValues() throws Exception { final List<GetResult> resultList = new ArrayList<>(Arrays.asList(this.primaryAddress, this.identificationNumber, this.manufacturerIdentification, this.version, this.deviceType)); final ChannelElementValuesDto values = this.deviceChannelsHelper.makeChannelElementValues((short) 1, resultList); assertThat(values.getPrimaryAddress()).isEqualTo(PRIMARY_ADDRESS); assertThat(values.getIdentificationNumber()).isEqualTo(String.valueOf(IDENTIFICATION_NUMBER)); assertThat(values.getManufacturerIdentification()).isEqualTo(MANUFACTURER_IDENTIFICATION_AS_TEXT); assertThat(values.getVersion()).isEqualTo(VERSION); assertThat(values.getDeviceTypeIdentification()).isEqualTo(DEVICE_TYPE); }
protected ChannelElementValuesDto makeChannelElementValues(final short channel, final List<GetResult> resultList) throws ProtocolAdapterException { final short primaryAddress = this.readShort(resultList, INDEX_PRIMARY_ADDRESS, "primaryAddress"); final String identificationNumber = this.readIdentificationNumber(resultList, INDEX_IDENTIFICATION_NUMBER, "identificationNumber"); final String manufacturerIdentification = this.readManufacturerIdentification(resultList, INDEX_MANUFACTURER_ID, "manufacturerIdentification"); final short version = this.readShort(resultList, INDEX_VERSION, "version"); final short deviceTypeIdentification = this.readShort(resultList, INDEX_DEVICE_TYPE, "deviceTypeIdentification"); return new ChannelElementValuesDto(channel, primaryAddress, identificationNumber, manufacturerIdentification, version, deviceTypeIdentification); }
DeviceChannelsHelper { protected ChannelElementValuesDto makeChannelElementValues(final short channel, final List<GetResult> resultList) throws ProtocolAdapterException { final short primaryAddress = this.readShort(resultList, INDEX_PRIMARY_ADDRESS, "primaryAddress"); final String identificationNumber = this.readIdentificationNumber(resultList, INDEX_IDENTIFICATION_NUMBER, "identificationNumber"); final String manufacturerIdentification = this.readManufacturerIdentification(resultList, INDEX_MANUFACTURER_ID, "manufacturerIdentification"); final short version = this.readShort(resultList, INDEX_VERSION, "version"); final short deviceTypeIdentification = this.readShort(resultList, INDEX_DEVICE_TYPE, "deviceTypeIdentification"); return new ChannelElementValuesDto(channel, primaryAddress, identificationNumber, manufacturerIdentification, version, deviceTypeIdentification); } }
DeviceChannelsHelper { protected ChannelElementValuesDto makeChannelElementValues(final short channel, final List<GetResult> resultList) throws ProtocolAdapterException { final short primaryAddress = this.readShort(resultList, INDEX_PRIMARY_ADDRESS, "primaryAddress"); final String identificationNumber = this.readIdentificationNumber(resultList, INDEX_IDENTIFICATION_NUMBER, "identificationNumber"); final String manufacturerIdentification = this.readManufacturerIdentification(resultList, INDEX_MANUFACTURER_ID, "manufacturerIdentification"); final short version = this.readShort(resultList, INDEX_VERSION, "version"); final short deviceTypeIdentification = this.readShort(resultList, INDEX_DEVICE_TYPE, "deviceTypeIdentification"); return new ChannelElementValuesDto(channel, primaryAddress, identificationNumber, manufacturerIdentification, version, deviceTypeIdentification); } @Autowired  DeviceChannelsHelper(final DlmsHelper dlmsHelper); }
DeviceChannelsHelper { protected ChannelElementValuesDto makeChannelElementValues(final short channel, final List<GetResult> resultList) throws ProtocolAdapterException { final short primaryAddress = this.readShort(resultList, INDEX_PRIMARY_ADDRESS, "primaryAddress"); final String identificationNumber = this.readIdentificationNumber(resultList, INDEX_IDENTIFICATION_NUMBER, "identificationNumber"); final String manufacturerIdentification = this.readManufacturerIdentification(resultList, INDEX_MANUFACTURER_ID, "manufacturerIdentification"); final short version = this.readShort(resultList, INDEX_VERSION, "version"); final short deviceTypeIdentification = this.readShort(resultList, INDEX_DEVICE_TYPE, "deviceTypeIdentification"); return new ChannelElementValuesDto(channel, primaryAddress, identificationNumber, manufacturerIdentification, version, deviceTypeIdentification); } @Autowired  DeviceChannelsHelper(final DlmsHelper dlmsHelper); List<ChannelElementValuesDto> findCandidateChannelsForDevice(final DlmsConnectionManager conn,
            final DlmsDevice device, final MbusChannelElementsDto requestDto); }
DeviceChannelsHelper { protected ChannelElementValuesDto makeChannelElementValues(final short channel, final List<GetResult> resultList) throws ProtocolAdapterException { final short primaryAddress = this.readShort(resultList, INDEX_PRIMARY_ADDRESS, "primaryAddress"); final String identificationNumber = this.readIdentificationNumber(resultList, INDEX_IDENTIFICATION_NUMBER, "identificationNumber"); final String manufacturerIdentification = this.readManufacturerIdentification(resultList, INDEX_MANUFACTURER_ID, "manufacturerIdentification"); final short version = this.readShort(resultList, INDEX_VERSION, "version"); final short deviceTypeIdentification = this.readShort(resultList, INDEX_DEVICE_TYPE, "deviceTypeIdentification"); return new ChannelElementValuesDto(channel, primaryAddress, identificationNumber, manufacturerIdentification, version, deviceTypeIdentification); } @Autowired  DeviceChannelsHelper(final DlmsHelper dlmsHelper); List<ChannelElementValuesDto> findCandidateChannelsForDevice(final DlmsConnectionManager conn,
            final DlmsDevice device, final MbusChannelElementsDto requestDto);  }