Ignore filler DIF (= 0x2F)

This commit is contained in:
Jakob Skov-Pedersen 2013-03-11 09:22:52 +01:00
parent 91f0c87207
commit 363f59a149
3 changed files with 28 additions and 0 deletions

View File

@ -2677,6 +2677,12 @@ mbus_data_variable_parse(mbus_frame *frame, mbus_data_variable *data)
while (i < frame->data_size)
{
// Skip filler dif=2F
while (((frame->data[i] & 0xFF) == 0x2F) && (i < frame->data_size)) {
i++;
}
if (i == frame->data_size) break;
if ((record = mbus_data_record_new()) == NULL)
{
// clean up...

View File

@ -0,0 +1 @@
68 1f 1f 68 08 00 72 31 77 67 17 2d 2c 01 02 00 00 00 00 2f 2f 04 83 3b 88 13 00 00 2f 2f 2f 2f 2f 2f 2f 00 16

View File

@ -0,0 +1,21 @@
<MBusData>
<SlaveInformation>
<Id>17677731</Id>
<Manufacturer>KAM</Manufacturer>
<Version>1</Version>
<ProductName>Kamstrup 382 (6850-005)</ProductName>
<Medium>Electricity</Medium>
<AccessNumber>0</AccessNumber>
<Status>00</Status>
<Signature>0000</Signature>
</SlaveInformation>
<DataRecord id="0">
<Function>Instantaneous value</Function>
<Unit>Energy (Wh)</Unit>
<Value>5000</Value>
<Timestamp>1970-01-01T00:00:00</Timestamp>
</DataRecord>
</MBusData>