2012-05-11 14:12:41 +02:00
|
|
|
class Node():
|
|
|
|
def __init__(self):
|
|
|
|
self.name = ""
|
2012-06-04 17:33:23 +02:00
|
|
|
self.id = ""
|
2012-05-11 14:12:41 +02:00
|
|
|
self.macs = set()
|
|
|
|
self.group = 0
|
|
|
|
self.online = False
|
2012-05-12 14:57:57 +02:00
|
|
|
self.gps = None
|
2012-05-11 14:12:41 +02:00
|
|
|
# groups:
|
|
|
|
# 0 normal node
|
|
|
|
# 1 aftermath
|
|
|
|
# 2 gateways
|
|
|
|
# 3 TT
|
|
|
|
|
|
|
|
def add_mac(self, mac):
|
2012-05-12 16:44:27 +02:00
|
|
|
self.macs.add(mac.lower())
|
2012-05-11 14:12:41 +02:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return self.macs.__repr__()
|
|
|
|
|
|
|
|
|