Stefan Wahren
cdb41daa9d
Improve product strings for Aquametro and Sensus
2020-07-19 11:18:11 +02:00
Fredrik Skold
ce396e8838
Implement all of VIF extensions for 0xFB ( #166 )
2020-07-19 11:18:07 +02:00
Anders Wennmo
46c43946bf
Implement all of VIF extensions for 0xFD ( #166 )
2020-07-19 11:18:03 +02:00
Stefan Wahren
50dadfd8b4
Fix VIF descriptions
2020-07-19 11:17:55 +02:00
Stefan Wahren
2a66e6a53b
Improve BCD decoding ( #167 )
...
* Introduce mbus_data_bcd_decode_hex
The convert function mbus_data_bcd_decode (BCD to decimal) suffers from
information loss in case of hexacimal digits. So introduce a new function
mbus_data_bcd_decode_hex (BCD to hexadecimal), which isn't affected and
use this for default XML output. But keep mbus_data_bcd_decode for
normalized output.
2020-07-19 11:10:13 +02:00
Fabian Pflug
0edc297c47
Added more medium definitions according to DIN EN 13757-7:2018-06 ( #162 )
2020-07-19 11:10:00 +02:00
Fabian Pflug
8bbb9bb708
Add product strings for Sensoco devices ( #161 )
2020-07-19 11:08:56 +02:00
Matthias Deimbacher
3d5806ff5d
fix: add missing declaration to header ( #160 )
2020-07-19 11:08:31 +02:00
Carlos Gomes Martinho
6edab86078
refactor: clean up some compiler warnings ( #152 )
2020-03-21 10:50:33 +01:00
lvogt
62ac3678ff
Fix prefixes ( #148 )
2019-07-08 10:38:20 +02:00
Stefan Wahren
36a85d3737
Add product string of Hydrometer Sharky 775
2019-02-20 22:01:47 +01:00
Stefan Wahren
2f9fa5ccc8
Implement negative BCD number (Type A)
...
According to W4B21021.pdf Appendix A a hex code Fh in the MSD
position signals a negative BCD number.
2019-02-20 22:01:47 +01:00
Ingo Fischer
027f6fb689
prevent multiple calls to disconnect for serial and tcp ( #137 )
...
* prevent multiple calls to disconnect for serial and tcp
2018-03-28 19:53:17 +02:00
Ingo Fischer
2a2fbc372a
make generated timestamps conform to ISO definition
2018-03-28 14:26:06 +02:00
Stefan Wahren
73d58a9f7d
Implement mbus_set_primary_address()
...
This function sends a frame to change primary address of a slave.
2018-03-21 21:40:58 +01:00
Stefan Wahren
a572c0f742
mbus-serial: Increase serial timeouts
...
We need to take USB to serial adapters into account for timeout
calculation.
2017-04-07 15:59:44 +00:00
Stefan Wahren
87e3c22f85
Implement Type I CP48 (date and time)
2016-07-23 09:38:41 +00:00
Stefan Wahren
094c9ef453
Fix year handling in mbus_data_tm_decode
...
According to ANSI C the member tm_year saves the years since
1900.
2016-07-23 09:38:14 +00:00
strongly-typed
0e5b5b46a8
Fix regression with XML output.
...
Copy-paste error from 9edcc44.
Spotted with `cd test && ./generate-xml.sh test-frames`
--- test-frames/manual_frame2.xml 2016-05-09 00:19:44.000000000 +0200
+++ test-frames/manual_frame2.xml.new 2016-05-09 01:09:09.000000000 +0200
@@ -17,7 +17,7 @@
<DataRecord id="1">
<Function>Actual value</Function>
<Unit>reserved but historic</Unit>
- <Value>135</Value>
+ <Value>1</Value>
</DataRecord>
</MBusData>
2016-05-09 01:11:23 +02:00
Stefan Wahren
9edcc44eeb
Fix several format string issues
2016-04-01 19:20:00 +00:00
Stefan Wahren
7fe67c8586
Fix format string in mbus_send_user_data_frame
2016-04-01 18:27:59 +00:00
Stefan Wahren
9906723447
Fix IEEE754 conversion
...
It seems that the endianness handling was broken in
ef6c4be655c ("Safer IEEE754 conversion."). So drop it.
2016-04-01 18:19:32 +00:00
Aarno Aukia
b6cbb1de1e
merge rscada/master with arska/feature-ignoretestbinaries
2016-03-25 23:20:34 +01:00
Aarno Aukia
b9b131d064
Order device detection by manufacurer
...
merging ELS so that TMP-A is detected again
2016-02-08 14:06:24 +01:00
Stefan Wahren
ed87f62a87
Add product strings for devices from ABB, Elster and Relay
...
This patch adds product identification for:
* ABB Delta-Meter
* Elster Falcon
* Relay PadPuls M1
* Relay PadPuls M4
* Relay Padin 4
* Relay AnDi 4
* Relay PadPuls M2
2016-02-06 12:04:13 +00:00
Aarno Aukia
eaeb6e5502
retab and remove trailing whitespace
2016-02-05 14:42:16 +01:00
Stefan Wahren
8b1c012a91
Add product strings of Janitza UMG 96S
2016-02-02 18:57:57 +00:00
Stefan Wahren
db40010b93
Add product strings of Berg DCMi, BLMi and BMB-10S0
2016-01-31 18:09:21 +00:00
Stefan Wahren
04eae740b4
Add product strings of Carlo Gavazzi EM21,EM24,EM33
2016-01-31 18:00:02 +00:00
Stefan Wahren
0927f23ee7
Let mbus_str_xml_encode return a resultcode
2016-01-31 17:55:09 +00:00
Stefan Wahren
3699d25b10
Fix uninitialized strings
2016-01-31 17:44:08 +00:00
Stefan Wahren
f6dcf6e8d1
Fixed naming in declaration
...
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2016-01-31 17:41:08 +00:00
Stefan Wahren
5674b30a6c
Make use of package version from autotools
...
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2016-01-31 17:40:58 +00:00
Stuart Longland
ef6c4be655
Safer IEEE754 conversion.
...
The conversion given assumed two things:
1. the pointer was either 32-bit aligned or that unaligned word access
was safe. (Not the case on ARM)
We avoid this by using memcpy to copy to a buffer that *is*
32-bit-word-aligned.
2. the word was in native-endian format.
The original code appeared to assume the given word would be in
big-endian format (aka "network" byte order), so we convert it to the
host's native format before casting.
We re-instate the original implementation, controlled by a compiler
switch to allow easy rollback if problems are encountered.
2015-12-03 08:08:22 +10:00
jakubovsky
583a397e8e
Needless math.h include
2015-12-03 07:52:23 +10:00
jakubovsky
7e1be93dbd
Needless IEEE754 conversion, float pointer cast instead
2015-12-03 07:51:26 +10:00
Dirk Zenker
5f0b5d5dd1
Beautify: replace tabs with spaces and remove trailing spaces
2014-02-24 15:20:42 +01:00
Dirk Zenker
f47caf151e
add manufacturer id / product string of some meters:
...
Aquametro CALEC MB
Aquametro CALEC ST
Elster SensoStar 2
Elster F96 Plus
Elster F4
EMU Professional 3/75 M-Bus
Deltamess F2
Sensus PolluTherm
Sensus PolluStat E
NZR IC-M2
Saia-Burgess ALE3
Saia-Burgess AWD3
2014-02-24 11:22:40 +01:00
Dirk Zenker
781736fe4c
add codepage to XML output
2014-02-24 11:02:26 +01:00
Dirk Zenker
8197874fe7
bugfix, the functions
...
mbus_data_record_storage_number()
mbus_data_record_tariff()
mbus_data_record_device()
did return bogus random values, because of uninitialized variables
2014-02-20 11:26:31 +01:00
Michael Heimpold
f262138572
mbus_manufacturer_id: add error checking code
...
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2014-01-18 20:43:57 +01:00
Michael Heimpold
0fccc0e337
Add a function to calculate the manufacturer ID from the 3 byte ASCII
...
code. The formula can be found at http://www.m-bus.com/files/w4b21021.pdf ,
chapter 3.3 at page 6.
This obsoletes the static defines, so remove them.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2014-01-18 13:44:01 +01:00
Aarno Aukia
f42c56f19c
fix 2nd address scanning bug, add some comments
...
code merge from arska/libmbus without debug
2013-11-07 11:14:15 +01:00
Stefan Wahren
0d9f83ba88
Extend XML output with storage number, tariff and device
2013-11-07 00:32:01 +01:00
Stefan Wahren
e1ca652bf0
Extend mbus_record with storage number, tariff and device
2013-11-07 00:31:03 +01:00
Stefan Wahren
58778ba9bc
Add functions to decode storage number, tariff and device from DIF
2013-11-07 00:24:11 +01:00
Stefan Wahren
d79cb1c998
Fix BCD decoding bug
2013-11-07 00:13:56 +01:00
Stefan Wahren
e9d39d4708
Extend DIF debug output (storage number LSB)
...
Fix DIFE debug output (storage number, tariff, device unit)
Fix typos in comments
Replace magic bit masks with defines
2013-11-06 11:11:43 +01:00
Stefan Wahren
3aa81cfb23
Add DIF extension bit masks
2013-11-06 10:15:15 +01:00
Stefan Wahren
7f00f72b69
Add missing VIF=7Eh / FEh
2013-11-01 17:17:57 +01:00