Compare commits
56 Commits
fix-fcb-ha
...
negative-b
Author | SHA1 | Date | |
---|---|---|---|
36a85d3737 | |||
2f9fa5ccc8 | |||
027f6fb689 | |||
de4a899b9d | |||
2a2fbc372a | |||
6d3bb00d97 | |||
84c43fe7a3 | |||
73d58a9f7d | |||
ab8919136d | |||
2680079db4 | |||
a572c0f742 | |||
3d5b865ebe | |||
3a2357324d | |||
87e3c22f85 | |||
094c9ef453 | |||
6fd4ca2714 | |||
3aba0a062e | |||
b9bec04027 | |||
9bf9f4bbf0 | |||
c59f584937 | |||
ab59b56a49 | |||
1fc2323080 | |||
0e5b5b46a8 | |||
8c232f3da3 | |||
a8eaceda40 | |||
9edcc44eeb | |||
7fe67c8586 | |||
9906723447 | |||
78298bc68e | |||
b6cbb1de1e | |||
b9b131d064 | |||
ee2c4bada8 | |||
ed87f62a87 | |||
a659ca0494 | |||
cf4d11b0fc | |||
8af6b97647 | |||
eaeb6e5502 | |||
c11ef4b830 | |||
9fb9f30a58 | |||
7eaadad124 | |||
0751e0d88f | |||
b55422b034 | |||
89195f627a | |||
2170faa357 | |||
8b1c012a91 | |||
012dc5ba36 | |||
db40010b93 | |||
04eae740b4 | |||
0927f23ee7 | |||
3699d25b10 | |||
f6dcf6e8d1 | |||
5674b30a6c | |||
bce4c6959b | |||
ef6c4be655 | |||
583a397e8e | |||
7e1be93dbd |
10
.gitignore
vendored
10
.gitignore
vendored
@ -52,6 +52,7 @@ bin/mbus-serial-request-data-multi-reply
|
|||||||
bin/mbus-serial-scan
|
bin/mbus-serial-scan
|
||||||
bin/mbus-serial-scan-secondary
|
bin/mbus-serial-scan-secondary
|
||||||
bin/mbus-serial-select-secondary
|
bin/mbus-serial-select-secondary
|
||||||
|
bin/mbus-serial-set-address
|
||||||
bin/mbus-serial-switch-baudrate
|
bin/mbus-serial-switch-baudrate
|
||||||
bin/mbus-tcp-raw-send
|
bin/mbus-tcp-raw-send
|
||||||
bin/mbus-tcp-request-data
|
bin/mbus-tcp-request-data
|
||||||
@ -62,3 +63,12 @@ bin/mbus-tcp-select-secondary
|
|||||||
bin/mbus-tcp-application-reset
|
bin/mbus-tcp-application-reset
|
||||||
!*.c
|
!*.c
|
||||||
|
|
||||||
|
# test binaries
|
||||||
|
test/mbus_parse
|
||||||
|
test/mbus_parse_hex
|
||||||
|
|
||||||
|
# test cases temp files
|
||||||
|
test/test-frames/*.xml.new
|
||||||
|
test/error-frames/*.xml.new
|
||||||
|
test/unsupported-frames/*.xml.new
|
||||||
|
|
||||||
|
@ -4,4 +4,10 @@ compiler:
|
|||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|
||||||
script: ./build.sh
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./build.sh
|
||||||
|
- cd test && make && ./generate-xml.sh test-frames
|
||||||
|
16
COPYING
16
COPYING
@ -20,19 +20,5 @@ Contributers:
|
|||||||
* Pelle van der Heide
|
* Pelle van der Heide
|
||||||
* James Michael DuPont
|
* James Michael DuPont
|
||||||
* Uwe Grohnwaldt
|
* Uwe Grohnwaldt
|
||||||
* Markus Bergkvist
|
* Markus Bergkvist
|
||||||
|
|
||||||
LICENSE (the BSD license):
|
|
||||||
|
|
||||||
Copyright (c) 2010-2012, Raditex Control AB
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of the Raditex Control AB nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
|
6
INSTALL
6
INSTALL
@ -14,7 +14,7 @@ Basic Installation
|
|||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README.md' file for
|
||||||
instructions specific to this package. Some packages provide this
|
instructions specific to this package. Some packages provide this
|
||||||
`INSTALL' file but do not implement all of the features documented
|
`INSTALL' file but do not implement all of the features documented
|
||||||
below. The lack of an optional feature in a given package is not
|
below. The lack of an optional feature in a given package is not
|
||||||
@ -38,7 +38,7 @@ cache files.
|
|||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
diffs or instructions to the address given in the `README' so they can
|
diffs or instructions to the address given in the `README.md' so they can
|
||||||
be considered for the next release. If you are using the cache, and at
|
be considered for the next release. If you are using the cache, and at
|
||||||
some point `config.cache' contains results you don't want to keep, you
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
may remove or edit it.
|
may remove or edit it.
|
||||||
@ -200,7 +200,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|||||||
`configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
`README' should mention any `--enable-' and `--with-' options that the
|
`README.md' should mention any `--enable-' and `--with-' options that the
|
||||||
package recognizes.
|
package recognizes.
|
||||||
|
|
||||||
For packages that use the X Window System, `configure' can usually
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2010-2012, Raditex Control AB
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -10,7 +10,7 @@ pkgconfig_DATA = libmbus.pc
|
|||||||
|
|
||||||
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
|
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
|
||||||
dist_docdir = $(DESTDIR)$(docdir)
|
dist_docdir = $(DESTDIR)$(docdir)
|
||||||
doc_DATA = README \
|
doc_DATA = README.md \
|
||||||
COPYING \
|
COPYING \
|
||||||
hardware/MBus_USB.pdf \
|
hardware/MBus_USB.pdf \
|
||||||
hardware/MBus_USB.txt
|
hardware/MBus_USB.txt
|
||||||
|
7
README
7
README
@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
libmbus: M-bus Library from Raditex Control (http://www.rscada.se)
|
|
||||||
|
|
||||||
libmbus is an open source library for the M-bus (Meter-Bus) protocol. The Meter-Bus is a standard for reading out meter data from electricity meters, heat meters, gas meters, etc. The M-bus standard deals with both the electrical signals on the M-Bus, and the protocol and data format used in transmissions on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle the communication with M-Bus devices.
|
|
||||||
|
|
||||||
For more information see http://www.rscada.se/libmbus
|
|
||||||
|
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# libmbus: M-bus Library from Raditex Control (http://www.rscada.se) <span style="float:right;"><a href="https://travis-ci.org/rscada/libmbus" style="border-bottom:none"></a></span>
|
||||||
|
|
||||||
|
libmbus is an open source library for the M-bus (Meter-Bus) protocol.
|
||||||
|
|
||||||
|
The Meter-Bus is a standard for reading out meter data from electricity meters,
|
||||||
|
heat meters, gas meters, etc. The M-bus standard deals with both the electrical
|
||||||
|
signals on the M-Bus, and the protocol and data format used in transmissions on
|
||||||
|
the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle
|
||||||
|
the communication with M-Bus devices.
|
||||||
|
|
||||||
|
For more information see http://www.rscada.se/libmbus
|
@ -17,7 +17,8 @@ bin_PROGRAMS = mbus-tcp-scan mbus-tcp-request-data mbus-tcp-request-data-multi
|
|||||||
mbus-tcp-select-secondary mbus-tcp-scan-secondary \
|
mbus-tcp-select-secondary mbus-tcp-scan-secondary \
|
||||||
mbus-serial-scan mbus-serial-request-data mbus-serial-request-data-multi-reply \
|
mbus-serial-scan mbus-serial-request-data mbus-serial-request-data-multi-reply \
|
||||||
mbus-serial-select-secondary mbus-serial-scan-secondary \
|
mbus-serial-select-secondary mbus-serial-scan-secondary \
|
||||||
mbus-serial-switch-baudrate mbus-tcp-raw-send mbus-tcp-application-reset
|
mbus-serial-switch-baudrate mbus-tcp-raw-send mbus-tcp-application-reset \
|
||||||
|
mbus-serial-set-address
|
||||||
|
|
||||||
# tcp
|
# tcp
|
||||||
mbus_tcp_scan_LDFLAGS = -L$(top_builddir)/mbus
|
mbus_tcp_scan_LDFLAGS = -L$(top_builddir)/mbus
|
||||||
@ -73,6 +74,10 @@ mbus_serial_switch_baudrate_LDFLAGS = -L$(top_builddir)/mbus
|
|||||||
mbus_serial_switch_baudrate_LDADD = -lmbus -lm
|
mbus_serial_switch_baudrate_LDADD = -lmbus -lm
|
||||||
mbus_serial_switch_baudrate_SOURCES = mbus-serial-switch-baudrate.c
|
mbus_serial_switch_baudrate_SOURCES = mbus-serial-switch-baudrate.c
|
||||||
|
|
||||||
|
mbus_serial_set_address_LDFLAGS = -L$(top_builddir)/mbus
|
||||||
|
mbus_serial_set_address_LDADD = -lmbus -lm
|
||||||
|
mbus_serial_set_address_SOURCES = mbus-serial-set-address.c
|
||||||
|
|
||||||
# man pages
|
# man pages
|
||||||
dist_man_MANS = libmbus.1 \
|
dist_man_MANS = libmbus.1 \
|
||||||
mbus-tcp-scan.1 \
|
mbus-tcp-scan.1 \
|
||||||
|
@ -10,6 +10,8 @@ the communication with M-Bus devices.
|
|||||||
|
|
||||||
B<mbus-serial-switch-baudrate> [-b BAUDRATE] device address target-baudrate
|
B<mbus-serial-switch-baudrate> [-b BAUDRATE] device address target-baudrate
|
||||||
|
|
||||||
|
B<mbus-serial-set-address> [-d] [-b BAUDRATE] device mbus-address new-primary-address
|
||||||
|
|
||||||
B<mbus-serial-scan> [-d] [-b BAUDRATE] [-r RETRIES] device
|
B<mbus-serial-scan> [-d] [-b BAUDRATE] [-r RETRIES] device
|
||||||
|
|
||||||
B<mbus-tcp-scan> [-d] [-r RETRIES] host port
|
B<mbus-tcp-scan> [-d] [-r RETRIES] host port
|
||||||
|
2
bin/mbus-serial-set-address.1
Normal file
2
bin/mbus-serial-set-address.1
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.so man1/libmbus.1
|
||||||
|
|
229
bin/mbus-serial-set-address.c
Normal file
229
bin/mbus-serial-set-address.c
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2011, Robert Johansson, Raditex AB
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// rSCADA
|
||||||
|
// http://www.rSCADA.se
|
||||||
|
// info@rscada.se
|
||||||
|
//
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <mbus/mbus.h>
|
||||||
|
|
||||||
|
static int debug = 0;
|
||||||
|
|
||||||
|
//
|
||||||
|
// init slave to get really the beginning of the records
|
||||||
|
//
|
||||||
|
static int
|
||||||
|
init_slaves(mbus_handle *handle)
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
printf("%s: debug: sending init frame #1\n", __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
|
if (mbus_send_ping_frame(handle, MBUS_ADDRESS_NETWORK_LAYER, 1) == -1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// resend SND_NKE, maybe the first get lost
|
||||||
|
//
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
printf("%s: debug: sending init frame #2\n", __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
|
if (mbus_send_ping_frame(handle, MBUS_ADDRESS_NETWORK_LAYER, 1) == -1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// set primary address
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
mbus_handle *handle = NULL;
|
||||||
|
mbus_frame reply;
|
||||||
|
char *device, *old_address_str, *xml_result;
|
||||||
|
int old_address, new_address;
|
||||||
|
long baudrate = 9600;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (argc == 4)
|
||||||
|
{
|
||||||
|
device = argv[1];
|
||||||
|
old_address_str = argv[2];
|
||||||
|
new_address = atoi(argv[3]);
|
||||||
|
}
|
||||||
|
else if (argc == 5 && strcmp(argv[1], "-d") == 0)
|
||||||
|
{
|
||||||
|
device = argv[2];
|
||||||
|
old_address_str = argv[3];
|
||||||
|
new_address = atoi(argv[4]);
|
||||||
|
debug = 1;
|
||||||
|
}
|
||||||
|
else if (argc == 6 && strcmp(argv[1], "-b") == 0)
|
||||||
|
{
|
||||||
|
baudrate = atol(argv[2]);
|
||||||
|
device = argv[3];
|
||||||
|
old_address_str = argv[4];
|
||||||
|
new_address = atoi(argv[5]);
|
||||||
|
}
|
||||||
|
else if (argc == 7 && strcmp(argv[1], "-d") == 0 && strcmp(argv[2], "-b") == 0)
|
||||||
|
{
|
||||||
|
baudrate = atol(argv[3]);
|
||||||
|
device = argv[4];
|
||||||
|
old_address_str = argv[5];
|
||||||
|
new_address = atoi(argv[6]);
|
||||||
|
debug = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(stderr, "usage: %s [-d] [-b BAUDRATE] device mbus-address new-primary-address\n", argv[0]);
|
||||||
|
fprintf(stderr, " optional flag -d for debug printout\n");
|
||||||
|
fprintf(stderr, " optional flag -b for selecting baudrate\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_is_primary_address(new_address) == 0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Invalid new primary address\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (new_address)
|
||||||
|
{
|
||||||
|
case MBUS_ADDRESS_NETWORK_LAYER:
|
||||||
|
case MBUS_ADDRESS_BROADCAST_REPLY:
|
||||||
|
case MBUS_ADDRESS_BROADCAST_NOREPLY:
|
||||||
|
fprintf(stderr, "Invalid new primary address\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((handle = mbus_context_serial(device)) == NULL)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Could not initialize M-Bus context: %s\n", mbus_error_str());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
mbus_register_send_event(handle, &mbus_dump_send_event);
|
||||||
|
mbus_register_recv_event(handle, &mbus_dump_recv_event);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_connect(handle) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Failed to setup connection to M-bus gateway\n");
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_serial_set_baudrate(handle, baudrate) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Failed to set baud rate.\n");
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (init_slaves(handle) == 0)
|
||||||
|
{
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_send_ping_frame(handle, new_address, 0) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Verification failed. Could not send ping frame: %s\n", mbus_error_str());
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_recv_frame(handle, &reply) != MBUS_RECV_RESULT_TIMEOUT)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Verification failed. Got a response from new address\n");
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_is_secondary_address(old_address_str))
|
||||||
|
{
|
||||||
|
// secondary addressing
|
||||||
|
|
||||||
|
ret = mbus_select_secondary_address(handle, old_address_str);
|
||||||
|
|
||||||
|
if (ret == MBUS_PROBE_COLLISION)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s: Error: The address mask [%s] matches more than one device.\n", __PRETTY_FUNCTION__, old_address_str);
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (ret == MBUS_PROBE_NOTHING)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s: Error: The selected secondary address does not match any device [%s].\n", __PRETTY_FUNCTION__, old_address_str);
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (ret == MBUS_PROBE_ERROR)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s: Error: Failed to select secondary address [%s].\n", __PRETTY_FUNCTION__, old_address_str);
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// else MBUS_PROBE_SINGLE
|
||||||
|
|
||||||
|
old_address = MBUS_ADDRESS_NETWORK_LAYER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// primary addressing
|
||||||
|
old_address = atoi(old_address_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbus_set_primary_address(handle, old_address, new_address) == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Failed to send set primary address frame: %s\n", mbus_error_str());
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&reply, 0, sizeof(mbus_frame));
|
||||||
|
ret = mbus_recv_frame(handle, &reply);
|
||||||
|
|
||||||
|
if (ret == MBUS_RECV_RESULT_TIMEOUT)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "No reply from device\n");
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (mbus_frame_type(&reply) != MBUS_FRAME_TYPE_ACK)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Unknown reply:\n");
|
||||||
|
mbus_frame_print(&reply);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Set primary address of device to %d\n", new_address);
|
||||||
|
}
|
||||||
|
|
||||||
|
mbus_disconnect(handle);
|
||||||
|
mbus_context_free(handle);
|
||||||
|
return 0;
|
||||||
|
}
|
@ -86,7 +86,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Switched baud rate of device to %lu\n", target_baudrate);
|
printf("Switched baud rate of device to %ld\n", target_baudrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
mbus_disconnect(handle);
|
mbus_disconnect(handle);
|
||||||
|
14
build.sh
14
build.sh
@ -2,19 +2,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if [ -f Makefile ]; then
|
if [ -f Makefile ]; then
|
||||||
#
|
# use existing automake files
|
||||||
# use existing automake files
|
echo >> /dev/null
|
||||||
#
|
|
||||||
echo >> /dev/null
|
|
||||||
else
|
else
|
||||||
#
|
# regenerate automake files
|
||||||
# regenerate automake files
|
|
||||||
#
|
|
||||||
echo "Running autotools..."
|
echo "Running autotools..."
|
||||||
|
|
||||||
autoheader \
|
autoheader \
|
||||||
&& aclocal \
|
&& aclocal \
|
||||||
&& libtoolize --ltdl --copy --force \
|
&& case \
|
||||||
|
$(uname) in Darwin*) glibtoolize --ltdl --copy --force ;; \
|
||||||
|
*) libtoolize --ltdl --copy --force ;; esac \
|
||||||
&& automake --add-missing --copy \
|
&& automake --add-missing --copy \
|
||||||
&& autoconf \
|
&& autoconf \
|
||||||
&& ./configure
|
&& ./configure
|
||||||
|
@ -64,7 +64,7 @@ rm -rf "%buildroot"
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr (-,root,root)
|
%defattr (-,root,root)
|
||||||
%doc COPYING README
|
%doc COPYING README.md
|
||||||
%{_bindir}/mbus-serial-*
|
%{_bindir}/mbus-serial-*
|
||||||
%{_bindir}/mbus-tcp-*
|
%{_bindir}/mbus-tcp-*
|
||||||
%{_libdir}/libmbus.so*
|
%{_libdir}/libmbus.so*
|
||||||
|
@ -154,17 +154,17 @@ mbus_variable_vif vif_table[] = {
|
|||||||
{ 0x56, 1.0e3, "kg/h", "Mass flow" },
|
{ 0x56, 1.0e3, "kg/h", "Mass flow" },
|
||||||
{ 0x57, 1.0e4, "kg/h", "Mass flow" },
|
{ 0x57, 1.0e4, "kg/h", "Mass flow" },
|
||||||
|
|
||||||
/* E101 10nn Flow Temperature <EFBFBD>C (0.001<EFBFBD>C to 1<EFBFBD>C) */
|
/* E101 10nn Flow Temperature °C (0.001°C to 1°C) */
|
||||||
{ 0x58, 1.0e-3, "<EFBFBD>C", "Flow temperature" },
|
{ 0x58, 1.0e-3, "°C", "Flow temperature" },
|
||||||
{ 0x59, 1.0e-2, "<EFBFBD>C", "Flow temperature" },
|
{ 0x59, 1.0e-2, "°C", "Flow temperature" },
|
||||||
{ 0x5A, 1.0e-1, "<EFBFBD>C", "Flow temperature" },
|
{ 0x5A, 1.0e-1, "°C", "Flow temperature" },
|
||||||
{ 0x5B, 1.0e0, "<EFBFBD>C", "Flow temperature" },
|
{ 0x5B, 1.0e0, "°C", "Flow temperature" },
|
||||||
|
|
||||||
/* E101 11nn Return Temperature <EFBFBD>C (0.001<EFBFBD>C to 1<EFBFBD>C) */
|
/* E101 11nn Return Temperature °C (0.001°C to 1°C) */
|
||||||
{ 0x5C, 1.0e-3, "<EFBFBD>C", "Return temperature" },
|
{ 0x5C, 1.0e-3, "°C", "Return temperature" },
|
||||||
{ 0x5D, 1.0e-2, "<EFBFBD>C", "Return temperature" },
|
{ 0x5D, 1.0e-2, "°C", "Return temperature" },
|
||||||
{ 0x5E, 1.0e-1, "<EFBFBD>C", "Return temperature" },
|
{ 0x5E, 1.0e-1, "°C", "Return temperature" },
|
||||||
{ 0x5F, 1.0e0, "<EFBFBD>C", "Return temperature" },
|
{ 0x5F, 1.0e0, "°C", "Return temperature" },
|
||||||
|
|
||||||
/* E110 00nn Temperature Difference K (mK to K) */
|
/* E110 00nn Temperature Difference K (mK to K) */
|
||||||
{ 0x60, 1.0e-3, "K", "Temperature difference" },
|
{ 0x60, 1.0e-3, "K", "Temperature difference" },
|
||||||
@ -172,11 +172,11 @@ mbus_variable_vif vif_table[] = {
|
|||||||
{ 0x62, 1.0e-1, "K", "Temperature difference" },
|
{ 0x62, 1.0e-1, "K", "Temperature difference" },
|
||||||
{ 0x63, 1.0e0, "K", "Temperature difference" },
|
{ 0x63, 1.0e0, "K", "Temperature difference" },
|
||||||
|
|
||||||
/* E110 01nn External Temperature <EFBFBD>C (0.001<EFBFBD>C to 1<EFBFBD>C) */
|
/* E110 01nn External Temperature °C (0.001°C to 1°C) */
|
||||||
{ 0x64, 1.0e-3, "<EFBFBD>C", "External temperature" },
|
{ 0x64, 1.0e-3, "°C", "External temperature" },
|
||||||
{ 0x65, 1.0e-2, "<EFBFBD>C", "External temperature" },
|
{ 0x65, 1.0e-2, "°C", "External temperature" },
|
||||||
{ 0x66, 1.0e-1, "<EFBFBD>C", "External temperature" },
|
{ 0x66, 1.0e-1, "°C", "External temperature" },
|
||||||
{ 0x67, 1.0e0, "<EFBFBD>C", "External temperature" },
|
{ 0x67, 1.0e0, "°C", "External temperature" },
|
||||||
|
|
||||||
/* E110 10nn Pressure bar (1mbar to 1000mbar) */
|
/* E110 10nn Pressure bar (1mbar to 1000mbar) */
|
||||||
{ 0x68, 1.0e-3, "bar", "Pressure" },
|
{ 0x68, 1.0e-3, "bar", "Pressure" },
|
||||||
@ -608,29 +608,29 @@ mbus_variable_vif vif_table[] = {
|
|||||||
{ 0x256, 1.0e0, "Reserved", "Reserved" },
|
{ 0x256, 1.0e0, "Reserved", "Reserved" },
|
||||||
{ 0x257, 1.0e0, "Reserved", "Reserved" },
|
{ 0x257, 1.0e0, "Reserved", "Reserved" },
|
||||||
|
|
||||||
/* E101 10nn Flow Temperature 10(nn-3) <EFBFBD>F 0.001<EFBFBD>F to 1<EFBFBD>F */
|
/* E101 10nn Flow Temperature 10(nn-3) °F 0.001°F to 1°F */
|
||||||
{ 0x258, 1.0e-3, "<EFBFBD>F", "Flow temperature" },
|
{ 0x258, 1.0e-3, "°F", "Flow temperature" },
|
||||||
{ 0x259, 1.0e-2, "<EFBFBD>F", "Flow temperature" },
|
{ 0x259, 1.0e-2, "°F", "Flow temperature" },
|
||||||
{ 0x25A, 1.0e-1, "<EFBFBD>F", "Flow temperature" },
|
{ 0x25A, 1.0e-1, "°F", "Flow temperature" },
|
||||||
{ 0x25B, 1.0e0, "<EFBFBD>F", "Flow temperature" },
|
{ 0x25B, 1.0e0, "°F", "Flow temperature" },
|
||||||
|
|
||||||
/* E101 11nn Return Temperature 10(nn-3) <EFBFBD>F 0.001<EFBFBD>F to 1<EFBFBD>F */
|
/* E101 11nn Return Temperature 10(nn-3) °F 0.001°F to 1°F */
|
||||||
{ 0x25C, 1.0e-3, "<EFBFBD>F", "Return temperature" },
|
{ 0x25C, 1.0e-3, "°F", "Return temperature" },
|
||||||
{ 0x25D, 1.0e-2, "<EFBFBD>F", "Return temperature" },
|
{ 0x25D, 1.0e-2, "°F", "Return temperature" },
|
||||||
{ 0x25E, 1.0e-1, "<EFBFBD>F", "Return temperature" },
|
{ 0x25E, 1.0e-1, "°F", "Return temperature" },
|
||||||
{ 0x25F, 1.0e0, "<EFBFBD>F", "Return temperature" },
|
{ 0x25F, 1.0e0, "°F", "Return temperature" },
|
||||||
|
|
||||||
/* E110 00nn Temperature Difference 10(nn-3) <EFBFBD>F 0.001<EFBFBD>F to 1<EFBFBD>F */
|
/* E110 00nn Temperature Difference 10(nn-3) °F 0.001°F to 1°F */
|
||||||
{ 0x260, 1.0e-3, "<EFBFBD>F", "Temperature difference" },
|
{ 0x260, 1.0e-3, "°F", "Temperature difference" },
|
||||||
{ 0x261, 1.0e-2, "<EFBFBD>F", "Temperature difference" },
|
{ 0x261, 1.0e-2, "°F", "Temperature difference" },
|
||||||
{ 0x262, 1.0e-1, "<EFBFBD>F", "Temperature difference" },
|
{ 0x262, 1.0e-1, "°F", "Temperature difference" },
|
||||||
{ 0x263, 1.0e0, "<EFBFBD>F", "Temperature difference" },
|
{ 0x263, 1.0e0, "°F", "Temperature difference" },
|
||||||
|
|
||||||
/* E110 01nn External Temperature 10(nn-3) <EFBFBD>F 0.001<EFBFBD>F to 1<EFBFBD>F */
|
/* E110 01nn External Temperature 10(nn-3) °F 0.001°F to 1°F */
|
||||||
{ 0x264, 1.0e-3, "<EFBFBD>F", "External temperature" },
|
{ 0x264, 1.0e-3, "°F", "External temperature" },
|
||||||
{ 0x265, 1.0e-2, "<EFBFBD>F", "External temperature" },
|
{ 0x265, 1.0e-2, "°F", "External temperature" },
|
||||||
{ 0x266, 1.0e-1, "<EFBFBD>F", "External temperature" },
|
{ 0x266, 1.0e-1, "°F", "External temperature" },
|
||||||
{ 0x267, 1.0e0, "<EFBFBD>F", "External temperature" },
|
{ 0x267, 1.0e0, "°F", "External temperature" },
|
||||||
|
|
||||||
/* E110 1nnn Reserved */
|
/* E110 1nnn Reserved */
|
||||||
{ 0x268, 1.0e0, "Reserved", "Reserved" },
|
{ 0x268, 1.0e0, "Reserved", "Reserved" },
|
||||||
@ -642,19 +642,19 @@ mbus_variable_vif vif_table[] = {
|
|||||||
{ 0x26E, 1.0e0, "Reserved", "Reserved" },
|
{ 0x26E, 1.0e0, "Reserved", "Reserved" },
|
||||||
{ 0x26F, 1.0e0, "Reserved", "Reserved" },
|
{ 0x26F, 1.0e0, "Reserved", "Reserved" },
|
||||||
|
|
||||||
/* E111 00nn Cold / Warm Temperature Limit 10(nn-3) <EFBFBD>F 0.001<EFBFBD>F to 1<EFBFBD>F */
|
/* E111 00nn Cold / Warm Temperature Limit 10(nn-3) °F 0.001°F to 1°F */
|
||||||
{ 0x270, 1.0e-3, "<EFBFBD>F", "Cold / Warm Temperature Limit" },
|
{ 0x270, 1.0e-3, "°F", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x271, 1.0e-2, "<EFBFBD>F", "Cold / Warm Temperature Limit" },
|
{ 0x271, 1.0e-2, "°F", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x272, 1.0e-1, "<EFBFBD>F", "Cold / Warm Temperature Limit" },
|
{ 0x272, 1.0e-1, "°F", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x273, 1.0e0, "<EFBFBD>F", "Cold / Warm Temperature Limit" },
|
{ 0x273, 1.0e0, "°F", "Cold / Warm Temperature Limit" },
|
||||||
|
|
||||||
/* E111 01nn Cold / Warm Temperature Limit 10(nn-3) <EFBFBD>C 0.001<EFBFBD>C to 1<EFBFBD>C */
|
/* E111 01nn Cold / Warm Temperature Limit 10(nn-3) °C 0.001°C to 1°C */
|
||||||
{ 0x274, 1.0e-3, "<EFBFBD>C", "Cold / Warm Temperature Limit" },
|
{ 0x274, 1.0e-3, "°C", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x275, 1.0e-2, "<EFBFBD>C", "Cold / Warm Temperature Limit" },
|
{ 0x275, 1.0e-2, "°C", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x276, 1.0e-1, "<EFBFBD>C", "Cold / Warm Temperature Limit" },
|
{ 0x276, 1.0e-1, "°C", "Cold / Warm Temperature Limit" },
|
||||||
{ 0x277, 1.0e0, "<EFBFBD>C", "Cold / Warm Temperature Limit" },
|
{ 0x277, 1.0e0, "°C", "Cold / Warm Temperature Limit" },
|
||||||
|
|
||||||
/* E111 1nnn cumul. count max power <EFBFBD> 10(nnn-3) W 0.001W to 10000W */
|
/* E111 1nnn cumul. count max power § 10(nnn-3) W 0.001W to 10000W */
|
||||||
{ 0x278, 1.0e-3, "W", "Cumul count max power" },
|
{ 0x278, 1.0e-3, "W", "Cumul count max power" },
|
||||||
{ 0x279, 1.0e-3, "W", "Cumul count max power" },
|
{ 0x279, 1.0e-3, "W", "Cumul count max power" },
|
||||||
{ 0x27A, 1.0e-1, "W", "Cumul count max power" },
|
{ 0x27A, 1.0e-1, "W", "Cumul count max power" },
|
||||||
@ -730,7 +730,7 @@ mbus_variable_vif fixed_table[] = {
|
|||||||
{ 0x36, 1.0e1, "m^3/h", "Volume flow" },
|
{ 0x36, 1.0e1, "m^3/h", "Volume flow" },
|
||||||
{ 0x37, 1.0e2, "m^3/h", "Volume flow" },
|
{ 0x37, 1.0e2, "m^3/h", "Volume flow" },
|
||||||
|
|
||||||
{ 0x38, 1.0e-3, "<EFBFBD>C", "Temperature" },
|
{ 0x38, 1.0e-3, "°C", "Temperature" },
|
||||||
|
|
||||||
{ 0x39, 1.0e0, "Units for H.C.A.", "H.C.A." },
|
{ 0x39, 1.0e0, "Units for H.C.A.", "H.C.A." },
|
||||||
|
|
||||||
@ -857,6 +857,7 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
MBUS_ERROR("Unable to allocate memory");
|
MBUS_ERROR("Unable to allocate memory");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
*value_out_str[0] = '\0';
|
||||||
*value_out_str_size = 0;
|
*value_out_str_size = 0;
|
||||||
result = 0;
|
result = 0;
|
||||||
break;
|
break;
|
||||||
@ -877,7 +878,7 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*value_out_str_size = snprintf(*value_out_str, 11, "%04d-%02d-%02d",
|
*value_out_str_size = snprintf(*value_out_str, 11, "%04d-%02d-%02d",
|
||||||
(time.tm_year + 2000),
|
(time.tm_year + 1900),
|
||||||
(time.tm_mon + 1),
|
(time.tm_mon + 1),
|
||||||
time.tm_mday);
|
time.tm_mday);
|
||||||
result = 0;
|
result = 0;
|
||||||
@ -885,7 +886,7 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
else // normal integer
|
else // normal integer
|
||||||
{
|
{
|
||||||
result = mbus_data_int_decode(record->data, 2, &value_out_int);
|
result = mbus_data_int_decode(record->data, 2, &value_out_int);
|
||||||
*value_out_real = value_out_int;
|
*value_out_real = value_out_int;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -903,13 +904,13 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
((record->drh.vib.vif == 0xFD) && (vife == 0x70)))
|
((record->drh.vib.vif == 0xFD) && (vife == 0x70)))
|
||||||
{
|
{
|
||||||
mbus_data_tm_decode(&time, record->data, 4);
|
mbus_data_tm_decode(&time, record->data, 4);
|
||||||
if ((*value_out_str = (char*) malloc(20)) == NULL)
|
if ((*value_out_str = (char*) malloc(21)) == NULL)
|
||||||
{
|
{
|
||||||
MBUS_ERROR("Unable to allocate memory");
|
MBUS_ERROR("Unable to allocate memory");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*value_out_str_size = snprintf(*value_out_str, 20, "%04d-%02d-%02dT%02d:%02d:%02d",
|
*value_out_str_size = snprintf(*value_out_str, 21, "%04d-%02d-%02dT%02d:%02d:%02dZ",
|
||||||
(time.tm_year + 2000),
|
(time.tm_year + 1900),
|
||||||
(time.tm_mon + 1),
|
(time.tm_mon + 1),
|
||||||
time.tm_mday,
|
time.tm_mday,
|
||||||
time.tm_hour,
|
time.tm_hour,
|
||||||
@ -920,7 +921,7 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
else // normal integer
|
else // normal integer
|
||||||
{
|
{
|
||||||
result = mbus_data_int_decode(record->data, 4, &value_out_int);
|
result = mbus_data_int_decode(record->data, 4, &value_out_int);
|
||||||
*value_out_real = value_out_int;
|
*value_out_real = value_out_int;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -930,8 +931,33 @@ int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x06: /* 6 byte integer (48 bit) */
|
case 0x06: /* 6 byte integer (48 bit) */
|
||||||
result = mbus_data_long_long_decode(record->data, 6, &value_out_long_long);
|
// E110 1101 Time Point (date/time)
|
||||||
*value_out_real = value_out_long_long;
|
// E011 0000 Start (date/time) of tariff
|
||||||
|
// E111 0000 Date and time of battery change
|
||||||
|
if ( (vif == 0x6D) ||
|
||||||
|
((record->drh.vib.vif == 0xFD) && (vife == 0x30)) ||
|
||||||
|
((record->drh.vib.vif == 0xFD) && (vife == 0x70)))
|
||||||
|
{
|
||||||
|
mbus_data_tm_decode(&time, record->data, 6);
|
||||||
|
if ((*value_out_str = (char*) malloc(21)) == NULL)
|
||||||
|
{
|
||||||
|
MBUS_ERROR("Unable to allocate memory");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*value_out_str_size = snprintf(*value_out_str, 21, "%04d-%02d-%02dT%02d:%02d:%02dZ",
|
||||||
|
(time.tm_year + 1900),
|
||||||
|
(time.tm_mon + 1),
|
||||||
|
time.tm_mday,
|
||||||
|
time.tm_hour,
|
||||||
|
time.tm_min,
|
||||||
|
time.tm_sec);
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
else // normal integer
|
||||||
|
{
|
||||||
|
result = mbus_data_long_long_decode(record->data, 6, &value_out_long_long);
|
||||||
|
*value_out_real = value_out_long_long;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07: /* 8 byte integer (64 bit) */
|
case 0x07: /* 8 byte integer (64 bit) */
|
||||||
@ -1260,7 +1286,7 @@ mbus_parse_variable_record(mbus_data_record *data)
|
|||||||
MBUS_ERROR("%s: memory allocation error\n", __PRETTY_FUNCTION__);
|
MBUS_ERROR("%s: memory allocation error\n", __PRETTY_FUNCTION__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
record->storage_number = mbus_data_record_storage_number(data);
|
record->storage_number = mbus_data_record_storage_number(data);
|
||||||
record->tariff = mbus_data_record_tariff(data);
|
record->tariff = mbus_data_record_tariff(data);
|
||||||
record->device = mbus_data_record_device(data);
|
record->device = mbus_data_record_device(data);
|
||||||
@ -1362,7 +1388,7 @@ mbus_data_variable_xml_normalized(mbus_data_variable *data)
|
|||||||
mbus_data_record *record;
|
mbus_data_record *record;
|
||||||
mbus_record *norm_record;
|
mbus_record *norm_record;
|
||||||
char *buff = NULL, *new_buff = NULL;
|
char *buff = NULL, *new_buff = NULL;
|
||||||
char str_encoded[768];
|
char str_encoded[768] = "";
|
||||||
size_t len = 0, buff_size = 8192;
|
size_t len = 0, buff_size = 8192;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
@ -1398,7 +1424,7 @@ mbus_data_variable_xml_normalized(mbus_data_variable *data)
|
|||||||
buff = new_buff;
|
buff = new_buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, " <DataRecord id=\"%zd\">\n", i);
|
len += snprintf(&buff[len], buff_size - len, " <DataRecord id=\"%zu\">\n", i);
|
||||||
|
|
||||||
if (norm_record != NULL)
|
if (norm_record != NULL)
|
||||||
{
|
{
|
||||||
@ -1787,7 +1813,7 @@ mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baudrate
|
|||||||
control_information = MBUS_CONTROL_INFO_SET_BAUDRATE_38400;
|
control_information = MBUS_CONTROL_INFO_SET_BAUDRATE_38400;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
MBUS_ERROR("%s: invalid baudrate %lu\n", __PRETTY_FUNCTION__, baudrate);
|
MBUS_ERROR("%s: invalid baudrate %ld\n", __PRETTY_FUNCTION__, baudrate);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1927,7 +1953,7 @@ mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char
|
|||||||
|
|
||||||
if ((data_size > MBUS_FRAME_DATA_LENGTH) || (data_size == 0))
|
if ((data_size > MBUS_FRAME_DATA_LENGTH) || (data_size == 0))
|
||||||
{
|
{
|
||||||
MBUS_ERROR("%s: illegal data_size %d\n", __PRETTY_FUNCTION__, data_size);
|
MBUS_ERROR("%s: illegal data_size %zu\n", __PRETTY_FUNCTION__, data_size);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1955,6 +1981,33 @@ mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// send a request from master to slave in order to change the primary address
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
int
|
||||||
|
mbus_set_primary_address(mbus_handle * handle, int old_address, int new_address)
|
||||||
|
{
|
||||||
|
/* primary address record, see chapter 6.4.2 */
|
||||||
|
unsigned char buffer[3] = { 0x01, 0x7A, new_address };
|
||||||
|
|
||||||
|
if (mbus_is_primary_address(new_address) == 0)
|
||||||
|
{
|
||||||
|
MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, new_address);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (new_address)
|
||||||
|
{
|
||||||
|
case MBUS_ADDRESS_NETWORK_LAYER:
|
||||||
|
case MBUS_ADDRESS_BROADCAST_REPLY:
|
||||||
|
case MBUS_ADDRESS_BROADCAST_NOREPLY:
|
||||||
|
MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, new_address);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mbus_send_user_data_frame(handle, old_address, buffer, sizeof(buffer));
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// send a request from master to slave and collect the reply (replies)
|
// send a request from master to slave and collect the reply (replies)
|
||||||
// from the slave.
|
// from the slave.
|
||||||
@ -2278,7 +2331,7 @@ mbus_probe_secondary_address(mbus_handle *handle, const char *mask, char *matchi
|
|||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
{
|
{
|
||||||
// show error message, but procede with scan
|
// show error message, but procede with scan
|
||||||
MBUS_ERROR("Failed to generate secondary address from M-Bus reply frame: %s\n",
|
MBUS_ERROR("Failed to generate secondary address from M-Bus reply frame: %s\n",
|
||||||
mbus_error_str());
|
mbus_error_str());
|
||||||
return MBUS_PROBE_NOTHING;
|
return MBUS_PROBE_NOTHING;
|
||||||
}
|
}
|
||||||
|
@ -307,6 +307,17 @@ int mbus_send_request_frame(mbus_handle * handle, int address);
|
|||||||
*/
|
*/
|
||||||
int mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char *data, size_t data_size);
|
int mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char *data, size_t data_size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends frame to change primary address of given slave using "unified" handle
|
||||||
|
*
|
||||||
|
* @param handle Initialized handle
|
||||||
|
* @param old_address Old Address (0-255)
|
||||||
|
* @param new_address New Address (0-250)
|
||||||
|
*
|
||||||
|
* @return Zero when successful.
|
||||||
|
*/
|
||||||
|
int mbus_set_primary_address(mbus_handle * handle, int old_address, int new_address);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a request and read replies until no more records available
|
* Sends a request and read replies until no more records available
|
||||||
* or limit is reached.
|
* or limit is reached.
|
||||||
@ -429,7 +440,7 @@ int mbus_data_fixed_normalize(int medium_unit_byte, long medium_value, char **un
|
|||||||
*
|
*
|
||||||
* @return zero when OK
|
* @return zero when OK
|
||||||
*/
|
*/
|
||||||
int mbus_data_variable_value_decode(mbus_record *record, double *value_out_real, char **value_out_str, int *value_out_str_size);
|
int mbus_variable_value_decode(mbus_data_record *record, double *value_out_real, char **value_out_str, int *value_out_str_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode units and normalize value using VIF/VIFE (used internally by mbus_vib_unit_normalize)
|
* Decode units and normalize value using VIF/VIFE (used internally by mbus_vib_unit_normalize)
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -462,9 +461,9 @@ mbus_data_bcd_encode(unsigned char *bcd_data, size_t bcd_data_size, int value)
|
|||||||
int v0, v1, v2, x1, x2;
|
int v0, v1, v2, x1, x2;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (bcd_data && bcd_data_size && (value >= 0))
|
if (bcd_data && bcd_data_size)
|
||||||
{
|
{
|
||||||
v2 = value;
|
v2 = abs(value);
|
||||||
|
|
||||||
for (i = 0; i < bcd_data_size; i++)
|
for (i = 0; i < bcd_data_size; i++)
|
||||||
{
|
{
|
||||||
@ -478,6 +477,11 @@ mbus_data_bcd_encode(unsigned char *bcd_data, size_t bcd_data_size, int value)
|
|||||||
bcd_data[bcd_data_size-1-i] = (x2 << 4) | x1;
|
bcd_data[bcd_data_size-1-i] = (x2 << 4) | x1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value < 0)
|
||||||
|
{
|
||||||
|
bcd_data[bcd_data_size-1] |= 0xF0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,8 +503,20 @@ mbus_data_bcd_decode(unsigned char *bcd_data, size_t bcd_data_size)
|
|||||||
{
|
{
|
||||||
for (i = bcd_data_size; i > 0; i--)
|
for (i = bcd_data_size; i > 0; i--)
|
||||||
{
|
{
|
||||||
val = (val * 10) + ((bcd_data[i-1]>>4) & 0xF);
|
val = (val * 10);
|
||||||
val = (val * 10) + ( bcd_data[i-1] & 0xF);
|
|
||||||
|
if (bcd_data[i-1]>>4 < 0xA)
|
||||||
|
{
|
||||||
|
val += ((bcd_data[i-1]>>4) & 0xF);
|
||||||
|
}
|
||||||
|
|
||||||
|
val = (val * 10) + ( bcd_data[i-1] & 0xF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// hex code Fh in the MSD position signals a negative BCD number
|
||||||
|
if (bcd_data[bcd_data_size-1]>>4 == 0xF)
|
||||||
|
{
|
||||||
|
val *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
@ -559,9 +575,9 @@ mbus_data_long_decode(unsigned char *int_data, size_t int_data_size, long *value
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
neg = int_data[int_data_size-1] & 0x80;
|
neg = int_data[int_data_size-1] & 0x80;
|
||||||
|
|
||||||
for (i = int_data_size; i > 0; i--)
|
for (i = int_data_size; i > 0; i--)
|
||||||
{
|
{
|
||||||
if (neg)
|
if (neg)
|
||||||
@ -649,6 +665,7 @@ mbus_data_int_encode(unsigned char *int_data, size_t int_data_size, int value)
|
|||||||
float
|
float
|
||||||
mbus_data_float_decode(unsigned char *float_data)
|
mbus_data_float_decode(unsigned char *float_data)
|
||||||
{
|
{
|
||||||
|
#ifdef _HAS_NON_IEEE754_FLOAT
|
||||||
float val = 0.0f;
|
float val = 0.0f;
|
||||||
long temp = 0, fraction;
|
long temp = 0, fraction;
|
||||||
int sign,exponent;
|
int sign,exponent;
|
||||||
@ -682,8 +699,19 @@ mbus_data_float_decode(unsigned char *float_data)
|
|||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (float_data)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
uint32_t u32;
|
||||||
|
float f;
|
||||||
|
} data;
|
||||||
|
memcpy(&(data.u32), float_data, sizeof(uint32_t));
|
||||||
|
return data.f;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return -1.0;
|
return -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -739,7 +767,15 @@ mbus_data_bin_decode(unsigned char *dst, const unsigned char *src, size_t len, s
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
/// Decode time data (usable for type f = 4 bytes or type g = 2 bytes)
|
/// Decode time data
|
||||||
|
///
|
||||||
|
/// Usable for the following types:
|
||||||
|
/// I = 6 bytes (Date and time)
|
||||||
|
/// F = 4 bytes (Date and time)
|
||||||
|
/// G = 2 bytes (Date)
|
||||||
|
///
|
||||||
|
/// TODO:
|
||||||
|
/// J = 3 bytes (Time)
|
||||||
///
|
///
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
@ -762,7 +798,21 @@ mbus_data_tm_decode(struct tm *t, unsigned char *t_data, size_t t_data_size)
|
|||||||
|
|
||||||
if (t_data)
|
if (t_data)
|
||||||
{
|
{
|
||||||
if (t_data_size == 4) // Type F = Compound CP32: Date and Time
|
if (t_data_size == 6) // Type I = Compound CP48: Date and Time
|
||||||
|
{
|
||||||
|
if ((t_data[1] & 0x80) == 0) // Time valid ?
|
||||||
|
{
|
||||||
|
t->tm_sec = t_data[0] & 0x3F;
|
||||||
|
t->tm_min = t_data[1] & 0x3F;
|
||||||
|
t->tm_hour = t_data[2] & 0x1F;
|
||||||
|
t->tm_mday = t_data[3] & 0x1F;
|
||||||
|
t->tm_mon = (t_data[4] & 0x0F) - 1;
|
||||||
|
t->tm_year = 100 + (((t_data[3] & 0xE0) >> 5) |
|
||||||
|
((t_data[4] & 0xF0) >> 1));
|
||||||
|
t->tm_isdst = (t_data[0] & 0x40) ? 1 : 0; // day saving time
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (t_data_size == 4) // Type F = Compound CP32: Date and Time
|
||||||
{
|
{
|
||||||
if ((t_data[0] & 0x80) == 0) // Time valid ?
|
if ((t_data[0] & 0x80) == 0) // Time valid ?
|
||||||
{
|
{
|
||||||
@ -770,8 +820,8 @@ mbus_data_tm_decode(struct tm *t, unsigned char *t_data, size_t t_data_size)
|
|||||||
t->tm_hour = t_data[1] & 0x1F;
|
t->tm_hour = t_data[1] & 0x1F;
|
||||||
t->tm_mday = t_data[2] & 0x1F;
|
t->tm_mday = t_data[2] & 0x1F;
|
||||||
t->tm_mon = (t_data[3] & 0x0F) - 1;
|
t->tm_mon = (t_data[3] & 0x0F) - 1;
|
||||||
t->tm_year = ((t_data[2] & 0xE0) >> 5) |
|
t->tm_year = 100 + (((t_data[2] & 0xE0) >> 5) |
|
||||||
((t_data[3] & 0xF0) >> 1);
|
((t_data[3] & 0xF0) >> 1));
|
||||||
t->tm_isdst = (t_data[1] & 0x80) ? 1 : 0; // day saving time
|
t->tm_isdst = (t_data[1] & 0x80) ? 1 : 0; // day saving time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -779,8 +829,8 @@ mbus_data_tm_decode(struct tm *t, unsigned char *t_data, size_t t_data_size)
|
|||||||
{
|
{
|
||||||
t->tm_mday = t_data[0] & 0x1F;
|
t->tm_mday = t_data[0] & 0x1F;
|
||||||
t->tm_mon = (t_data[1] & 0x0F) - 1;
|
t->tm_mon = (t_data[1] & 0x0F) - 1;
|
||||||
t->tm_year = ((t_data[0] & 0xE0) >> 5) |
|
t->tm_year = 100 + (((t_data[0] & 0xE0) >> 5) |
|
||||||
((t_data[1] & 0xF0) >> 1);
|
((t_data[1] & 0xF0) >> 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -844,7 +894,18 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
{
|
{
|
||||||
manufacturer = (header->manufacturer[1] << 8) + header->manufacturer[0];
|
manufacturer = (header->manufacturer[1] << 8) + header->manufacturer[0];
|
||||||
|
|
||||||
if (manufacturer == mbus_manufacturer_id("ACW"))
|
// please keep this list ordered by manufacturer code
|
||||||
|
|
||||||
|
if (manufacturer == mbus_manufacturer_id("ABB"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x02:
|
||||||
|
strcpy(buff,"ABB Delta-Meter");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("ACW"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
{
|
{
|
||||||
@ -880,6 +941,30 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("BEC"))
|
||||||
|
{
|
||||||
|
if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_ELECTRICITY)
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x00:
|
||||||
|
strcpy(buff,"Berg DCMi");
|
||||||
|
break;
|
||||||
|
case 0x07:
|
||||||
|
strcpy(buff,"Berg BLMi");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_UNKNOWN)
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x71:
|
||||||
|
strcpy(buff, "Berg BMB-10S0");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("EFE"))
|
else if (manufacturer == mbus_manufacturer_id("EFE"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -896,6 +981,12 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
{
|
{
|
||||||
|
case 0x02:
|
||||||
|
strcpy(buff,"Elster TMP-A");
|
||||||
|
break;
|
||||||
|
case 0x0A:
|
||||||
|
strcpy(buff,"Elster Falcon");
|
||||||
|
break;
|
||||||
case 0x2F:
|
case 0x2F:
|
||||||
strcpy(buff,"Elster F96 Plus");
|
strcpy(buff,"Elster F96 Plus");
|
||||||
break;
|
break;
|
||||||
@ -931,6 +1022,15 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("EMH"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x00:
|
||||||
|
strcpy(buff,"EMH DIZ");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("EMU"))
|
else if (manufacturer == mbus_manufacturer_id("EMU"))
|
||||||
{
|
{
|
||||||
if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_ELECTRICITY)
|
if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_ELECTRICITY)
|
||||||
@ -943,6 +1043,28 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("GAV"))
|
||||||
|
{
|
||||||
|
if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_ELECTRICITY)
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x2D:
|
||||||
|
case 0x2E:
|
||||||
|
case 0x2F:
|
||||||
|
case 0x30:
|
||||||
|
strcpy(buff,"Carlo Gavazzi EM24");
|
||||||
|
break;
|
||||||
|
case 0x39:
|
||||||
|
case 0x3A:
|
||||||
|
strcpy(buff,"Carlo Gavazzi EM21");
|
||||||
|
break;
|
||||||
|
case 0x40:
|
||||||
|
strcpy(buff,"Carlo Gavazzi EM33");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("GMC"))
|
else if (manufacturer == mbus_manufacturer_id("GMC"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -952,6 +1074,18 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("KAM"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x01:
|
||||||
|
strcpy(buff,"Kamstrup 382 (6850-005)");
|
||||||
|
break;
|
||||||
|
case 0x08:
|
||||||
|
strcpy(buff,"Kamstrup Multical 601");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("SLB"))
|
else if (manufacturer == mbus_manufacturer_id("SLB"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -971,6 +1105,21 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
case 0x28:
|
case 0x28:
|
||||||
strcpy(buff,"ABB F95 Typ US770");
|
strcpy(buff,"ABB F95 Typ US770");
|
||||||
break;
|
break;
|
||||||
|
case 0x2F:
|
||||||
|
strcpy(buff,"Hydrometer Sharky 775");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("JAN"))
|
||||||
|
{
|
||||||
|
if (header->medium == MBUS_VARIABLE_DATA_MEDIUM_ELECTRICITY)
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x09:
|
||||||
|
strcpy(buff,"Janitza UMG 96S");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("LUG"))
|
else if (manufacturer == mbus_manufacturer_id("LUG"))
|
||||||
@ -991,6 +1140,27 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("LSE"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x99:
|
||||||
|
strcpy(buff,"Siemens WFH21");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("NZR"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x01:
|
||||||
|
strcpy(buff,"NZR DHZ 5/63");
|
||||||
|
break;
|
||||||
|
case 0x50:
|
||||||
|
strcpy(buff,"NZR IC-M2");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("RAM"))
|
else if (manufacturer == mbus_manufacturer_id("RAM"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -1000,6 +1170,27 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("REL"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x08:
|
||||||
|
strcpy(buff, "Relay PadPuls M1");
|
||||||
|
break;
|
||||||
|
case 0x12:
|
||||||
|
strcpy(buff, "Relay PadPuls M4");
|
||||||
|
break;
|
||||||
|
case 0x20:
|
||||||
|
strcpy(buff, "Relay Padin 4");
|
||||||
|
break;
|
||||||
|
case 0x30:
|
||||||
|
strcpy(buff, "Relay AnDi 4");
|
||||||
|
break;
|
||||||
|
case 0x40:
|
||||||
|
strcpy(buff, "Relay PadPuls M2");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("RKE"))
|
else if (manufacturer == mbus_manufacturer_id("RKE"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -1009,33 +1200,16 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("SVM"))
|
else if (manufacturer == mbus_manufacturer_id("SBC"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->id_bcd[3])
|
||||||
{
|
{
|
||||||
case 0x08:
|
case 0x10:
|
||||||
strcpy(buff,"Elster F2 / Deltamess F2");
|
case 0x19:
|
||||||
|
strcpy(buff,"Saia-Burgess ALE3");
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x11:
|
||||||
strcpy(buff,"Elster F4 / Kamstrup SVM F22");
|
strcpy(buff,"Saia-Burgess AWD3");
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (manufacturer == mbus_manufacturer_id("SON"))
|
|
||||||
{
|
|
||||||
switch (header->version)
|
|
||||||
{
|
|
||||||
case 0x0D:
|
|
||||||
strcpy(buff,"Sontex Supercal 531");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (manufacturer == mbus_manufacturer_id("LSE"))
|
|
||||||
{
|
|
||||||
switch (header->version)
|
|
||||||
{
|
|
||||||
case 0x99:
|
|
||||||
strcpy(buff,"Siemens WFH21");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1054,6 +1228,15 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (manufacturer == mbus_manufacturer_id("SON"))
|
||||||
|
{
|
||||||
|
switch (header->version)
|
||||||
|
{
|
||||||
|
case 0x0D:
|
||||||
|
strcpy(buff,"Sontex Supercal 531");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("SPX"))
|
else if (manufacturer == mbus_manufacturer_id("SPX"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
@ -1064,46 +1247,15 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("ELS"))
|
else if (manufacturer == mbus_manufacturer_id("SVM"))
|
||||||
{
|
{
|
||||||
switch (header->version)
|
switch (header->version)
|
||||||
{
|
{
|
||||||
case 0x02:
|
|
||||||
strcpy(buff,"Elster TMP-A");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (manufacturer == mbus_manufacturer_id("NZR"))
|
|
||||||
{
|
|
||||||
switch (header->version)
|
|
||||||
{
|
|
||||||
case 0x01:
|
|
||||||
strcpy(buff,"NZR DHZ 5/63");
|
|
||||||
break;
|
|
||||||
case 0x50:
|
|
||||||
strcpy(buff,"NZR IC-M2");
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (manufacturer == mbus_manufacturer_id("KAM"))
|
|
||||||
{
|
|
||||||
switch (header->version)
|
|
||||||
{
|
|
||||||
case 0x01:
|
|
||||||
strcpy(buff,"Kamstrup 382 (6850-005)");
|
|
||||||
break;
|
|
||||||
case 0x08:
|
case 0x08:
|
||||||
strcpy(buff,"Kamstrup Multical 601");
|
strcpy(buff,"Elster F2 / Deltamess F2");
|
||||||
break;
|
break;
|
||||||
}
|
case 0x09:
|
||||||
}
|
strcpy(buff,"Elster F4 / Kamstrup SVM F22");
|
||||||
else if (manufacturer == mbus_manufacturer_id("EMH"))
|
|
||||||
{
|
|
||||||
switch (header->version)
|
|
||||||
{
|
|
||||||
case 0x00:
|
|
||||||
strcpy(buff,"EMH DIZ");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1128,19 +1280,6 @@ mbus_data_product_name(mbus_data_variable_header *header)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (manufacturer == mbus_manufacturer_id("SBC"))
|
|
||||||
{
|
|
||||||
switch (header->id_bcd[3])
|
|
||||||
{
|
|
||||||
case 0x10:
|
|
||||||
case 0x19:
|
|
||||||
strcpy(buff,"Saia-Burgess ALE3");
|
|
||||||
break;
|
|
||||||
case 0x11:
|
|
||||||
strcpy(buff,"Saia-Burgess AWD3");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2339,7 +2478,7 @@ mbus_data_record_decode(mbus_data_record *record)
|
|||||||
{
|
{
|
||||||
mbus_data_tm_decode(&time, record->data, 2);
|
mbus_data_tm_decode(&time, record->data, 2);
|
||||||
snprintf(buff, sizeof(buff), "%04d-%02d-%02d",
|
snprintf(buff, sizeof(buff), "%04d-%02d-%02d",
|
||||||
(time.tm_year + 2000),
|
(time.tm_year + 1900),
|
||||||
(time.tm_mon + 1),
|
(time.tm_mon + 1),
|
||||||
time.tm_mday);
|
time.tm_mday);
|
||||||
}
|
}
|
||||||
@ -2376,7 +2515,7 @@ mbus_data_record_decode(mbus_data_record *record)
|
|||||||
{
|
{
|
||||||
mbus_data_tm_decode(&time, record->data, 4);
|
mbus_data_tm_decode(&time, record->data, 4);
|
||||||
snprintf(buff, sizeof(buff), "%04d-%02d-%02dT%02d:%02d:%02d",
|
snprintf(buff, sizeof(buff), "%04d-%02d-%02dT%02d:%02d:%02d",
|
||||||
(time.tm_year + 2000),
|
(time.tm_year + 1900),
|
||||||
(time.tm_mon + 1),
|
(time.tm_mon + 1),
|
||||||
time.tm_mday,
|
time.tm_mday,
|
||||||
time.tm_hour,
|
time.tm_hour,
|
||||||
@ -2405,11 +2544,29 @@ mbus_data_record_decode(mbus_data_record *record)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x06: // 6 byte integer (48 bit)
|
case 0x06: // 6 byte (48 bit)
|
||||||
|
|
||||||
mbus_data_long_long_decode(record->data, 6, &long_long_val);
|
// E110 1101 Time Point (date/time)
|
||||||
|
// E011 0000 Start (date/time) of tariff
|
||||||
snprintf(buff, sizeof(buff), "%lld", long_long_val);
|
// E111 0000 Date and time of battery change
|
||||||
|
if ( (vif == 0x6D) ||
|
||||||
|
((record->drh.vib.vif == 0xFD) && (vife == 0x30)) ||
|
||||||
|
((record->drh.vib.vif == 0xFD) && (vife == 0x70)))
|
||||||
|
{
|
||||||
|
mbus_data_tm_decode(&time, record->data, 6);
|
||||||
|
snprintf(buff, sizeof(buff), "%04d-%02d-%02dT%02d:%02d:%02d",
|
||||||
|
(time.tm_year + 1900),
|
||||||
|
(time.tm_mon + 1),
|
||||||
|
time.tm_mday,
|
||||||
|
time.tm_hour,
|
||||||
|
time.tm_min,
|
||||||
|
time.tm_sec);
|
||||||
|
}
|
||||||
|
else // 6 byte integer
|
||||||
|
{
|
||||||
|
mbus_data_long_long_decode(record->data, 6, &long_long_val);
|
||||||
|
snprintf(buff, sizeof(buff), "%lld", long_long_val);
|
||||||
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("%s: DIF 0x%.2x was decoded using 6 byte integer\n", __PRETTY_FUNCTION__, record->drh.dib.dif);
|
printf("%s: DIF 0x%.2x was decoded using 6 byte integer\n", __PRETTY_FUNCTION__, record->drh.dib.dif);
|
||||||
@ -3506,7 +3663,7 @@ mbus_data_variable_print(mbus_data_variable *data)
|
|||||||
if ((record->drh.dib.dif == MBUS_DIB_DIF_MANUFACTURER_SPECIFIC) ||
|
if ((record->drh.dib.dif == MBUS_DIB_DIF_MANUFACTURER_SPECIFIC) ||
|
||||||
(record->drh.dib.dif == MBUS_DIB_DIF_MORE_RECORDS_FOLLOW)) //MBUS_DIB_DIF_VENDOR_SPECIFIC
|
(record->drh.dib.dif == MBUS_DIB_DIF_MORE_RECORDS_FOLLOW)) //MBUS_DIB_DIF_VENDOR_SPECIFIC
|
||||||
{
|
{
|
||||||
printf("%s: VENDOR DATA [size=%zd] = ", __PRETTY_FUNCTION__, record->data_len);
|
printf("%s: VENDOR DATA [size=%zu] = ", __PRETTY_FUNCTION__, record->data_len);
|
||||||
for (j = 0; j < record->data_len; j++)
|
for (j = 0; j < record->data_len; j++)
|
||||||
{
|
{
|
||||||
printf("%.2X ", record->data[j]);
|
printf("%.2X ", record->data[j]);
|
||||||
@ -3521,18 +3678,18 @@ mbus_data_variable_print(mbus_data_variable *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculate length of data record
|
// calculate length of data record
|
||||||
printf("DATA LENGTH = %zd\n", record->data_len);
|
printf("DATA LENGTH = %zu\n", record->data_len);
|
||||||
|
|
||||||
// DIFE
|
// DIFE
|
||||||
for (j = 0; j < record->drh.dib.ndife; j++)
|
for (j = 0; j < record->drh.dib.ndife; j++)
|
||||||
{
|
{
|
||||||
unsigned char dife = record->drh.dib.dife[j];
|
unsigned char dife = record->drh.dib.dife[j];
|
||||||
|
|
||||||
printf("DIFE[%zd] = %.2X\n", j, dife);
|
printf("DIFE[%zu] = %.2X\n", j, dife);
|
||||||
printf("DIFE[%zd].Extension = %s\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_EXTENSION) ? "Yes" : "No");
|
printf("DIFE[%zu].Extension = %s\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_EXTENSION) ? "Yes" : "No");
|
||||||
printf("DIFE[%zd].Device = %d\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_DEVICE) >> 6 );
|
printf("DIFE[%zu].Device = %d\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_DEVICE) >> 6 );
|
||||||
printf("DIFE[%zd].Tariff = %d\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_TARIFF) >> 4 );
|
printf("DIFE[%zu].Tariff = %d\n", j, (dife & MBUS_DATA_RECORD_DIFE_MASK_TARIFF) >> 4 );
|
||||||
printf("DIFE[%zd].StorageNumber = %.2X\n", j, dife & MBUS_DATA_RECORD_DIFE_MASK_STORAGE_NO);
|
printf("DIFE[%zu].StorageNumber = %.2X\n", j, dife & MBUS_DATA_RECORD_DIFE_MASK_STORAGE_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// VIF
|
// VIF
|
||||||
@ -3545,9 +3702,9 @@ mbus_data_variable_print(mbus_data_variable *data)
|
|||||||
{
|
{
|
||||||
unsigned char vife = record->drh.vib.vife[j];
|
unsigned char vife = record->drh.vib.vife[j];
|
||||||
|
|
||||||
printf("VIFE[%zd] = %.2X\n", j, vife);
|
printf("VIFE[%zu] = %.2X\n", j, vife);
|
||||||
printf("VIFE[%zd].Extension = %s\n", j, (vife & MBUS_DIB_VIF_EXTENSION_BIT) ? "Yes" : "No");
|
printf("VIFE[%zu].Extension = %s\n", j, (vife & MBUS_DIB_VIF_EXTENSION_BIT) ? "Yes" : "No");
|
||||||
printf("VIFE[%zd].Value = %.2X\n", j, vife & MBUS_DIB_VIF_WITHOUT_EXTENSION);
|
printf("VIFE[%zu].Value = %.2X\n", j, vife & MBUS_DIB_VIF_WITHOUT_EXTENSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
@ -3564,7 +3721,7 @@ mbus_data_fixed_print(mbus_data_fixed *data)
|
|||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
printf("%s: ID = %d\n", __PRETTY_FUNCTION__, (int)mbus_data_bcd_decode(data->id_bcd, 4));
|
printf("%s: ID = %lld\n", __PRETTY_FUNCTION__, mbus_data_bcd_decode(data->id_bcd, 4));
|
||||||
printf("%s: Access # = 0x%.2X\n", __PRETTY_FUNCTION__, data->tx_cnt);
|
printf("%s: Access # = 0x%.2X\n", __PRETTY_FUNCTION__, data->tx_cnt);
|
||||||
printf("%s: Status = 0x%.2X\n", __PRETTY_FUNCTION__, data->status);
|
printf("%s: Status = 0x%.2X\n", __PRETTY_FUNCTION__, data->status);
|
||||||
printf("%s: Function = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_function(data->status));
|
printf("%s: Function = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_function(data->status));
|
||||||
@ -3573,25 +3730,25 @@ mbus_data_fixed_print(mbus_data_fixed *data)
|
|||||||
printf("%s: Unit1 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_unit(data->cnt1_type));
|
printf("%s: Unit1 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_unit(data->cnt1_type));
|
||||||
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
||||||
{
|
{
|
||||||
val = mbus_data_bcd_decode(data->cnt1_val, 4);
|
printf("%s: Counter1 = %lld\n", __PRETTY_FUNCTION__, mbus_data_bcd_decode(data->cnt1_val, 4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mbus_data_int_decode(data->cnt1_val, 4, &val);
|
mbus_data_int_decode(data->cnt1_val, 4, &val);
|
||||||
|
printf("%s: Counter1 = %d\n", __PRETTY_FUNCTION__, val);
|
||||||
}
|
}
|
||||||
printf("%s: Counter1 = %d\n", __PRETTY_FUNCTION__, val);
|
|
||||||
|
|
||||||
printf("%s: Medium2 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_medium(data));
|
printf("%s: Medium2 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_medium(data));
|
||||||
printf("%s: Unit2 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_unit(data->cnt2_type));
|
printf("%s: Unit2 = %s\n", __PRETTY_FUNCTION__, mbus_data_fixed_unit(data->cnt2_type));
|
||||||
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
||||||
{
|
{
|
||||||
val = mbus_data_bcd_decode(data->cnt2_val, 4);
|
printf("%s: Counter2 = %lld\n", __PRETTY_FUNCTION__, mbus_data_bcd_decode(data->cnt2_val, 4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mbus_data_int_decode(data->cnt2_val, 4, &val);
|
mbus_data_int_decode(data->cnt2_val, 4, &val);
|
||||||
|
printf("%s: Counter2 = %d\n", __PRETTY_FUNCTION__, val);
|
||||||
}
|
}
|
||||||
printf("%s: Counter2 = %d\n", __PRETTY_FUNCTION__, val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -3602,7 +3759,7 @@ mbus_hex_dump(const char *label, const char *buff, size_t len)
|
|||||||
{
|
{
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
struct tm * timeinfo;
|
struct tm * timeinfo;
|
||||||
char timestamp[21];
|
char timestamp[22];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (label == NULL || buff == NULL)
|
if (label == NULL || buff == NULL)
|
||||||
@ -3611,7 +3768,7 @@ mbus_hex_dump(const char *label, const char *buff, size_t len)
|
|||||||
time ( &rawtime );
|
time ( &rawtime );
|
||||||
timeinfo = gmtime ( &rawtime );
|
timeinfo = gmtime ( &rawtime );
|
||||||
|
|
||||||
strftime(timestamp,20,"%Y-%m-%d %H:%M:%S",timeinfo);
|
strftime(timestamp,21,"%Y-%m-%d %H:%M:%SZ",timeinfo);
|
||||||
fprintf(stderr, "[%s] %s (%03zu):", timestamp, label, len);
|
fprintf(stderr, "[%s] %s (%03zu):", timestamp, label, len);
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
@ -3630,6 +3787,7 @@ mbus_data_error_print(int error)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// XML RELATED FUNCTIONS
|
// XML RELATED FUNCTIONS
|
||||||
@ -3641,7 +3799,7 @@ mbus_data_error_print(int error)
|
|||||||
/// Encode string to XML
|
/// Encode string to XML
|
||||||
///
|
///
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void
|
int
|
||||||
mbus_str_xml_encode(unsigned char *dst, const unsigned char *src, size_t max_len)
|
mbus_str_xml_encode(unsigned char *dst, const unsigned char *src, size_t max_len)
|
||||||
{
|
{
|
||||||
size_t i, len;
|
size_t i, len;
|
||||||
@ -3650,49 +3808,55 @@ mbus_str_xml_encode(unsigned char *dst, const unsigned char *src, size_t max_len
|
|||||||
len = 0;
|
len = 0;
|
||||||
|
|
||||||
if (dst == NULL)
|
if (dst == NULL)
|
||||||
return;
|
|
||||||
|
|
||||||
if (src != NULL)
|
|
||||||
{
|
{
|
||||||
while((len+6) < max_len)
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (src == NULL)
|
||||||
|
{
|
||||||
|
dst[len] = '\0';
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
while((len+6) < max_len)
|
||||||
|
{
|
||||||
|
if (src[i] == '\0')
|
||||||
{
|
{
|
||||||
if (src[i] == '\0')
|
break;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iscntrl(src[i]))
|
|
||||||
{
|
|
||||||
// convert all control chars into spaces
|
|
||||||
dst[len++] = ' ';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (src[i])
|
|
||||||
{
|
|
||||||
case '&':
|
|
||||||
len += snprintf(&dst[len], max_len - len, "&");
|
|
||||||
break;
|
|
||||||
case '<':
|
|
||||||
len += snprintf(&dst[len], max_len - len, "<");
|
|
||||||
break;
|
|
||||||
case '>':
|
|
||||||
len += snprintf(&dst[len], max_len - len, ">");
|
|
||||||
break;
|
|
||||||
case '"':
|
|
||||||
len += snprintf(&dst[len], max_len - len, """);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
dst[len++] = src[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iscntrl(src[i]))
|
||||||
|
{
|
||||||
|
// convert all control chars into spaces
|
||||||
|
dst[len++] = ' ';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (src[i])
|
||||||
|
{
|
||||||
|
case '&':
|
||||||
|
len += snprintf(&dst[len], max_len - len, "&");
|
||||||
|
break;
|
||||||
|
case '<':
|
||||||
|
len += snprintf(&dst[len], max_len - len, "<");
|
||||||
|
break;
|
||||||
|
case '>':
|
||||||
|
len += snprintf(&dst[len], max_len - len, ">");
|
||||||
|
break;
|
||||||
|
case '"':
|
||||||
|
len += snprintf(&dst[len], max_len - len, """);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
dst[len++] = src[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
dst[len] = '\0';
|
dst[len] = '\0';
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -3704,15 +3868,12 @@ mbus_data_variable_header_xml(mbus_data_variable_header *header)
|
|||||||
static char buff[8192];
|
static char buff[8192];
|
||||||
char str_encoded[768];
|
char str_encoded[768];
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int val;
|
|
||||||
|
|
||||||
if (header)
|
if (header)
|
||||||
{
|
{
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <SlaveInformation>\n");
|
len += snprintf(&buff[len], sizeof(buff) - len, " <SlaveInformation>\n");
|
||||||
|
|
||||||
val = (int)mbus_data_bcd_decode(header->id_bcd, 4);
|
len += snprintf(&buff[len], sizeof(buff) - len, " <Id>%lld</Id>\n", mbus_data_bcd_decode(header->id_bcd, 4));
|
||||||
|
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <Id>%d</Id>\n", val);
|
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <Manufacturer>%s</Manufacturer>\n",
|
len += snprintf(&buff[len], sizeof(buff) - len, " <Manufacturer>%s</Manufacturer>\n",
|
||||||
mbus_decode_manufacturer(header->manufacturer[0], header->manufacturer[1]));
|
mbus_decode_manufacturer(header->manufacturer[0], header->manufacturer[1]));
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <Version>%d</Version>\n", header->version);
|
len += snprintf(&buff[len], sizeof(buff) - len, " <Version>%d</Version>\n", header->version);
|
||||||
@ -3746,7 +3907,7 @@ mbus_data_variable_record_xml(mbus_data_record *record, int record_cnt, int fram
|
|||||||
char str_encoded[768];
|
char str_encoded[768];
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
struct tm * timeinfo;
|
struct tm * timeinfo;
|
||||||
char timestamp[21];
|
char timestamp[22];
|
||||||
long tariff;
|
long tariff;
|
||||||
|
|
||||||
if (record)
|
if (record)
|
||||||
@ -3787,7 +3948,7 @@ mbus_data_variable_record_xml(mbus_data_record *record, int record_cnt, int fram
|
|||||||
{
|
{
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <Tariff>%ld</Tariff>\n",
|
len += snprintf(&buff[len], sizeof(buff) - len, " <Tariff>%ld</Tariff>\n",
|
||||||
tariff);
|
tariff);
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len, " <Device>%d</Device>\n",
|
len += snprintf(&buff[len], sizeof(buff) - len, " <Device>%d</Device>\n",
|
||||||
mbus_data_record_device(record));
|
mbus_data_record_device(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3802,7 +3963,7 @@ mbus_data_variable_record_xml(mbus_data_record *record, int record_cnt, int fram
|
|||||||
if (record->timestamp > 0)
|
if (record->timestamp > 0)
|
||||||
{
|
{
|
||||||
timeinfo = gmtime (&(record->timestamp));
|
timeinfo = gmtime (&(record->timestamp));
|
||||||
strftime(timestamp,20,"%Y-%m-%dT%H:%M:%S",timeinfo);
|
strftime(timestamp,21,"%Y-%m-%dT%H:%M:%SZ",timeinfo);
|
||||||
len += snprintf(&buff[len], sizeof(buff) - len,
|
len += snprintf(&buff[len], sizeof(buff) - len,
|
||||||
" <Timestamp>%s</Timestamp>\n", timestamp);
|
" <Timestamp>%s</Timestamp>\n", timestamp);
|
||||||
}
|
}
|
||||||
@ -3890,7 +4051,7 @@ mbus_data_fixed_xml(mbus_data_fixed *data)
|
|||||||
len += snprintf(&buff[len], buff_size - len, "<MBusData>\n\n");
|
len += snprintf(&buff[len], buff_size - len, "<MBusData>\n\n");
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, " <SlaveInformation>\n");
|
len += snprintf(&buff[len], buff_size - len, " <SlaveInformation>\n");
|
||||||
len += snprintf(&buff[len], buff_size - len, " <Id>%d</Id>\n", (int)mbus_data_bcd_decode(data->id_bcd, 4));
|
len += snprintf(&buff[len], buff_size - len, " <Id>%lld</Id>\n", mbus_data_bcd_decode(data->id_bcd, 4));
|
||||||
|
|
||||||
mbus_str_xml_encode(str_encoded, mbus_data_fixed_medium(data), sizeof(str_encoded));
|
mbus_str_xml_encode(str_encoded, mbus_data_fixed_medium(data), sizeof(str_encoded));
|
||||||
len += snprintf(&buff[len], buff_size - len, " <Medium>%s</Medium>\n", str_encoded);
|
len += snprintf(&buff[len], buff_size - len, " <Medium>%s</Medium>\n", str_encoded);
|
||||||
@ -3908,14 +4069,14 @@ mbus_data_fixed_xml(mbus_data_fixed *data)
|
|||||||
len += snprintf(&buff[len], buff_size - len, " <Unit>%s</Unit>\n", str_encoded);
|
len += snprintf(&buff[len], buff_size - len, " <Unit>%s</Unit>\n", str_encoded);
|
||||||
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
||||||
{
|
{
|
||||||
val = mbus_data_bcd_decode(data->cnt1_val, 4);
|
len += snprintf(&buff[len], buff_size - len, " <Value>%lld</Value>\n", mbus_data_bcd_decode(data->cnt1_val, 4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mbus_data_int_decode(data->cnt1_val, 4, &val);
|
mbus_data_int_decode(data->cnt1_val, 4, &val);
|
||||||
|
len += snprintf(&buff[len], buff_size - len, " <Value>%d</Value>\n", val);
|
||||||
}
|
}
|
||||||
len += snprintf(&buff[len], buff_size - len, " <Value>%d</Value>\n", val);
|
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, " </DataRecord>\n\n");
|
len += snprintf(&buff[len], buff_size - len, " </DataRecord>\n\n");
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, " <DataRecord id=\"1\">\n");
|
len += snprintf(&buff[len], buff_size - len, " <DataRecord id=\"1\">\n");
|
||||||
@ -3927,14 +4088,14 @@ mbus_data_fixed_xml(mbus_data_fixed *data)
|
|||||||
len += snprintf(&buff[len], buff_size - len, " <Unit>%s</Unit>\n", str_encoded);
|
len += snprintf(&buff[len], buff_size - len, " <Unit>%s</Unit>\n", str_encoded);
|
||||||
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
if ((data->status & MBUS_DATA_FIXED_STATUS_FORMAT_MASK) == MBUS_DATA_FIXED_STATUS_FORMAT_BCD)
|
||||||
{
|
{
|
||||||
val = mbus_data_bcd_decode(data->cnt2_val, 4);
|
len += snprintf(&buff[len], buff_size - len, " <Value>%lld</Value>\n", mbus_data_bcd_decode(data->cnt2_val, 4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mbus_data_int_decode(data->cnt2_val, 4, &val);
|
mbus_data_int_decode(data->cnt2_val, 4, &val);
|
||||||
|
len += snprintf(&buff[len], buff_size - len, " <Value>%d</Value>\n", val);
|
||||||
}
|
}
|
||||||
len += snprintf(&buff[len], buff_size - len, " <Value>%d</Value>\n", val);
|
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, " </DataRecord>\n\n");
|
len += snprintf(&buff[len], buff_size - len, " </DataRecord>\n\n");
|
||||||
|
|
||||||
len += snprintf(&buff[len], buff_size - len, "</MBusData>\n");
|
len += snprintf(&buff[len], buff_size - len, "</MBusData>\n");
|
||||||
@ -4263,7 +4424,7 @@ mbus_frame_get_secondary_address(mbus_frame *frame)
|
|||||||
{
|
{
|
||||||
static char addr[32];
|
static char addr[32];
|
||||||
mbus_frame_data *data;
|
mbus_frame_data *data;
|
||||||
long id;
|
unsigned long id;
|
||||||
|
|
||||||
if (frame == NULL || (data = mbus_frame_data_new()) == NULL)
|
if (frame == NULL || (data = mbus_frame_data_new()) == NULL)
|
||||||
{
|
{
|
||||||
@ -4286,7 +4447,7 @@ mbus_frame_get_secondary_address(mbus_frame *frame)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
id = (long) mbus_data_bcd_decode(data->data_var.header.id_bcd, 4);
|
id = (unsigned long) mbus_data_bcd_decode(data->data_var.header.id_bcd, 4);
|
||||||
|
|
||||||
snprintf(addr, sizeof(addr), "%08lu%02X%02X%02X%02X",
|
snprintf(addr, sizeof(addr), "%08lu%02X%02X%02X%02X",
|
||||||
id,
|
id,
|
||||||
|
@ -498,7 +498,7 @@ typedef struct _mbus_data_secondary_address {
|
|||||||
//
|
//
|
||||||
unsigned int mbus_manufacturer_id(char *manufacturer);
|
unsigned int mbus_manufacturer_id(char *manufacturer);
|
||||||
|
|
||||||
// Since libmbus writes some special characters (ASCII > 0x7F) into the XML output (e.g. <20>C for centigrade == ASCII 0xB0)
|
// Since libmbus writes some special characters (ASCII > 0x7F) into the XML output (e.g. <20>C for centigrade == ASCII 0xB0)
|
||||||
// it is useful to attach the appropriate code page for postprocessing.
|
// it is useful to attach the appropriate code page for postprocessing.
|
||||||
#define MBUS_XML_PROCESSING_INSTRUCTION "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
|
#define MBUS_XML_PROCESSING_INSTRUCTION "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ mbus_slave_data *mbus_slave_data_get(size_t i);
|
|||||||
//
|
//
|
||||||
// XML generating functions
|
// XML generating functions
|
||||||
//
|
//
|
||||||
void mbus_str_xml_encode(unsigned char *dst, const unsigned char *src, size_t max_len);
|
int mbus_str_xml_encode(unsigned char *dst, const unsigned char *src, size_t max_len);
|
||||||
char *mbus_data_xml(mbus_frame_data *data);
|
char *mbus_data_xml(mbus_frame_data *data);
|
||||||
char *mbus_data_variable_xml(mbus_data_variable *data);
|
char *mbus_data_variable_xml(mbus_data_variable *data);
|
||||||
char *mbus_data_fixed_xml(mbus_data_fixed *data);
|
char *mbus_data_fixed_xml(mbus_data_fixed *data);
|
||||||
|
@ -72,10 +72,13 @@ mbus_serial_connect(mbus_handle *handle)
|
|||||||
// between the end of a master send telegram and the beginning of the response telegram of the slave shall be
|
// between the end of a master send telegram and the beginning of the response telegram of the slave shall be
|
||||||
// between 11 bit times and (330 bit times + 50ms).
|
// between 11 bit times and (330 bit times + 50ms).
|
||||||
//
|
//
|
||||||
// For 2400Bd this means (330 + 11) / 2400 + 0.05 = 188.75 ms (added 11 bit periods to receive first byte).
|
// Nowadays the usage of USB to serial adapter is very common, which could
|
||||||
// I.e. timeout of 0.2s seems appropriate for 2400Bd.
|
// result in additional delay of 100 ms in worst case.
|
||||||
|
//
|
||||||
|
// For 2400Bd this means (330 + 11) / 2400 + 0.15 = 292 ms (added 11 bit periods to receive first byte).
|
||||||
|
// I.e. timeout of 0.3s seems appropriate for 2400Bd.
|
||||||
|
|
||||||
term->c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
term->c_cc[VTIME] = (cc_t) 3; // Timeout in 1/10 sec
|
||||||
|
|
||||||
cfsetispeed(term, B2400);
|
cfsetispeed(term, B2400);
|
||||||
cfsetospeed(term, B2400);
|
cfsetospeed(term, B2400);
|
||||||
@ -113,42 +116,42 @@ mbus_serial_set_baudrate(mbus_handle *handle, long baudrate)
|
|||||||
{
|
{
|
||||||
case 300:
|
case 300:
|
||||||
speed = B300;
|
speed = B300;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 12; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 13; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 600:
|
case 600:
|
||||||
speed = B600;
|
speed = B600;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 6; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 8; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1200:
|
case 1200:
|
||||||
speed = B1200;
|
speed = B1200;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 4; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 5; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2400:
|
case 2400:
|
||||||
speed = B2400;
|
speed = B2400;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 3; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4800:
|
case 4800:
|
||||||
speed = B4800;
|
speed = B4800;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 3; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9600:
|
case 9600:
|
||||||
speed = B9600;
|
speed = B9600;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 1; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 19200:
|
case 19200:
|
||||||
speed = B19200;
|
speed = B19200;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 1; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 38400:
|
case 38400:
|
||||||
speed = B38400;
|
speed = B38400;
|
||||||
serial_data->t.c_cc[VTIME] = (cc_t) 1; // Timeout in 1/10 sec
|
serial_data->t.c_cc[VTIME] = (cc_t) 2; // Timeout in 1/10 sec
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -188,7 +191,13 @@ mbus_serial_disconnect(mbus_handle *handle)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (handle->fd < 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
close(handle->fd);
|
close(handle->fd);
|
||||||
|
handle->fd = -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -371,4 +380,3 @@ mbus_serial_recv_frame(mbus_handle *handle, mbus_frame *frame)
|
|||||||
|
|
||||||
return MBUS_RECV_RESULT_OK;
|
return MBUS_RECV_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,13 @@ mbus_tcp_disconnect(mbus_handle *handle)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (handle->fd < 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
close(handle->fd);
|
close(handle->fd);
|
||||||
|
handle->fd = -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -262,4 +268,3 @@ mbus_tcp_set_timeout_set(double seconds)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "mbus-protocol.h"
|
#include "mbus-protocol.h"
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -19,4 +20,4 @@ int mbus_init() {return 0;}
|
|||||||
/// Return current version of the library
|
/// Return current version of the library
|
||||||
///
|
///
|
||||||
const char*
|
const char*
|
||||||
mbus_get_current_version() {return "0.8.0";}
|
mbus_get_current_version() {return VERSION;}
|
||||||
|
8
test/error-frames/application_busy.xml
Normal file
8
test/error-frames/application_busy.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Application busy</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/buffer_too_long.xml
Normal file
8
test/error-frames/buffer_too_long.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Buffer too long, truncated</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/error.xml
Normal file
8
test/error-frames/error.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Unspecified error</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/premature_end_of_record.xml
Normal file
8
test/error-frames/premature_end_of_record.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Premature end of record</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/too_many_difes.xml
Normal file
8
test/error-frames/too_many_difes.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>More than 10 DIFE´s</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/too_many_readouts.xml
Normal file
8
test/error-frames/too_many_readouts.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Too many readouts</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/too_many_records.xml
Normal file
8
test/error-frames/too_many_records.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Too many records</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/too_many_vifes.xml
Normal file
8
test/error-frames/too_many_vifes.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>More than 10 VIFE´s</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/unimplemented_ci.xml
Normal file
8
test/error-frames/unimplemented_ci.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Unimplemented CI-Field</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
8
test/error-frames/unspecified_error.xml
Normal file
8
test/error-frames/unspecified_error.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Error>Unspecified error</Error>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
</MBusData>
|
@ -3,7 +3,7 @@
|
|||||||
# Copyright (C) 2010-2012, Robert Johansson and contributors, Raditex AB
|
# Copyright (C) 2010-2012, Robert Johansson and contributors, Raditex AB
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# rSCADA
|
# rSCADA
|
||||||
# http://www.rSCADA.se
|
# http://www.rSCADA.se
|
||||||
# info@rscada.se
|
# info@rscada.se
|
||||||
#
|
#
|
||||||
@ -33,27 +33,27 @@ if [ ! -d "$directory" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for hexfile in "$directory"/*.hex; do
|
for hexfile in "$directory"/*.hex; do
|
||||||
if [ ! -f "$hexfile" ]; then
|
if [ ! -f "$hexfile" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
filename=`basename $hexfile .hex`
|
filename=`basename $hexfile .hex`
|
||||||
|
|
||||||
# Parse hex file and write XML in file
|
# Parse hex file and write XML in file
|
||||||
./mbus_parse_hex "$hexfile" > "$directory/$filename.xml.new"
|
./mbus_parse_hex "$hexfile" > "$directory/$filename.xml.new"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
# Check parsing result
|
# Check parsing result
|
||||||
if [ $result -ne 0 ]; then
|
if [ $result -ne 0 ]; then
|
||||||
echo "Unable to generate XML for $hexfile"
|
echo "Unable to generate XML for $hexfile"
|
||||||
rm "$directory/$filename.xml.new"
|
rm "$directory/$filename.xml.new"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compare old XML with new XML and write in file
|
# Compare old XML with new XML and write in file
|
||||||
diff -u "$directory/$filename.xml" "$directory/$filename.xml.new" 2> /dev/null > "$directory/$filename.dif"
|
diff -u "$directory/$filename.xml" "$directory/$filename.xml.new" 2> /dev/null > "$directory/$filename.dif"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
case "$result" in
|
case "$result" in
|
||||||
0)
|
0)
|
||||||
# XML equal -> remove new
|
# XML equal -> remove new
|
||||||
@ -65,7 +65,7 @@ for hexfile in "$directory"/*.hex; do
|
|||||||
cat "$directory/$filename.dif" && rm "$directory/$filename.dif"
|
cat "$directory/$filename.dif" && rm "$directory/$filename.dif"
|
||||||
echo ""
|
echo ""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# no old -> rename XML
|
# no old -> rename XML
|
||||||
echo "Create $filename.xml"
|
echo "Create $filename.xml"
|
||||||
mv "$directory/$filename.xml.new" "$directory/$filename.xml"
|
mv "$directory/$filename.xml.new" "$directory/$filename.xml"
|
||||||
|
0
test/test-frames/ACW_Itron-BM-plus-m.hex
Executable file → Normal file
0
test/test-frames/ACW_Itron-BM-plus-m.hex
Executable file → Normal file
76
test/test-frames/ACW_Itron-BM-plus-m.xml
Normal file
76
test/test-frames/ACW_Itron-BM-plus-m.xml
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>11490378</Id>
|
||||||
|
<Manufacturer>ACW</Manufacturer>
|
||||||
|
<Version>14</Version>
|
||||||
|
<ProductName>Itron BM +m</ProductName>
|
||||||
|
<Medium>Cold water</Medium>
|
||||||
|
<AccessNumber>10</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>11490378</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>54321</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2000-00-00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T11:11:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (days)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Firmware version</Unit>
|
||||||
|
<Value>2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Software version</Unit>
|
||||||
|
<Value>6</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value>00 01 75 13</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/ACW_Itron-CYBLE-M-Bus-14.hex
Executable file → Normal file
0
test/test-frames/ACW_Itron-CYBLE-M-Bus-14.hex
Executable file → Normal file
69
test/test-frames/ACW_Itron-CYBLE-M-Bus-14.xml
Normal file
69
test/test-frames/ACW_Itron-CYBLE-M-Bus-14.xml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>9011523</Id>
|
||||||
|
<Manufacturer>ACW</Manufacturer>
|
||||||
|
<Version>20</Version>
|
||||||
|
<ProductName>Itron CYBLE M-Bus 1.4</ProductName>
|
||||||
|
<Medium>Water</Medium>
|
||||||
|
<AccessNumber>37</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>9011523</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>cust. ID</Unit>
|
||||||
|
<Value>09LA076755</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T14:26:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>bat. time</Unit>
|
||||||
|
<Value>2516</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value>00 01 1F</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
207
test/test-frames/EDC.xml
Normal file
207
test/test-frames/EDC.xml
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>11120895</Id>
|
||||||
|
<Manufacturer>EDC</Manufacturer>
|
||||||
|
<Version>2</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>23</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>35</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>465</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>21.536703</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>21.605042</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>92.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>92.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0.707039</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>357.621735</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>18511.912109</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2012-07-10T15:25:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>C</Unit>
|
||||||
|
<Value>3571</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>C</Unit>
|
||||||
|
<Value>413</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>c</Unit>
|
||||||
|
<Value>1</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="20">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>c</Unit>
|
||||||
|
<Value>1</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="21">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value></Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/EFE_Engelmann-Elster-SensoStar-2.hex
Executable file → Normal file
0
test/test-frames/EFE_Engelmann-Elster-SensoStar-2.hex
Executable file → Normal file
204
test/test-frames/EFE_Engelmann-Elster-SensoStar-2.xml
Normal file
204
test/test-frames/EFE_Engelmann-Elster-SensoStar-2.xml
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>24083345</Id>
|
||||||
|
<Manufacturer>EFE</Manufacturer>
|
||||||
|
<Version>0</Version>
|
||||||
|
<ProductName>Engelmann / Elster SensoStar 2</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>102</AccessNumber>
|
||||||
|
<Status>27</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>24083345</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-12T14:23:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>25</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>11</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>22</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="20">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>21</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="21">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (1e-2 deg C)</Unit>
|
||||||
|
<Value>9</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="22">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>On time (days)</Unit>
|
||||||
|
<Value>524</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="23">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="24">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (my m^3)</Unit>
|
||||||
|
<Value>11</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/EFE_Engelmann-WaterStar.hex
Executable file → Normal file
0
test/test-frames/EFE_Engelmann-WaterStar.hex
Executable file → Normal file
101
test/test-frames/EFE_Engelmann-WaterStar.xml
Normal file
101
test/test-frames/EFE_Engelmann-WaterStar.xml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>4990254</Id>
|
||||||
|
<Manufacturer>EFE</Manufacturer>
|
||||||
|
<Version>0</Version>
|
||||||
|
<ProductName>Engelmann WaterStar</ProductName>
|
||||||
|
<Medium>Hot water</Medium>
|
||||||
|
<AccessNumber>12</AccessNumber>
|
||||||
|
<Status>27</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>4990254</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T12:10:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>332</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>331</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>332</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>2070</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>On time (days)</Unit>
|
||||||
|
<Value>1191</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (my m^3)</Unit>
|
||||||
|
<Value>8</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/ELS_Elster-F96-Plus.hex
Executable file → Normal file
0
test/test-frames/ELS_Elster-F96-Plus.hex
Executable file → Normal file
135
test/test-frames/ELS_Elster-F96-Plus.xml
Normal file
135
test/test-frames/ELS_Elster-F96-Plus.xml
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>44493951</Id>
|
||||||
|
<Manufacturer>ELS</Manufacturer>
|
||||||
|
<Version>47</Version>
|
||||||
|
<ProductName>Elster F96 Plus</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>161</AccessNumber>
|
||||||
|
<Status>70</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>144445223</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>1445223</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>227</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>226</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (1e-1 deg C)</Unit>
|
||||||
|
<Value>1</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (days)</Unit>
|
||||||
|
<Value>730</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T13:09:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-05-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/ELV-Elvaco-CMa10.hex
Normal file
1
test/test-frames/ELV-Elvaco-CMa10.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 53 53 68 08 0B 72 61 15 01 24 96 15 16 00 3F 00 00 00 01 FD 1B 02 02 FC 03 48 52 25 74 22 15 22 FC 03 48 52 25 74 24 0D 12 FC 03 48 52 25 74 C3 1C 02 65 2E 08 22 65 5C 05 12 65 A2 0B 01 72 18 42 65 2C 08 82 01 65 1F 08 0C 78 61 15 01 24 03 FD 0F 00 00 04 1F BD 16
|
106
test/test-frames/ELV-Elvaco-CMa10.xml
Normal file
106
test/test-frames/ELV-Elvaco-CMa10.xml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>24011561</Id>
|
||||||
|
<Manufacturer>ELV</Manufacturer>
|
||||||
|
<Version>22</Version>
|
||||||
|
<ProductName>Elvaco CMa10</ProductName>
|
||||||
|
<Medium>Other</Medium>
|
||||||
|
<AccessNumber>63</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Digital input (binary)</Unit>
|
||||||
|
<Value>2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>5410</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>3364</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>7363</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2094</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>1372</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2978</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Averaging Duration (hours)</Unit>
|
||||||
|
<Value>24</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2092</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2079</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>24011561</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Software version</Unit>
|
||||||
|
<Value>262144</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>More records follow</Function>
|
||||||
|
<Value></Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/EMU_EMU-Professional-375-M-Bus.hex
Executable file → Normal file
0
test/test-frames/EMU_EMU-Professional-375-M-Bus.hex
Executable file → Normal file
255
test/test-frames/EMU_EMU-Professional-375-M-Bus.xml
Normal file
255
test/test-frames/EMU_EMU-Professional-375-M-Bus.xml
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>32629</Id>
|
||||||
|
<Manufacturer>EMU</Manufacturer>
|
||||||
|
<Version>16</Version>
|
||||||
|
<ProductName>EMU Professional 3/75 M-Bus</ProductName>
|
||||||
|
<Medium>Electricity</Medium>
|
||||||
|
<AccessNumber>2</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>32629</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (Wh)</Unit>
|
||||||
|
<Value>1364</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (Wh)</Unit>
|
||||||
|
<Value>7854</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>-2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>-2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>14</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>14</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>2257</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>1874</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>2410</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="20">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="21">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="22">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>m A</Unit>
|
||||||
|
<Value>-66</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="23">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>m A</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="24">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>m A</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="25">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>m A</Unit>
|
||||||
|
<Value>-66</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="26">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>13</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="27">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="28">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="29">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>500</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="30">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x60</Unit>
|
||||||
|
<Value>56</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="31">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
@ -1,10 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
<Id>802657</Id>
|
<Id>802657</Id>
|
||||||
<Manufacturer>SVM</Manufacturer>
|
<Manufacturer>SVM</Manufacturer>
|
||||||
<Version>8</Version>
|
<Version>8</Version>
|
||||||
<ProductName>Elster F2</ProductName>
|
<ProductName>Elster F2 / Deltamess F2</ProductName>
|
||||||
<Medium>Heat: Outlet</Medium>
|
<Medium>Heat: Outlet</Medium>
|
||||||
<AccessNumber>70</AccessNumber>
|
<AccessNumber>70</AccessNumber>
|
||||||
<Status>00</Status>
|
<Status>00</Status>
|
||||||
|
1
test/test-frames/FIN-Finder-7E.23.8.230.0020.hex
Normal file
1
test/test-frames/FIN-Finder-7E.23.8.230.0020.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 38 38 68 08 19 72 07 62 00 23 2E 19 23 02 92 00 00 00 8C 10 04 68 28 17 00 8C 11 04 68 28 17 00 02 FD C9 FF 01 E6 00 02 FD DB FF 01 06 00 02 AC FF 01 09 00 82 40 AC FF 01 FD FF 5B 16
|
63
test/test-frames/FIN-Finder-7E.23.8.230.0020.xml
Normal file
63
test/test-frames/FIN-Finder-7E.23.8.230.0020.xml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>23006207</Id>
|
||||||
|
<Manufacturer>FIN</Manufacturer>
|
||||||
|
<Version>35</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Electricity</Medium>
|
||||||
|
<AccessNumber>146</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>172868</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>172868</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit> V</Unit>
|
||||||
|
<Value>230</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 A</Unit>
|
||||||
|
<Value>6</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>9</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>-3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/GWF-MTKcoder.hex
Normal file
1
test/test-frames/GWF-MTKcoder.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 1B 1B 68 08 01 72 07 20 18 00 E6 1E 35 07 4C 00 00 00 0C 78 07 20 18 00 0C 16 69 02 00 00 96 16
|
29
test/test-frames/GWF-MTKcoder.xml
Normal file
29
test/test-frames/GWF-MTKcoder.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>182007</Id>
|
||||||
|
<Manufacturer>GWF</Manufacturer>
|
||||||
|
<Version>53</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Water</Medium>
|
||||||
|
<AccessNumber>76</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>182007</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume ( m^3)</Unit>
|
||||||
|
<Value>269</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/LGB_G350.hex
Normal file
1
test/test-frames/LGB_G350.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 40 40 68 08 01 72 58 20 08 12 E2 30 40 03 40 00 00 00 2F 2F 4C 13 92 40 83 10 46 6D 00 00 08 16 27 00 0D 78 11 34 31 38 35 30 32 38 30 32 31 39 35 37 31 30 30 47 89 40 FD 1A 01 01 FD 17 00 01 FD 67 0F 38 16
|
59
test/test-frames/LGB_G350.xml
Normal file
59
test/test-frames/LGB_G350.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>12082058</Id>
|
||||||
|
<Manufacturer>LGB</Manufacturer>
|
||||||
|
<Version>64</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Gas</Medium>
|
||||||
|
<AccessNumber>64</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>10834092</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2016-07-22T08:00:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>G0017591208205814</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Digital output (binary)</Unit>
|
||||||
|
<Value>1</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x67</Unit>
|
||||||
|
<Value>15</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/REL-Relay-Padpuls2.hex
Normal file
1
test/test-frames/REL-Relay-Padpuls2.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 2F 2F 68 08 16 72 01 63 21 11 AC 48 41 03 B1 00 00 00 0C 14 81 60 87 02 04 6D A1 15 E9 17 42 6C DF 1C 4C 14 82 73 59 02 42 EC 7E FF 1C 0F C0 01 01 0C BD 16
|
55
test/test-frames/REL-Relay-Padpuls2.xml
Normal file
55
test/test-frames/REL-Relay-Padpuls2.xml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>11216301</Id>
|
||||||
|
<Manufacturer>REL</Manufacturer>
|
||||||
|
<Version>65</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Gas</Medium>
|
||||||
|
<AccessNumber>177</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>2876081</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>1900-01-00T00:00:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>2597382</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2015-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value>C0 01 01 0C</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/SBC_Saia-Burgess-ALE3.hex
Executable file → Normal file
0
test/test-frames/SBC_Saia-Burgess-ALE3.hex
Executable file → Normal file
171
test/test-frames/SBC_Saia-Burgess-ALE3.xml
Normal file
171
test/test-frames/SBC_Saia-Burgess-ALE3.xml
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>19000055</Id>
|
||||||
|
<Manufacturer>SBC</Manufacturer>
|
||||||
|
<Version>22</Version>
|
||||||
|
<ProductName>Saia-Burgess ALE3</ProductName>
|
||||||
|
<Medium>Electricity</Medium>
|
||||||
|
<AccessNumber>191</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>293</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>293</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>6</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>6</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit> V</Unit>
|
||||||
|
<Value>223</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 A</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit> V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 A</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit> V</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-1 A</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/SEN_Pollustat.hex
Normal file
1
test/test-frames/SEN_Pollustat.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 71 71 68 08 04 72 88 17 01 00 AE 4C 06 0D 3E 00 00 00 04 6D 3B 0E E7 14 34 6D 00 00 01 01 34 FD 17 00 00 00 04 04 20 92 22 F1 00 04 24 A4 1A E7 00 04 86 3B 97 9B 00 00 04 13 BE 09 5E 00 05 2E B1 D1 2E BE 05 3E F5 B8 4E 40 05 5B B8 2D F9 41 05 5F 78 8B F9 41 05 63 00 80 3B BD 04 BE 50 71 BB B0 00 04 BE 58 F4 02 00 00 0C 78 88 17 01 00 02 7F 10 B5 5D 16
|
127
test/test-frames/SEN_Pollustat.xml
Normal file
127
test/test-frames/SEN_Pollustat.xml
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>11788</Id>
|
||||||
|
<Manufacturer>SEN</Manufacturer>
|
||||||
|
<Version>6</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Heat / Cooling load meter</Medium>
|
||||||
|
<AccessNumber>62</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2015-04-07T14:59:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2000-01-01T00:00:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>67108864</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>On time (seconds)</Unit>
|
||||||
|
<Value>15803026</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (seconds)</Unit>
|
||||||
|
<Value>15145636</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>39831</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>6162878</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (kW)</Unit>
|
||||||
|
<Value>-0.170722</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow ( m^3/h)</Unit>
|
||||||
|
<Value>3.230039</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>31.147324</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>31.193100</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference ( deg C)</Unit>
|
||||||
|
<Value>-0.045776</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow ( m^3/h)</Unit>
|
||||||
|
<Value>11582321</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow ( m^3/h)</Unit>
|
||||||
|
<Value>756</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>11788</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>-19184</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/SEN_Sensus-PolluStat-E.hex
Executable file → Normal file
0
test/test-frames/SEN_Sensus-PolluStat-E.hex
Executable file → Normal file
83
test/test-frames/SEN_Sensus-PolluStat-E.xml
Normal file
83
test/test-frames/SEN_Sensus-PolluStat-E.xml
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>21265095</Id>
|
||||||
|
<Manufacturer>SEN</Manufacturer>
|
||||||
|
<Version>14</Version>
|
||||||
|
<ProductName>Sensus PolluStat E</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>181</AccessNumber>
|
||||||
|
<Status>10</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>201</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>202</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (m deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>21265095</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Customer location</Unit>
|
||||||
|
<Value>21265095</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>More records follow</Function>
|
||||||
|
<Value></Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/SEN_Sensus-PolluTherm.hex
Executable file → Normal file
0
test/test-frames/SEN_Sensus-PolluTherm.hex
Executable file → Normal file
78
test/test-frames/SEN_Sensus-PolluTherm.xml
Normal file
78
test/test-frames/SEN_Sensus-PolluTherm.xml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>24351689</Id>
|
||||||
|
<Manufacturer>SEN</Manufacturer>
|
||||||
|
<Version>11</Version>
|
||||||
|
<ProductName>Sensus PolluTherm</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>84</AccessNumber>
|
||||||
|
<Status>10</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (10 kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (1e-2 m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (10 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (m deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>24351689</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Customer location</Unit>
|
||||||
|
<Value>24351689</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.hex
Executable file → Normal file
0
test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.hex
Executable file → Normal file
122
test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.xml
Normal file
122
test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.xml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>11817314</Id>
|
||||||
|
<Manufacturer>SLB</Manufacturer>
|
||||||
|
<Version>6</Version>
|
||||||
|
<ProductName>CF Compact / Integral MK MaXX</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>3</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>11817314</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>218</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (1e-1 deg C)</Unit>
|
||||||
|
<Value>220</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (1e-2 deg C)</Unit>
|
||||||
|
<Value>1500018</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (hours)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (days)</Unit>
|
||||||
|
<Value>1176</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T14:02:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>1</Device>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>123</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Volume (1e-2 m^3)</Unit>
|
||||||
|
<Value>321</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Firmware version</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Software version</Unit>
|
||||||
|
<Value>18</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value>00 16</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/THI_cma10.hex
Normal file
1
test/test-frames/THI_cma10.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 52 52 68 08 E6 72 02 00 00 00 96 15 15 00 0D 00 00 00 01 FD 1B 02 02 FC 03 48 52 25 74 34 12 22 FC 03 48 52 25 74 C6 0E 12 FC 03 48 52 25 74 02 14 02 65 D6 08 22 65 CA 08 12 65 16 09 01 72 00 72 65 00 00 B2 01 65 00 00 0C 78 02 00 00 00 02 FD 0F 04 03 1F 96 16
|
106
test/test-frames/THI_cma10.xml
Normal file
106
test/test-frames/THI_cma10.xml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>2</Id>
|
||||||
|
<Manufacturer>ELV</Manufacturer>
|
||||||
|
<Version>21</Version>
|
||||||
|
<ProductName>Elvaco CMa10</ProductName>
|
||||||
|
<Medium>Other</Medium>
|
||||||
|
<AccessNumber>13</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Digital input (binary)</Unit>
|
||||||
|
<Value>2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>4660</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>3782</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>1e-2 %RH</Unit>
|
||||||
|
<Value>5122</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2262</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Minimum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2250</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2326</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Averaging Duration (hours)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>External temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>2</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Software version</Unit>
|
||||||
|
<Value>772</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>More records follow</Function>
|
||||||
|
<Value></Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
0
test/test-frames/ZRM_Minol-Minocal-C2.hex
Executable file → Normal file
0
test/test-frames/ZRM_Minol-Minocal-C2.hex
Executable file → Normal file
301
test/test-frames/ZRM_Minol-Minocal-C2.xml
Normal file
301
test/test-frames/ZRM_Minol-Minocal-C2.xml
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>31425084</Id>
|
||||||
|
<Manufacturer>ZRM</Manufacturer>
|
||||||
|
<Version>129</Version>
|
||||||
|
<ProductName>Minol Minocal C2</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>115</AccessNumber>
|
||||||
|
<Status>27</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>8</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2015-01-01T00:00:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>8</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>10</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>74</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>43</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2011-09-01T08:30:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (100 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Power (100 W)</Unit>
|
||||||
|
<Value>20</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2011-09-01T08:30:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2071</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (1e-2 deg C)</Unit>
|
||||||
|
<Value>2038</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2014-03-13T12:45:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>32</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-03-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>32</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>33</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-02-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>33</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>34</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-01-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="20">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>34</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="21">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>35</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-12-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="22">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>35</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="23">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>36</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-11-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="24">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>36</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="25">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>37</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-10-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="26">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>37</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="27">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>38</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-09-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="28">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>38</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="29">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>39</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2013-08-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="30">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>39</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>3</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="31">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>32</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2014-03-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="32">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>32</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="33">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>32</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Power (100 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/abb_delta.hex
Normal file
1
test/test-frames/abb_delta.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 98 98 68 08 01 72 12 34 56 78 42 04 02 02 45 00 00 00 0E 84 00 00 00 00 00 00 00 8E 10 84 00 00 00 00 00 00 00 8E 20 84 00 00 00 00 00 00 00 8E B0 00 84 00 00 00 00 00 00 00 8E 80 10 84 00 00 00 00 00 00 00 8E 80 40 84 00 00 00 00 00 00 00 8E 90 40 84 00 00 00 00 00 00 00 8E A0 40 84 00 00 00 00 00 00 00 8E B0 40 84 00 00 00 00 00 00 00 8E 80 50 84 00 00 00 00 00 00 00 01 FF 93 00 00 0C FF 92 00 00 00 00 01 07 FD 97 00 00 00 00 00 00 00 00 00 01 FF 98 00 00 1F 75 16
|
136
test/test-frames/abb_delta.xml
Normal file
136
test/test-frames/abb_delta.xml
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>78563412</Id>
|
||||||
|
<Manufacturer>ABB</Manufacturer>
|
||||||
|
<Version>2</Version>
|
||||||
|
<ProductName>ABB Delta-Meter</ProductName>
|
||||||
|
<Medium>Electricity</Medium>
|
||||||
|
<AccessNumber>69</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>4</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>4</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>1000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>More records follow</Function>
|
||||||
|
<Value></Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
@ -13,78 +14,95 @@
|
|||||||
|
|
||||||
<DataRecord id="0">
|
<DataRecord id="0">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Energy (100 Wh)</Unit>
|
<Unit>Energy (100 Wh)</Unit>
|
||||||
<Value>0</Value>
|
<Value>0</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="1">
|
<DataRecord id="1">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Volume (1e-4 m^3)</Unit>
|
<Unit>Volume (1e-4 m^3)</Unit>
|
||||||
<Value>742</Value>
|
<Value>742</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="2">
|
<DataRecord id="2">
|
||||||
<Function>Value during error state</Function>
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Power (1e-1 W)</Unit>
|
<Unit>Power (1e-1 W)</Unit>
|
||||||
<Value>144521543</Value>
|
<Value>144521543</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="3">
|
<DataRecord id="3">
|
||||||
<Function>Value during error state</Function>
|
<Function>Value during error state</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Volume flow (1e-4 m^3/h)</Unit>
|
<Unit>Volume flow (1e-4 m^3/h)</Unit>
|
||||||
<Value>1521543</Value>
|
<Value>1521543</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="4">
|
<DataRecord id="4">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
<Unit>Flow temperature (1e-1 deg C)</Unit>
|
||||||
<Value>204</Value>
|
<Value>204</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="5">
|
<DataRecord id="5">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Return temperature (1e-1 deg C)</Unit>
|
<Unit>Return temperature (1e-1 deg C)</Unit>
|
||||||
<Value>204</Value>
|
<Value>204</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="6">
|
<DataRecord id="6">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Temperature Difference (1e-1 deg C)</Unit>
|
<Unit>Temperature Difference (1e-1 deg C)</Unit>
|
||||||
<Value>0</Value>
|
<Value>0</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="7">
|
<DataRecord id="7">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
<Unit>Time Point (time & date)</Unit>
|
<Unit>Time Point (time & date)</Unit>
|
||||||
<Value>2012-01-13T16:34:00</Value>
|
<Value>2012-01-13T16:34:00</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="8">
|
<DataRecord id="8">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
<Unit>Energy (100 Wh)</Unit>
|
<Unit>Energy (100 Wh)</Unit>
|
||||||
<Value>0</Value>
|
<Value>0</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="9">
|
<DataRecord id="9">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
<Unit>Time Point (time & date)</Unit>
|
<Unit>Time Point (time & date)</Unit>
|
||||||
<Value>2011-04-30T23:59:00</Value>
|
<Value>2011-04-30T23:59:00</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="10">
|
<DataRecord id="10">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
<Unit>Time Point (time & date)</Unit>
|
<Unit>Time Point (time & date)</Unit>
|
||||||
<Value>2012-04-30T23:59:00</Value>
|
<Value>2012-04-30T23:59:00</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="11">
|
<DataRecord id="11">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
<Unit>Energy (100 Wh)</Unit>
|
<Unit>Energy (100 Wh)</Unit>
|
||||||
<Value>0</Value>
|
<Value>0</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
|
||||||
<DataRecord id="12">
|
<DataRecord id="12">
|
||||||
<Function>Instantaneous value</Function>
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
<Unit>Time Point (time & date)</Unit>
|
<Unit>Time Point (time & date)</Unit>
|
||||||
<Value>2011-12-31T23:59:00</Value>
|
<Value>2011-12-31T23:59:00</Value>
|
||||||
</DataRecord>
|
</DataRecord>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
2
test/test-frames/berg_dz_plus.hex
Normal file
2
test/test-frames/berg_dz_plus.hex
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
68 A3 A3 68 08 00 72 00 00 00 00 42 04 02 02 00 00 00 00 0E 04 00 00 00 00 00 00 8E 10 04 00 00 00 00 00 00 8E 20 04 00 00 00 00 00 00 8E B0 00 04 00 00 00 00 00 00 8E 80 10 04 00 00 00 00 00 00 8E 80 40 04 00 00 00 00 00 00 8E 90 40 04 00 00 00 00 00 00 8E A0 40 04 00 00 00 00 00 00 8E B0 40 04 00 00 00 00 00 00 8E 80 50 04 00 00 00 00 00 00 01 FF 13 00 0B FF 12 00 00 00 0A FF 68 00 00 0A FF 69 00 00 07 FD 17 00 00 00 00 00 00 00 00 01 FF 18 00 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FC 16
|
||||||
|
|
150
test/test-frames/berg_dz_plus.xml
Normal file
150
test/test-frames/berg_dz_plus.xml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>0</Id>
|
||||||
|
<Manufacturer>ABB</Manufacturer>
|
||||||
|
<Version>2</Version>
|
||||||
|
<ProductName>ABB Delta-Meter</ProductName>
|
||||||
|
<Medium>Electricity</Medium>
|
||||||
|
<AccessNumber>0</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>4</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>1</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>4</Tariff>
|
||||||
|
<Device>2</Device>
|
||||||
|
<Unit>Energy (10 Wh)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Manufacturer specific</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>More records follow</Function>
|
||||||
|
<Value>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
76
test/test-frames/els_falcon.xml
Normal file
76
test/test-frames/els_falcon.xml
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>70112345</Id>
|
||||||
|
<Manufacturer>ELS</Manufacturer>
|
||||||
|
<Version>10</Version>
|
||||||
|
<ProductName>Elster Falcon</ProductName>
|
||||||
|
<Medium>Water</Medium>
|
||||||
|
<AccessNumber>2</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>1234567</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2007-02-06T13:58:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2007-01-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (m m^3)</Unit>
|
||||||
|
<Value>456951</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2008-01-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Maximum value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>5945</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2008-01-01</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (m m^3/h)</Unit>
|
||||||
|
<Value>6137</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Manufacturer specific</Function>
|
||||||
|
<Value>0E 42 20 01 01 01 00 05 08 5E 01 20 3D 12 08 3D 12 08 00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<MBusData>
|
<MBusData>
|
||||||
|
|
||||||
<SlaveInformation>
|
<SlaveInformation>
|
||||||
|
1
test/test-frames/engelmann_sensostar2c.hex
Normal file
1
test/test-frames/engelmann_sensostar2c.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 A6 A6 68 08 03 72 10 00 38 10 C5 14 01 04 1E 00 00 00 04 78 EA 62 9E 00 04 6D 32 14 86 16 04 15 81 00 00 00 04 FB 00 08 00 00 00 84 20 FB 00 00 00 00 00 84 30 FB 00 00 00 00 00 04 3D 00 00 00 00 04 2D 00 00 00 00 02 5B 5F 00 02 5F 2B 00 04 61 8A 14 00 00 02 27 FA 01 01 FD 17 00 04 90 28 A0 86 01 00 42 6C 7F 1C 44 15 81 00 00 00 44 FB 00 08 00 00 00 C4 20 FB 00 00 00 00 00 C4 30 FB 00 00 00 00 00 82 01 6C 5F 1C 84 01 15 54 00 00 00 84 01 FB 00 05 00 00 00 84 21 FB 00 00 00 00 00 84 31 FB 00 00 00 00 00 B7 16
|
201
test/test-frames/engelmann_sensostar2c.xml
Normal file
201
test/test-frames/engelmann_sensostar2c.xml
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>10380010</Id>
|
||||||
|
<Manufacturer>EFE</Manufacturer>
|
||||||
|
<Version>1</Version>
|
||||||
|
<ProductName>Engelmann SensoStar 2C</ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>30</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>0000</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Fabrication number</Unit>
|
||||||
|
<Value>10380010</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Time Point (time & date)</Unit>
|
||||||
|
<Value>2012-06-06T20:50:00</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>129</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>8</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="6">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (1e-1 m^3/h)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="7">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (100 W)</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="8">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>95</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="9">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>43</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="10">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Temperature Difference (1e-2 deg C)</Unit>
|
||||||
|
<Value>5258</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="11">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Operating time (days)</Unit>
|
||||||
|
<Value>506</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="12">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Error flags</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="13">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (my m^3)</Unit>
|
||||||
|
<Value>100000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="14">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2011-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="15">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>129</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="16">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>8</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="17">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="18">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>1</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="19">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Time Point (date)</Unit>
|
||||||
|
<Value>2010-12-31</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="20">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>84</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="21">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>0</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>5</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="22">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>2</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="23">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>2</StorageNumber>
|
||||||
|
<Tariff>3</Tariff>
|
||||||
|
<Device>0</Device>
|
||||||
|
<Unit>Unrecognized VIF extension: 0x00</Unit>
|
||||||
|
<Value>0</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/example_data_01.hex
Normal file
1
test/test-frames/example_data_01.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 31 31 68 08 01 72 45 58 57 03 B4 05 34 04 9E 00 27 B6 03 06 F9 34 15 03 15 C6 00 4D 05 2E 00 00 00 00 05 3D 00 00 00 00 05 5B 22 F3 26 42 05 5F C7 DA 0D 42 FA 16
|
57
test/test-frames/example_data_01.xml
Normal file
57
test/test-frames/example_data_01.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>3575845</Id>
|
||||||
|
<Manufacturer>AMT</Manufacturer>
|
||||||
|
<Version>52</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>158</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>B627</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>1389817</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>5046470</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (kW)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (1e-1 m^3/h)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>41.737434</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>35.463650</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/example_data_02.hex
Normal file
1
test/test-frames/example_data_02.hex
Normal file
@ -0,0 +1 @@
|
|||||||
|
68 31 31 68 08 01 72 45 58 57 03 B4 05 34 04 A1 00 27 B6 03 06 F9 34 15 03 15 C6 00 4D 05 2E 00 00 00 00 05 3D 00 00 00 00 05 5B 1E D8 24 42 05 5F D9 8A 0D 42 9E 16
|
57
test/test-frames/example_data_02.xml
Normal file
57
test/test-frames/example_data_02.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<MBusData>
|
||||||
|
|
||||||
|
<SlaveInformation>
|
||||||
|
<Id>3575845</Id>
|
||||||
|
<Manufacturer>AMT</Manufacturer>
|
||||||
|
<Version>52</Version>
|
||||||
|
<ProductName></ProductName>
|
||||||
|
<Medium>Heat: Outlet</Medium>
|
||||||
|
<AccessNumber>161</AccessNumber>
|
||||||
|
<Status>00</Status>
|
||||||
|
<Signature>B627</Signature>
|
||||||
|
</SlaveInformation>
|
||||||
|
|
||||||
|
<DataRecord id="0">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Energy (kWh)</Unit>
|
||||||
|
<Value>1389817</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="1">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume (1e-1 m^3)</Unit>
|
||||||
|
<Value>5046470</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="2">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Power (kW)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="3">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Volume flow (1e-1 m^3/h)</Unit>
|
||||||
|
<Value>0.000000</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="4">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Flow temperature (deg C)</Unit>
|
||||||
|
<Value>41.211052</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
<DataRecord id="5">
|
||||||
|
<Function>Instantaneous value</Function>
|
||||||
|
<StorageNumber>0</StorageNumber>
|
||||||
|
<Unit>Return temperature (deg C)</Unit>
|
||||||
|
<Value>35.385593</Value>
|
||||||
|
</DataRecord>
|
||||||
|
|
||||||
|
</MBusData>
|
1
test/test-frames/filler.hex
Normal file
1
test/test-frames/filler.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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user