Skip to content

Commit bf3badb

Browse files
committed
Pull original PR rscada#20, rscada#23, rscada#26 part rscada#29
1 parent 1523e82 commit bf3badb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mbus/MBusFrame.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ctypes import Structure, c_uint8, c_long, c_size_t, POINTER
1+
from ctypes import Structure, c_uint8, c_int, c_long, c_size_t, POINTER
22

33
c_time_t = c_long
44

@@ -7,18 +7,18 @@ def __str__(self):
77
return "MBusFrame: XXX"
88

99
MBusFrame._fields_ = [
10-
("start1", c_uint8 * 16), # MBusFrameFixed
10+
("start1", c_uint8), # MBusFrameFixed
1111
("length1", c_uint8),
1212
("length2", c_uint8),
1313
("start2", c_uint8),
1414
("control", c_uint8),
1515
("address", c_uint8),
16-
("control_infomation", c_uint8),
16+
("control_information", c_uint8),
1717
("checksum", c_uint8),
1818
("stop", c_uint8),
1919
("data", c_uint8 * 252),
2020
("data_size", c_size_t),
21-
("stop", c_uint8),
21+
("type", c_int),
2222
("timestamp", c_time_t),
2323
("next", POINTER(MBusFrame))
2424
]

mbus/MBusLowLevel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def __init__(self, libpath=None):
358358
self.data_record_append.restypes = None
359359

360360
self.frame_new = lib.mbus_frame_new
361-
self.frame_new.argtypes = []
361+
self.frame_new.argtypes = [c_int]
362362
self.frame_new.restype = mbus_frame_p
363363

364364
self.frame_free = lib.mbus_frame_free

0 commit comments

Comments
 (0)