def METHOD_NAME(self,state,id,events):
    global doorCued
    global doorMoving
    global doorState
    PtDebugPrint("DoorMoving = ", doorMoving)
    if state and id==actPower.id:
        PtDebugPrint("message from GearActivated")
        for event in events:
            PtDebugPrint(event)
            if event[0] == 4:
                if event[3] == 1: # power on
                    self.SDL["haspower"] = (1,)
            elif event[3] == 0: #power off
                self.SDL["haspower"] = (0,)
            else: #unexpected value 
                PtDebugPrint("xPoweredStarTrekDoor.OnNotify:\t'%s' ERROR---got bogus msg - power = %d" % (Activate.value,self.SDL["enabled"][0]))
                return