Commit Graph

27 Commits

Author SHA1 Message Date
fb84fd11a8 Add additional check if directory is empty or hex file doesn't exists 2013-08-03 15:51:34 +02:00
55c2bf0dee Add normalized values option -n
Add file pointer check after fread
2013-07-17 22:21:07 +02:00
8f61edc85d remove the CUnit based unit test, since it does not work well (does not show which test that is failing...). instead we can use Stefan's nice generate-xml.sh which show exactly which test frames fails and the diff. 2013-07-05 00:12:38 +09:00
87cadafea0 updated XML files for test frames 2013-07-05 00:07:03 +09:00
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
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
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
363f59a149 Ignore filler DIF (= 0x2F) 2013-03-11 09:27:16 +01:00
9c9c0201f9 add exploit for invalid length 2012-12-29 11:57:13 +01:00
a266c96a2f - remove unnecessary POSIX header
- change file handling from POSIX to ANSI C
2012-12-10 21:37:42 +01:00
cf297a56c3 New test frame for Elvaco temperature / humidity meter (from Jakob
Skov-Pedersen)
2012-10-21 10:55:48 +02:00
d816a1c30f Merge branch 'master' of github.com:rscada/libmbus 2012-07-25 00:04:16 +09:00
543d3493d7 added test frame with float point value that was incorrectly decoded (now fixed) 2012-07-25 00:02:24 +09:00
989fdbd7ee added -lm in link flags (libmbus uses the pow function from libm) 2012-07-24 23:55:56 +09:00
ff37c4af8c Added test frames:
- ABB F95
- Allmess Megacontrol CF-50
- Elster TMP-A
- EMH DIZ
- NZR DMZ 5/63
2012-07-11 22:41:13 +02:00
82aec2ff97 repo cleanup, no need for .in files in the repository 2012-06-18 21:11:49 +09:00
bf12395af9 Fixed segmentation fault in case of much XML output
Because of the multi telegrams it is impossible to use a fixed
buffer for XML output on the stack. Now the buffer is allocated on the
heap. These also leads to a change in return behaviour for all XML
functions, because it's possible that the buffer is NULL. For variable
data this buffer grows every time there are less than 1024 bytes left
for a new record.
2012-05-29 21:24:30 +02:00
b055dc612f Replaced deprecated BSD against ANSI functions (bzero -> memset, bcopy
-> memcopy)
2012-05-18 13:55:43 +02:00
f2919f97ca Switch back to default output 2012-05-15 23:35:13 +02:00
5a7e69f90d Merge remote branch 'upstream/master'
Conflicts:
	mbus/mbus-serial.c
2012-05-14 00:09:05 +02:00
4d0afd161c Restore files 2012-04-22 22:24:47 +02:00
df06b93e97 Merge remote branch 'upstream/master'
Conflicts:
	mbus/mbus-protocol.c
2012-04-22 19:37:55 +02:00
5ce9a540ed Added error frames for testing 2012-04-22 15:53:54 +02:00
1b69b1b51b Added a new script to generate XML files from hex files in a specified
directory
2012-04-16 21:04:03 +02:00
4958966797 Fixed usage 2012-04-16 21:00:24 +02:00
bbdcac04b0 Fixed exit codes 2012-04-16 00:33:03 +02:00
c10b37e53d got rid of duplicate catalog libmbus/libmbus 2012-04-15 10:51:15 +09:00