commit
a7ac8c3136
@ -2677,6 +2677,13 @@ mbus_data_variable_parse(mbus_frame *frame, mbus_data_variable *data)
|
|||||||
|
|
||||||
while (i < frame->data_size)
|
while (i < frame->data_size)
|
||||||
{
|
{
|
||||||
|
// Skip filler dif=2F
|
||||||
|
if ((frame->data[i] & 0xFF) == MBUS_DIB_DIF_IDLE_FILLER)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ((record = mbus_data_record_new()) == NULL)
|
if ((record = mbus_data_record_new()) == NULL)
|
||||||
{
|
{
|
||||||
// clean up...
|
// clean up...
|
||||||
|
@ -129,6 +129,7 @@ typedef struct _mbus_slave_data {
|
|||||||
#define MBUS_DIB_VIF_EXTENSION_BIT 0x80
|
#define MBUS_DIB_VIF_EXTENSION_BIT 0x80
|
||||||
#define MBUS_DIB_DIF_MANUFACTURER_SPECIFIC 0x0F
|
#define MBUS_DIB_DIF_MANUFACTURER_SPECIFIC 0x0F
|
||||||
#define MBUS_DIB_DIF_MORE_RECORDS_FOLLOW 0x1F
|
#define MBUS_DIB_DIF_MORE_RECORDS_FOLLOW 0x1F
|
||||||
|
#define MBUS_DIB_DIF_IDLE_FILLER 0x2F
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mbus_data_information_block {
|
typedef struct _mbus_data_information_block {
|
||||||
|
1
test/test-frames/wmbus-converted.hex
Normal file
1
test/test-frames/wmbus-converted.hex
Normal 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
|
21
test/test-frames/wmbus-converted.xml
Normal file
21
test/test-frames/wmbus-converted.xml
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user