Stefan Wahren
0927f23ee7
Let mbus_str_xml_encode return a resultcode
2016-01-31 17:55:09 +00:00
Dirk Zenker
781736fe4c
add codepage to XML output
2014-02-24 11:02:26 +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
Stefan Wahren
58778ba9bc
Add functions to decode storage number, tariff and device from DIF
2013-11-07 00:24:11 +01:00
Stefan Wahren
3aa81cfb23
Add DIF extension bit masks
2013-11-06 10:15:15 +01:00
Stefan Wahren
9d84318631
Add manufacturer ID for GMC
2013-10-31 22:59:59 +01:00
Stefan Wahren
6afe7a10dc
fix wrong decoding of integer / type B (now handle signedness correctly)
...
separate result code und decoded value for integer decoding (new
parameter)
refactor variable names
2013-10-31 22:25:34 +01:00
Stefan Wahren
28b73bf9d8
Add manufacturer ID for Rossweiner
2013-10-17 13:45:45 +02:00
Stefan Wahren
0cf57bfc35
Move event handling from global variable to handle
...
- remove global event function pointer
- add event function pointer to handle structure
- add handle parameter to register functions
- move all register functions to mbus-protocol-aux.c
2013-10-13 21:49:40 +02:00
Stefan Wahren
d5f06ec910
Replace magic number for M-Bus frame data length with define
2013-10-05 10:38:07 +02:00
Stefan Wahren
55d4c0fba2
Remove trailing whitespace
...
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2013-09-13 17:53:33 +02:00
Stefan Wahren
dd56a08811
Improve data parsing
...
- add length defines for variable data header and fixed data
- add size check for fixed data
- avoid problems with memory alignment / padding in mbus structures
(improve portability)
- abort parsing if there are too many DIFE or VIFEs
- check for premature end of variable data
- check size of variable length VIF
2013-06-22 11:50:36 +02:00
Stefan Wahren
4d85dad403
change TCP port datatype from int to uint16_t
...
because int doesn't match the range
add range check in every TCP binary
2013-05-12 21:26:38 +02:00
Stefan Wahren
3935b4013e
make parseable for splint
...
- replace non standard u_char with unsigned char (ANSI)
- advice splint to ignore variadic macros
- move declarations from the middle to top of functions (C90)
- replace local library includes <> to ""
2013-05-04 18:14:18 +02:00
Jakob Skov-Pedersen
6166553755
Make my last change more readable.
...
As suggested by lategoodbye. Also make it more in line with the way
everything else is written.
2013-03-17 09:19:29 +01:00
Stefan Wahren
b1063db3bc
replace magic numbers with defines
...
fix MBUS_MAX_PRIMARY_SLAVES to 250
2013-03-02 18:03:31 +01:00
Stefan Wahren
61fd2aa1c7
add new helper functions to check primary and secondary addresses
2012-12-31 13:37:17 +01:00
Stefan Wahren
746e611236
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
mbus/mbus-protocol-aux.h
2012-12-12 18:06:40 +01:00
Stefan Wahren
dc948566db
remove unnecessary POSIX header
2012-12-10 21:26:48 +01:00
aleax
72341baea5
Modify C header files to include from C++ code
2012-12-05 21:24:58 +02:00
Stefan Wahren
688f0d3bc0
Added product name mapping for Elvaco meters
2012-10-21 23:24:04 +02:00
Stefan Wahren
3de91c5eab
Added product name mapping for Ista sensonic II mbus
2012-10-05 22:09:07 +02:00
Stefan Wahren
d211c3cbcb
new function mbus_frame_direction to get the direction of a frame
...
(slave to master or vice versa)
2012-10-03 23:03:05 +02:00
Stefan Wahren
fe4217772c
Added product name mapping for Sensus PolluCom E
2012-09-17 21:01:53 +02:00
Stefan Wahren
e6a52f97ea
Replaced magic resultcodes from mbus_recv_frame with defines
2012-07-11 23:33:52 +02:00
jakubovsky
c848090f56
Rebuilding M-Bus context structs in progress
...
- changed local library file includes from <> to ""
- get rid of 'if (is_serial)' conditions
- mbus_context_serial() and mbus_context_tcp() allocates memory and initialize context specific function pointers
- simply mbus_connect() called instead of mbus_connect_tcp() or mbus_connect_serial()
- context specific data can still be accessed via (void* auxdata) pointer
- strdup(3) to copy host IP into TCP context struct
2012-07-04 17:18:36 +02:00
Stefan Wahren
989eada28a
Improved model mapping
...
- initialize result buffer
- added new mappings
- added und fixed man codes
2012-05-29 20:33:09 +02:00
Stefan Wahren
0cb23161e7
Added receive timestamp for each data record in XML output
2012-05-29 20:17:05 +02:00
Stefan Wahren
f41b982093
New events for wildcard search
2012-05-20 03:22:02 +02:00
Stefan Wahren
90aec91bff
Added frame tracing (hex format) via debug switch
2012-05-15 22:57:03 +02:00
Stefan Wahren
8f48d75fb0
Added 2 event callbacks to handle send and receive events outside the
...
library
(now it is possible to trigger a led from an application if m-bus data
is received)
2012-05-13 23:57:24 +02:00
Stefan Wahren
df06b93e97
Merge remote branch 'upstream/master'
...
Conflicts:
mbus/mbus-protocol.c
2012-04-22 19:37:55 +02:00
Stefan Wahren
e2400f5c27
Added new defines for decoding dif
2012-04-22 16:06:54 +02:00
Stefan Wahren
5ce9a540ed
Added error frames for testing
2012-04-22 15:53:54 +02:00
Robert Johansson
281394c092
attempt to unify the XML output for sequences of multi-telegram frames (single XML document, global record counts, no repeat of frame headers)
2012-04-21 08:34:01 +09:00
Robert
c10b37e53d
got rid of duplicate catalog libmbus/libmbus
2012-04-15 10:51:15 +09:00