Stefan Wahren
9e23818152
Add new function to send a user data packet from master to slave
2013-10-13 14:52:45 +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
Robert Johansson
654905a94d
bug fix in timeout config
2013-08-30 00:20:35 +09:00
Robert Johansson
fd5c9adffb
made it possible to configure the TCP read timeout parameter
2013-08-30 00:05:22 +09:00
Stefan Wahren
d9dd055bea
Fix mbus_vib_unit_lookup
...
remove unreachable code
add missing unit password
fix typo
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2013-08-03 16:35:09 +02:00
Robert Johansson
5160a10211
fixed warning
2013-07-04 23:59:41 +09:00
Robert Johansson
5b83cad8fb
only show timestamp in XML output if it is set (not all frames that goes into mbus_parse passes through timestamp), to avoid a lot of '<Timestamp>1970-01-01T00:00:00</Timestamp>'
2013-07-04 23:47:06 +09:00
Robert Johansson
1fee3d9a5a
bug fix: don't assume that frame->next is zeroed before mbus_parse is called
2013-07-04 23:30:27 +09:00
Stefan Wahren
dcc9e2c2b4
fix indent
2013-07-03 20:52:27 +02:00
Stefan Wahren
7b897494fd
Improve wildcard search
...
- handle collisions after request for secondary address
- check frame type correctly
- ignore M-Bus devices without secondary address
2013-07-03 20:46:47 +02:00
Stefan Wahren
70f23567a8
fix potential segmentation fault
2013-07-03 20:36:43 +02:00
Stefan Wahren
551176911f
fix memory leaks in error case
2013-07-03 20:34:30 +02:00
Stefan Wahren
8dd1d4e4ae
bugfix for +1 error in VIFE parser
...
now VIFE and DIFE behave equal
2013-07-03 20:30:20 +02:00
Robert Johansson
88b2b9fafa
bugfix in VIFE parser
2013-07-03 22:50:03 +09:00
Robert Johansson
e1164c87c9
error message if secondary address generation fails
2013-07-03 22:20:44 +09:00
Robert Johansson
31f17ab4c2
use error_str instead of direct console output
2013-07-03 22:18:06 +09:00
Robert Johansson
973cc7ba30
use MBUS_ERROR instead of fprintf(stderr
2013-07-03 22:11:13 +09: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
687ea60f54
Fixed correction in mbus_vib_unit_normalize
2013-06-09 23:14:08 +02:00
Stefan Wahren
d7168a4ea4
Fix return value and error message
2013-05-13 08:47:19 +02:00
Stefan Wahren
858aea33ab
add more checks in lower layers
...
to avoid segmentation faults, out of bounds access and integer overflow
make parseable for splint
suppress splint warnings about datatype cc_t
fix type of return value for read()
add checks before accessing tty
2013-05-13 08:41:38 +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
c59e763a84
minor fixes
...
remove unreachable code
add parameter checks to mbus_data_bcd_encode
init time structure in mbus_data_tm_decode as possible
mark falltrough for splint
remove unused variable val
fix removed realloc
2013-05-04 22:43:23 +02:00
Stefan Wahren
ee209023b8
fix memleaks
...
avoid memleak if memory is full
fix "memleak" at the end of mbus_parse_hex
2013-05-04 19:17:27 +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
Stefan Wahren
0d6bb583c2
add missing initialization (thanks to valgrind)
2013-05-03 17:23:18 +02:00
Stefan Wahren
e1657399ff
add new function to send application reset incl. subcode
...
fix typo in comment
add new program to test experimental feature application reset
add mbus-tcp-application-reset to build process
2013-04-27 13:16:44 +02:00
Stefan Wahren
153828268a
combine typedef and struct to avoid same comments
...
combine enum and struct to avoid same comments
add comments for mbus_context_option
add missing parameters in comments
2013-04-17 22:46:04 +02:00
Stefan Wahren
5500db0898
add missing checks after memory allocation
...
add missing memset after memory allocation
2013-04-11 22:05:08 +02:00
tpltnt
72ee386e10
version string as const char*
2013-04-09 10:18:27 +02:00
tpltnt
a3018692dc
mbus_ prefix added
2013-04-06 19:05:45 +02:00
tpltnt
8fcdf3bf3b
function declaration added
2013-04-05 15:13:18 +02:00
tpltnt
c6fc41484f
small function to get current version added
2013-04-04 00:49:03 +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
Jakob Skov-Pedersen
363f59a149
Ignore filler DIF (= 0x2F)
2013-03-11 09:27:16 +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
Alexey Bondarchuk
4cd114e911
Fix undeclared variable
2013-01-14 12:28:14 +02:00
Stefan Wahren
61fd2aa1c7
add new helper functions to check primary and secondary addresses
2012-12-31 13:37:17 +01:00
Stefan Wahren
2335deb742
Fix segmentation fault
...
- check if L Field is at least 3 to avoid crash (MBDOC48.PDF, page 23)
2012-12-22 00:08:59 +01:00
Stefan Wahren
1080031879
Merge remote-tracking branch 'origin/master'
...
Conflicts:
mbus/mbus-protocol.c
2012-12-20 20:57:33 +01:00
Stefan Wahren
404e245af5
replace magic number with define
2012-12-20 20:42:10 +01:00
Stefan Wahren
a4e92f6eab
replace magic number with define
2012-12-20 20:12:19 +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
9b94df16b9
- add new type for context options
...
- add new function mbus_context_set_option to set context specific
options like retransmission or echo cancelation
2012-12-11 20:22:26 +01:00
Stefan Wahren
dc948566db
remove unnecessary POSIX header
2012-12-10 21:26:48 +01:00
Stefan Wahren
72868fdc3f
add a new helper function ( mbus_hex2bin ) to convert hex values
...
into binary values
2012-12-10 21:16:46 +01:00
aleax
72341baea5
Modify C header files to include from C++ code
2012-12-05 21:24:58 +02:00
Stefan Wahren
cfa35db086
Fixed potential segmentation fault
2012-10-22 23:35:45 +02:00
Stefan Wahren
688f0d3bc0
Added product name mapping for Elvaco meters
2012-10-21 23:24:04 +02:00