def __init__(self): """ Initialize our class """ # Ensure that this class is never initialized if self.__class__ == CPUSensor: raise ("Interface initialized directly!") Sensor.__init__(self)
def __init__(self): """ Initialize our class """ # Ensure that this class is never initialized if self.__class__ == ControlSensor: raise ("Interface initialized directly!") Sensor.__init__(self)
def __init__(self,interface,name=None): """ Initialize our sensor, which in this case is setting the interface and any services/configurations on that interface. """ self.interface = interface self.packet_cap = None if name is None: self.name = interface+"-NetworkSensor" else: self.name = name Sensor.__init__(self)
def __init__(self, interface, name=None): """ Initialize our sensor, which in this case is setting the interface and any services/configurations on that interface. """ self.interface = interface self.packet_cap = None if name is None: self.name = interface + "-NetworkSensor" else: self.name = name Sensor.__init__(self)