def recv(self, s):
        """
        @summary: receive license packet from PDU layer
        @return true when license automata is finish
        """            
        licPacket = LicPacket()
        s.readType(licPacket)
        
        #end of automata
        if licPacket.bMsgtype.value == MessageType.ERROR_ALERT and licPacket.licensingMessage.dwErrorCode.value == ErrorCode.STATUS_VALID_CLIENT and licPacket.licensingMessage.dwStateTransition.value == StateTransition.ST_NO_TRANSITION:
            return True
        
        elif licPacket.bMsgtype.value == MessageType.LICENSE_REQUEST:
            self.sendClientNewLicenseRequest(licPacket.licensingMessage)
            return False
            
        elif licPacket.bMsgtype.value == MessageType.PLATFORM_CHALLENGE:
            self.sendClientChallengeResponse(licPacket.licensingMessage)
            return False
        
        #yes get a new license
        elif licPacket.bMsgtype.value == MessageType.NEW_LICENSE:
            return True
        
        else:
            raise InvalidExpectedDataException("Not a valid license packet")
def recv ( self , s ) : licPacket = LicPacket ( ) s . readType ( licPacket ) if licPacket . bMsgtype . value == MessageType . ERROR_ALERT and licPacket . licensingMessage . dwErrorCode . value == ErrorCode . STATUS_VALID_CLIENT and licPacket . licensingMessage . dwStateTransition . value == StateTransition . ST_NO_TRANSITION : return True elif licPacket . bMsgtype . value == MessageType . LICENSE_REQUEST : self . sendClientNewLicenseRequest ( licPacket . licensingMessage ) return False elif licPacket . bMsgtype . value == MessageType . PLATFORM_CHALLENGE : self . sendClientChallengeResponse ( licPacket . licensingMessage ) return False elif licPacket . bMsgtype . value == MessageType . NEW_LICENSE : return True else : raise InvalidExpectedDataException ( "Not a valid license packet" )
@summary: receive license packet from PDU layer
        @return true when license automata is finish