Module SCA_ISensor

Source Code for Module SCA_ISensor

 1  # $Id: SCA_ISensor.py 2610 2004-05-31 13:06:04Z kester $ 
 2  # Documentation for SCA_ISensor 
 3  from SCA_ILogicBrick import * 
 4   
5 -class SCA_ISensor(SCA_ILogicBrick):
6 """ 7 Base class for all sensor logic bricks. 8 """ 9
10 - def isPositive():
11 """ 12 True if this sensor brick has been activated. 13 """
14
16 """ 17 True if the sensor is in positive pulse mode. 18 """
19 - def setUsePosPulseMode(pulse):
20 """ 21 Sets positive pulse mode. 22 23 @type pulse: boolean 24 @param pulse: If True, will activate positive pulse mode for this sensor. 25 """
26 - def getFrequency():
27 """ 28 The frequency for pulse mode sensors. 29 30 @rtype: integer 31 @return: the pulse frequency in 1/50 sec. 32 """
33 - def setFrequency(freq):
34 """ 35 Sets the frequency for pulse mode sensors. 36 37 @type freq: integer 38 @return: the pulse frequency in 1/50 sec. 39 """
41 """ 42 True if the sensor is in negative pulse mode. 43 """
44 - def setUseNegPulseMode(pulse):
45 """ 46 Sets negative pulse mode. 47 48 @type pulse: boolean 49 @param pulse: If True, will activate negative pulse mode for this sensor. 50 """
51 - def getInvert():
52 """ 53 True if this sensor activates on negative events. 54 """
55 - def setInvert(invert):
56 """ 57 Sets if this sensor activates on positive or negative events. 58 59 @type invert: boolean 60 @param invert: true if activates on negative events; false if activates on positive events. 61 """
62