@Test public void testCorrectLogMessageForBitStringObject() { final String expected = "number of bytes=2, value=37440, bits=10010010 01000000 "; final String logMessage = this.dlmsHelper.getDebugInfoBitStringBytes(new byte[] { -110, 64 }); assertThat(logMessage).isEqualTo(expected); }
public String getDebugInfoBitStringBytes(final byte[] bitStringValue) { if (bitStringValue == null) { return null; } final BigInteger bigValue = this.byteArrayToBigInteger(bitStringValue); final String stringValue = this.byteArrayToString(bitStringValue); return "number of bytes=" + bitStringValue.length + ", value=" + bigValue + ", bits=" + stringValue; }
DlmsHelper { public String getDebugInfoBitStringBytes(final byte[] bitStringValue) { if (bitStringValue == null) { return null; } final BigInteger bigValue = this.byteArrayToBigInteger(bitStringValue); final String stringValue = this.byteArrayToString(bitStringValue); return "number of bytes=" + bitStringValue.length + ", value=" + bigValue + ", bits=" + stringValue; } }
DlmsHelper { public String getDebugInfoBitStringBytes(final byte[] bitStringValue) { if (bitStringValue == null) { return null; } final BigInteger bigValue = this.byteArrayToBigInteger(bitStringValue); final String stringValue = this.byteArrayToString(bitStringValue); return "number of bytes=" + bitStringValue.length + ", value=" + bigValue + ", bits=" + stringValue; }  }
DlmsHelper { public String getDebugInfoBitStringBytes(final byte[] bitStringValue) { if (bitStringValue == null) { return null; } final BigInteger bigValue = this.byteArrayToBigInteger(bitStringValue); final String stringValue = this.byteArrayToString(bitStringValue); return "number of bytes=" + bitStringValue.length + ", value=" + bigValue + ", bits=" + stringValue; }  DataObject getAttributeValue(final DlmsConnectionManager conn, final AttributeAddress attributeAddress); List<GetResult> getAndCheck(final DlmsConnectionManager conn, final DlmsDevice device,
            final String description, final AttributeAddress... params); void checkResultList(final List<GetResult> getResultList, final int expectedResults,
            final String description); List<GetResult> getWithList(final DlmsConnectionManager conn, final DlmsDevice device,
            final AttributeAddress... params); DataObject getClockDefinition(); DataObject getAccessSelectionTimeRangeParameter(final DateTime from, final DateTime to,
            final DataObject selectedValues); DlmsMeterValueDto getScaledMeterValue(final GetResult value, final GetResult scalerUnit,
            final String description); DlmsMeterValueDto getScaledMeterValue(final DataObject value, final DataObject scalerUnitObject,
            final String description); DataObject getAMRProfileDefinition(); Long readLong(final GetResult getResult, final String description); Long readLong(final DataObject resultData, final String description); Long readLongNotNull(final GetResult getResult, final String description); Long readLongNotNull(final DataObject resultData, final String description); Integer readInteger(final GetResult getResult, final String description); Short readShort(final GetResult getResult, final String description); DataObject readDataObject(final GetResult getResult, final String description); String readString(final DataObject resultData, final String description); CosemDateTimeDto readDateTime(final GetResult getResult, final String description); CosemDateTimeDto readDateTime(final DataObject resultData, final String description); CosemDateTimeDto convertDataObjectToDateTime(final DataObject object); CosemDateTimeDto fromDateTimeValue(final byte[] dateTimeValue); DataObject asDataObject(final DateTime dateTime); DataObject asDataObject(final DateTime dateTime, final int deviation, final boolean dst); DataObject asDataObject(final CosemDateDto date); List<CosemObjectDefinitionDto> readListOfObjectDefinition(final GetResult getResult,
            final String description); List<CosemObjectDefinitionDto> readListOfObjectDefinition(final DataObject resultData,
            final String description); CosemObjectDefinitionDto readObjectDefinition(final DataObject resultData, final String description); CosemObisCodeDto readLogicalName(final DataObject resultData, final String description); SendDestinationAndMethodDto readSendDestinationAndMethod(final GetResult getResult, final String description); SendDestinationAndMethodDto readSendDestinationAndMethod(final DataObject resultData,
            final String description); TransportServiceTypeDto readTransportServiceType(final DataObject resultData, final String description); MessageTypeDto readMessageType(final DataObject resultData, final String description); List<WindowElementDto> readListOfWindowElement(final GetResult getResult, final String description); List<WindowElementDto> readListOfWindowElement(final DataObject resultData, final String description); WindowElementDto readWindowElement(final DataObject resultData, final String description); String getDebugInfo(final DataObject dataObject); String getDebugInfoByteArray(final byte[] bytes); String getDebugInfoLogicalName(final byte[] logicalNameValue); String getDebugInfoDateTimeBytes(final byte[] dateTimeValue); String getDebugInfoBitStringBytes(final byte[] bitStringValue); void validateBufferedDateTime(final DateTime bufferedDateTime, final DateTime beginDateTime,
            final DateTime endDateTime); }
DlmsHelper { public String getDebugInfoBitStringBytes(final byte[] bitStringValue) { if (bitStringValue == null) { return null; } final BigInteger bigValue = this.byteArrayToBigInteger(bitStringValue); final String stringValue = this.byteArrayToString(bitStringValue); return "number of bytes=" + bitStringValue.length + ", value=" + bigValue + ", bits=" + stringValue; }  DataObject getAttributeValue(final DlmsConnectionManager conn, final AttributeAddress attributeAddress); List<GetResult> getAndCheck(final DlmsConnectionManager conn, final DlmsDevice device,
            final String description, final AttributeAddress... params); void checkResultList(final List<GetResult> getResultList, final int expectedResults,
            final String description); List<GetResult> getWithList(final DlmsConnectionManager conn, final DlmsDevice device,
            final AttributeAddress... params); DataObject getClockDefinition(); DataObject getAccessSelectionTimeRangeParameter(final DateTime from, final DateTime to,
            final DataObject selectedValues); DlmsMeterValueDto getScaledMeterValue(final GetResult value, final GetResult scalerUnit,
            final String description); DlmsMeterValueDto getScaledMeterValue(final DataObject value, final DataObject scalerUnitObject,
            final String description); DataObject getAMRProfileDefinition(); Long readLong(final GetResult getResult, final String description); Long readLong(final DataObject resultData, final String description); Long readLongNotNull(final GetResult getResult, final String description); Long readLongNotNull(final DataObject resultData, final String description); Integer readInteger(final GetResult getResult, final String description); Short readShort(final GetResult getResult, final String description); DataObject readDataObject(final GetResult getResult, final String description); String readString(final DataObject resultData, final String description); CosemDateTimeDto readDateTime(final GetResult getResult, final String description); CosemDateTimeDto readDateTime(final DataObject resultData, final String description); CosemDateTimeDto convertDataObjectToDateTime(final DataObject object); CosemDateTimeDto fromDateTimeValue(final byte[] dateTimeValue); DataObject asDataObject(final DateTime dateTime); DataObject asDataObject(final DateTime dateTime, final int deviation, final boolean dst); DataObject asDataObject(final CosemDateDto date); List<CosemObjectDefinitionDto> readListOfObjectDefinition(final GetResult getResult,
            final String description); List<CosemObjectDefinitionDto> readListOfObjectDefinition(final DataObject resultData,
            final String description); CosemObjectDefinitionDto readObjectDefinition(final DataObject resultData, final String description); CosemObisCodeDto readLogicalName(final DataObject resultData, final String description); SendDestinationAndMethodDto readSendDestinationAndMethod(final GetResult getResult, final String description); SendDestinationAndMethodDto readSendDestinationAndMethod(final DataObject resultData,
            final String description); TransportServiceTypeDto readTransportServiceType(final DataObject resultData, final String description); MessageTypeDto readMessageType(final DataObject resultData, final String description); List<WindowElementDto> readListOfWindowElement(final GetResult getResult, final String description); List<WindowElementDto> readListOfWindowElement(final DataObject resultData, final String description); WindowElementDto readWindowElement(final DataObject resultData, final String description); String getDebugInfo(final DataObject dataObject); String getDebugInfoByteArray(final byte[] bytes); String getDebugInfoLogicalName(final byte[] logicalNameValue); String getDebugInfoDateTimeBytes(final byte[] dateTimeValue); String getDebugInfoBitStringBytes(final byte[] bitStringValue); void validateBufferedDateTime(final DateTime bufferedDateTime, final DateTime beginDateTime,
            final DateTime endDateTime); static final int MILLISECONDS_PER_MINUTE; }