cocluto/Ipmi/Sensor.py

24 lines
656 B
Python

class Sensor:
def __init__(self, sensorName):
self.m_name = sensorName
self.m_isValid = True # false if this sensor is not actually present on the target machine
return
def dump(self):
print self.m_name
class FanSensor(Sensor):
def __init__(self, sensorName):
Sensor.__init__(self, sensorName)
def dump(self):
print 'Fan \'', self.m_name, '\' rpm=',self.m_rpms
def typeName(self):
return 'Fan'
class TemperatureSensor(Sensor):
def __init__(self, sensorName):
Sensor.__init__(self, sensorName)
def dump(self):
print 'Temperature \'', self.m_name, '\' temperature=',self.m_temperature
def typeName(self):
return 'Temperature'