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
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
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
3699d25b10
Fix uninitialized strings
2016-01-31 17:44:08 +00:00
Dirk Zenker
5f0b5d5dd1
Beautify: replace tabs with spaces and remove trailing spaces
2014-02-24 15:20:42 +01:00
Dirk Zenker
781736fe4c
add codepage to XML output
2014-02-24 11:02:26 +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
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
7f00f72b69
Add missing VIF=7Eh / FEh
2013-11-01 17:17:57 +01:00
Stefan Wahren
6021f3cc65
Fix VIF extension mappings for VIF=0FBh
2013-11-01 17:13:49 +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
663642b7ec
Adopt retransmission for secondary address probing
2013-10-19 13:56:58 +02:00
Stefan Wahren
e6173103e2
Avoid unnecessary data request in mbus_read_slave
2013-10-19 13:43:00 +02:00
Stefan Wahren
31016929bc
Seperate retransmission maximum in two parameters
...
one for data requests and another for search requests
- add new handle member for max search retransmission
- set default maximum for search retransmission to one
- rename define for retransmission option
2013-10-18 20:15:53 +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
9e23818152
Add new function to send a user data packet from master to slave
2013-10-13 14:52:45 +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
5160a10211
fixed warning
2013-07-04 23:59:41 +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
Robert Johansson
e1164c87c9
error message if secondary address generation fails
2013-07-03 22:20:44 +09:00
Robert Johansson
973cc7ba30
use MBUS_ERROR instead of fprintf(stderr
2013-07-03 22:11:13 +09:00
Stefan Wahren
687ea60f54
Fixed correction in mbus_vib_unit_normalize
2013-06-09 23:14:08 +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
5500db0898
add missing checks after memory allocation
...
add missing memset after memory allocation
2013-04-11 22:05:08 +02: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
404e245af5
replace magic number with define
2012-12-20 20:42:10 +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
72868fdc3f
add a new helper function ( mbus_hex2bin ) to convert hex values
...
into binary values
2012-12-10 21:16:46 +01:00
Stefan Wahren
cfa35db086
Fixed potential segmentation fault
2012-10-22 23:35:45 +02:00
Stefan Wahren
bc2c85c378
Add custom VIFE handling with a corrective factor (from Jakob
...
Skov-Pedersen)
2012-10-21 11:21:07 +02:00
Stefan Wahren
fef774d98d
Purge behavior as new context parameter (default = purge master to
...
slave)
2012-10-04 22:33:22 +02:00
Stefan Wahren
78f16f0248
New defines for purge behavior (echo cancelation)
2012-10-04 22:30:53 +02:00
Stefan Wahren
af80dda0d8
Revert "Extend mbus_recv_frame with simple echo cancelation"
...
This reverts commit 169e37d360f5782dbbfe8bf9ccb5877cb6af7fb9.
2012-10-03 23:25:10 +02:00
Stefan Wahren
169e37d360
Extend mbus_recv_frame with simple echo cancelation
2012-10-03 23:06:11 +02:00
Stefan Wahren
564483e092
new error message in case of unknown vif
2012-09-15 02:11:14 +02:00
Stefan Wahren
b55d038899
fixed typo in vif list
2012-09-15 02:06:08 +02:00
Stefan Wahren
1a538e73aa
New parameter for mbus_send_ping_frame to purge response
2012-09-01 22:51:44 +02:00
Stefan Wahren
d2608d5de7
add allocation error handling
2012-09-01 22:14:21 +02:00
Stefan Wahren
5467679f66
Reset retry counter after valid frame to be conform with M-Bus
...
documentation
2012-07-19 21:08:07 +02:00
Stefan Wahren
08a4c55443
- Initialize maximum retry counter to 3 for serial and tcp connections
...
- Retransmit request frame (just for mbus_sendrecv_request) in case of
timeout or invalid response
2012-07-14 16:22:25 +02:00