diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-28 22:52:32 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-30 22:31:40 +0200 |
commit | 8fc13352aa730d904d0bee6db3d95c619470e0cd (patch) | |
tree | 263e477faffb4c7743195a6885844dbc421d5e2c | |
parent | e9b0d7488fb3c240fe7ac045b958b455ba54a969 (diff) |
trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUs
-rw-r--r-- | src/target/trx_toolkit/trxd_proto.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/target/trx_toolkit/trxd_proto.py b/src/target/trx_toolkit/trxd_proto.py index 7afa4840..ded03362 100644 --- a/src/target/trx_toolkit/trxd_proto.py +++ b/src/target/trx_toolkit/trxd_proto.py @@ -125,9 +125,10 @@ class PDUv1Rx(codec.Envelope): class PDUv1Tx(PDUv0Tx): # Same structure as PDUv0Tx, only the version is different - def __init__(self, *args, **kw): - PDUv0Tx.__init__(self, *args, **kw) - self.STRUCT[0]._fields[0].val = 1 + STRUCT = ( + Header(ver=1), + *PDUv0Tx.STRUCT[1:] + ) class PDUv2Rx(codec.Envelope): |