Robert Johansson
b1473adc46
fixed warning
2013-07-04 23:49:42 +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
Robert Johansson
a8f5c07fcf
Merge pull request #56 from lategoodbye/master
...
Improve wildcard search, fix leaks and segfault
2013-07-04 07:04:58 -07: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
0a0403988c
improve error message in request data programs
2013-07-03 22:31:57 +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
Robert Johansson
655e3c897d
Merge pull request #55 from lategoodbye/master
...
Improve multi reply binaries
2013-07-01 07:09:18 -07:00
Stefan Wahren
8b9d6e735e
sync mbus-tcp-request-data-multi-reply with serial
...
make init_slaves and parse_abort static
fix return value of parse_abort
remove unused variables
free resources before exit
2013-07-01 08:16:20 +02:00
Stefan Wahren
2ca73eefa1
add new parameter f to man page
...
add range for TCP port
2013-07-01 08:09:01 +02:00
Robert Johansson
0f0882d4fa
Merge pull request #54 from lategoodbye/master
...
Add missing file mbus-tcp-application-reset.c
2013-06-29 07:13:06 -07:00
Robert Johansson
18987c7887
Merge pull request #53 from minusinf/master
...
Added frame "-f" to option to mbus-serial-request-data-multi-reply to specify frames needed for request
2013-06-29 07:12:56 -07:00
Stefan Wahren
2c03cab529
Add missing file mbus-tcp-application-reset from issue #42 .
...
This will fix also issue #52 .
2013-06-28 18:59:04 +02:00
Pascal Spoerri
a61714d26d
Added frame option to mbus-serial-request-data-multi-reply
...
Improved parsing
2013-06-28 14:10:15 +00:00
Robert Johansson
158208c2b1
Merge pull request #51 from lategoodbye/master
...
Improve data parsing
2013-06-22 02:47:17 -07: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
3381d1b41d
test cases for invalid telegrams
...
- too short fixed data length (invalid_length2.hex)
- premature end of record at data (premature_end_of_data1.hex,
premature_end_of_data2.hex)
- premature end of record at DIF (premature_end_of_dif1.hex,
premature_end_of_dif2.hex)
- premature end of record at variable length VIF
(premature_end_of_var_vif1.hex)
- premature end of record at VIF (premature_end_of_vif1.hex)
- too long variable length VIF (too_long_var_vif.hex)
- too many DIFE (too_many_dife.hex)
- too many VIFE (too_many_vife.hex)
- too short variable header (too_short_header.hex)
2013-06-21 08:45:22 +02:00
Robert Johansson
c4ceb5c057
Merge pull request #50 from lategoodbye/master
...
Fixed correction in auxiliary function
2013-06-16 05:24:15 -07:00
Stefan Wahren
687ea60f54
Fixed correction in mbus_vib_unit_normalize
2013-06-09 23:14:08 +02:00
Robert Johansson
73464cdc59
Merge pull request #49 from lategoodbye/master
...
Fix port and baudrate, add some checks
2013-05-13 01:53:55 -07: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
a640295d1b
Merge remote-tracking branch 'origin/master'
2013-05-12 21:27:55 +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
ddd15c0373
extend baudrate from int to long
...
because 38400 baud could be bigger than INT_MAX
2013-05-12 16:23:27 +02:00
Robert Johansson
b0dff87093
Merge pull request #48 from lategoodbye/master
...
parseable for splint, fix memleaks, minor fixes
2013-05-12 01:26:39 -07: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
Robert Johansson
d6ac241d2f
Merge pull request #47 from lategoodbye/master
...
Add missing initialization
2013-05-04 07:21:23 -07:00
Stefan Wahren
0d6bb583c2
add missing initialization (thanks to valgrind)
2013-05-03 17:23:18 +02:00
Robert Johansson
f7e5898636
Merge pull request #46 from lategoodbye/master
...
experimental feature application reset, better primary scan, equalize stderr output
2013-04-29 19:12:46 -07: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
f6601ca40f
print all errors on stderr in all binaries
2013-04-26 08:18:17 +02:00
Stefan Wahren
ea0c6c3455
add new parameter to specify retries for mbus-serial-scan and
...
mbus-tcp-scan
make primary scan to retransmit SND_NKE in case of timeout so it's more
reliable but also slowlier
keep default behaviour, no retransmission
equalize mbus-serial-scan and mbus-tcp-scan
update man page
2013-04-25 21:19:41 +02:00
Robert Johansson
65c036f0d2
Merge pull request #45 from lategoodbye/master
...
fixes for doxygen
2013-04-18 08:24:30 -07: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
Robert Johansson
36223255b8
Merge pull request #44 from lategoodbye/master
...
fix some handling after memory allocation
2013-04-13 03:41:22 -07:00
Stefan Wahren
5d4002f423
revert last commit
2013-04-11 22:17:53 +02:00
Stefan Wahren
f07d4fc579
Merge remote-tracking branch 'upstream/master'
2013-04-11 22:12:16 +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
Robert Johansson
903460846a
Merge pull request #41 from tpltnt/master
...
version info added
2013-04-09 07:39:48 -07:00
Robert Johansson
db72e2dd49
Merge pull request #43 from lategoodbye/master
...
fix for issue #42
2013-04-09 07:37:25 -07:00