summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-01-27 21:11:46 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-01-29 04:19:01 +0700
commit263ccef268c45a122d9d35b217babd772c65ccb2 (patch)
tree8b4a0e12eba045d5049126deb77c23849c8ae54e
parentb84699096a3fc40717b792ddf51b678ee7503d91 (diff)
fake_trx/burst_gen.py: don't store RandBurstGen
No need to keep it as a class member. Change-Id: I5bf5846c2b8fa1211cf5150545b9d001c17fa0eb
-rwxr-xr-xsrc/target/fake_trx/burst_gen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/target/fake_trx/burst_gen.py b/src/target/fake_trx/burst_gen.py
index 66d8e89e..04b7f477 100755
--- a/src/target/fake_trx/burst_gen.py
+++ b/src/target/fake_trx/burst_gen.py
@@ -68,7 +68,7 @@ class Application:
self.base_port + 102, self.base_port + 2)
# Init random burst generator
- self.gen = RandBurstGen()
+ burst_gen = RandBurstGen()
# Generate a random frame number or use provided one
if self.fn is None:
@@ -80,13 +80,13 @@ class Application:
for i in range(self.burst_count):
# Generate a random burst
if self.burst_type == "NB":
- buf = self.gen.gen_nb()
+ buf = burst_gen.gen_nb()
elif self.burst_type == "FB":
- buf = self.gen.gen_fb()
+ buf = burst_gen.gen_fb()
elif self.burst_type == "SB":
- buf = self.gen.gen_sb()
+ buf = burst_gen.gen_sb()
elif self.burst_type == "AB":
- buf = self.gen.gen_ab()
+ buf = burst_gen.gen_ab()
print("[i] Sending %d/%d %s burst (fn=%u) to %s..."
% (i + 1, self.burst_count, self.burst_type,