def METHOD_NAME(self, msg):
    # is this a power msg from a PM42?
    if ((msg.getElement(0) == 0xD0) and ((msg.getElement(1) & 0x60) == 0x60)) :
        pCmd = (msg.getElement(3) & 0xF0)    # PM42 msg type
        # is this a short circuit / autoreverse message?
        if ((pCmd == 0x30) or (pCmd == 0x10)) :
            pAdr = (msg.getElement(1)& 0x1) * 128 + (msg.getElement(2)& 0x7F)+1   # PM42 address
            pAdrHex = ("0"+java.lang.Integer.toHexString(pAdr))[-2:]              # make addr a 2 char string
            pAdrHex = pAdrHex.upper()                                             # Make sure the hex character, if any, is upper case
            pSen = "ISPM_"+pAdrHex                                                # internal sensor prefix
            #bit mapped codes: bits 0-3 correspond to PM42 sections 1-4 
            mode = msg.getElement(3)    # autoreverse if 1, short circuit if 0
            state = msg.getElement(4)    # ACT if 1, OK if 0
            s = sensors.provideSensor(pSen+"1")
            if ((mode & 0x01) == 0 and (state & 0x01) != 0) : s.state = ACTIVE
            else : s.state = INACTIVE
            s = sensors.provideSensor(pSen+"2")
            if ((mode & 0x02) == 0 and (state & 0x02) != 0) : s.state = ACTIVE
            else : s.state = INACTIVE
            s = sensors.provideSensor(pSen+"3")
            if ((mode & 0x04) == 0 and (state & 0x04) != 0) : s.state = ACTIVE
            else : s.state = INACTIVE
            s = sensors.provideSensor(pSen+"4")
            if ((mode & 0x08) == 0 and (state & 0x08) != 0) : s.state= ACTIVE
            else : s.state = INACTIVE
        return