From 06f4ef810c7089c8b994f438b90b293762133bdd Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 14 Dec 2021 19:40:03 +0100 Subject: Implement network_value to show BER --- src/gr-fadingui/python/ber.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gr-fadingui/python') diff --git a/src/gr-fadingui/python/ber.py b/src/gr-fadingui/python/ber.py index 1c5debf..664780f 100644 --- a/src/gr-fadingui/python/ber.py +++ b/src/gr-fadingui/python/ber.py @@ -43,7 +43,7 @@ class ber(gr.sync_block): self.vgl=vgl self.vlen=vlen - self.ber_samples = RingBuffer(capacity=2000, dtype=int) + self.ber_samples = RingBuffer(capacity=100, dtype=int) self.ber_samples.extend(np.zeros(self.ber_samples.maxlen)) # Create a socket and parse remote machine url @@ -84,8 +84,6 @@ class ber(gr.sync_block): log.debug(f"Length: {len(inp)}") # log.debug(f"Inp_vector:{inp}") - - for i in inp: i = np.array(i, dtype=np.uint8) v = np.array(self.vgl, dtype=np.uint8) ^ i @@ -102,11 +100,7 @@ class ber(gr.sync_block): ber_max, ber_min, ber_avg = self.ber_stats() log.debug(f"Statistics: {ber_max}, {ber_min}, {ber_avg}") - #self.send(self.encode(ber_max, ber_min, ber_avg)) - self.send(self.encode(trueber)) - self.send(self.encode(ber_max)) - self.send(self.encode(ber_min)) - self.send(self.encode(ber_avg)) + self.send(self.encode([trueber, ber_max, ber_avg])) return len(inp) #return len(input_items[0]) -- cgit v1.2.1