From a943f00205b416b8cddd43d65d87667a784ba341 Mon Sep 17 00:00:00 2001 From: Martin Teichmann <martin.teichmann@xfel.eu> Date: Thu, 18 Feb 2021 19:03:51 +0000 Subject: [PATCH] add a Dummy device useful for testing stuff --- ebpfcat/devices.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ebpfcat/devices.py b/ebpfcat/devices.py index 8d2c3cf..3841707 100644 --- a/ebpfcat/devices.py +++ b/ebpfcat/devices.py @@ -114,3 +114,18 @@ class Counter(Device): def program(self): self.count += 1 + + def update(self): + self.count += 1 + + +class Dummy(Device): + """A placeholder device assuring a terminal is initialized""" + def __init__(self, terminals): + self.terminals = terminals + + def get_terminals(self): + return set(self.terminals) + + def program(self): + pass -- GitLab