Mercurial > code > home > repos > light9
view flax/Ports.py @ 1493:4294ed82ee16
move collector_loadtest and arrange for collector to be able to run the test itself, but that last part isn't working. you can run collector and collector_loadtest in two shells, though
Ignore-this: 9f32a0cb0ba3c1b29ccbe7330ed15bf4
author | drewp@bigasterisk.com |
---|---|
date | Mon, 13 Jun 2016 20:04:11 +0000 |
parents | 45b12307c695 |
children |
line wrap: on
line source
# super rough code class AbstractPort: def __init__(self): pass def put_data(self, value): pass def get_data(self): pass class Port(AbstractPort): "Connects from a node to exactly one node." def __init__(self, value=None): AbstractPort.__init__(self) self.value = value def put_data(self, value): self.value = value def get_data(self): return self.value class MultiPort(AbstractPort): "Connects from a node to any number of nodes." def __init__(self, values=None): AbstractPort.__init__(self) self.values = values def put_data(self, values): self.values = values def get_data(self): return self.values