equal
deleted
inserted
replaced
53 def _ttime(): return (IEC_TIME, |
53 def _ttime(): return (IEC_TIME, |
54 lambda x: td(0, x.s, x.ns/1000), |
54 lambda x: td(0, x.s, x.ns/1000), |
55 lambda t, x: t(x.days * 24 * 3600 + x.seconds, x.microseconds*1000)) |
55 lambda t, x: t(x.days * 24 * 3600 + x.seconds, x.microseconds*1000)) |
56 |
56 |
57 SameEndianessTypeTranslator = { |
57 SameEndianessTypeTranslator = { |
58 "BOOL": _t(c_uint8, lambda x: x.value!=0), |
58 "BOOL": _t(c_uint8, lambda x: x.value != 0), |
59 "STEP": _t(c_uint8), |
59 "STEP": _t(c_uint8), |
60 "TRANSITION": _t(c_uint8), |
60 "TRANSITION": _t(c_uint8), |
61 "ACTION": _t(c_uint8), |
61 "ACTION": _t(c_uint8), |
62 "SINT": _t(c_int8), |
62 "SINT": _t(c_int8), |
63 "USINT": _t(c_uint8), |
63 "USINT": _t(c_uint8), |
84 |
84 |
85 SwapedEndianessTypeTranslator = { |
85 SwapedEndianessTypeTranslator = { |
86 # TODO |
86 # TODO |
87 } |
87 } |
88 |
88 |
89 TypeTranslator=SameEndianessTypeTranslator |
89 TypeTranslator = SameEndianessTypeTranslator |
90 |
90 |
91 # Construct debugger natively supported types |
91 # Construct debugger natively supported types |
92 DebugTypesSize = dict([(key, sizeof(t)) for key, (t, p, u) in SameEndianessTypeTranslator.iteritems() if t is not None]) |
92 DebugTypesSize = dict([(key, sizeof(t)) for key, (t, p, u) in SameEndianessTypeTranslator.iteritems() if t is not None]) |
93 |
93 |
94 |
94 |