sim/ipc/Message: convert values
This commit is contained in:
parent
e92af9de59
commit
89643bc434
|
@ -17,7 +17,7 @@ def gen():
|
||||||
r = TRead(i)
|
r = TRead(i)
|
||||||
yield r
|
yield r
|
||||||
ds.store = r.data
|
ds.store = r.data
|
||||||
yield Token("result", {"r": int(ds)})
|
yield Token("result", {"r": ds})
|
||||||
|
|
||||||
class Dumper(SimActor):
|
class Dumper(SimActor):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -14,8 +14,7 @@ class Int32(int):
|
||||||
class Message:
|
class Message:
|
||||||
def __init__(self, *pvalues):
|
def __init__(self, *pvalues):
|
||||||
for parameter, value in zip(self.parameters, pvalues):
|
for parameter, value in zip(self.parameters, pvalues):
|
||||||
assert(isinstance(value, parameter[0]))
|
setattr(self, parameter[1], parameter[0](value))
|
||||||
setattr(self, parameter[1], value)
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
p = []
|
p = []
|
||||||
|
|
Loading…
Reference in New Issue