def readDataPDU(self, dataPDU):
        """
        @summary: read a data PDU object
        @param dataPDU: DataPDU object
        """
        if dataPDU.shareDataHeader.pduType2.value == data.PDUType2.PDUTYPE2_SET_ERROR_INFO_PDU:
            #ignore 0 error code because is not an error code
            if dataPDU.pduData.errorInfo.value == 0:
                return
            errorMessage = "Unknown code %s"%hex(dataPDU.pduData.errorInfo.value)
            if data.ErrorInfo._MESSAGES_.has_key(dataPDU.pduData.errorInfo):
                errorMessage = data.ErrorInfo._MESSAGES_[dataPDU.pduData.errorInfo] 
            log.error("INFO PDU : %s"%errorMessage)
            
        elif dataPDU.shareDataHeader.pduType2.value == data.PDUType2.PDUTYPE2_SHUTDOWN_DENIED:
            #may be an event to ask to user
            self._transport.close()
        elif dataPDU.shareDataHeader.pduType2.value == data.PDUType2.PDUTYPE2_SAVE_SESSION_INFO:
            #handle session event
            self._listener.onSessionReady()
        elif dataPDU.shareDataHeader.pduType2.value == data.PDUType2.PDUTYPE2_UPDATE:
            self.readUpdateDataPDU(dataPDU.pduData)
def readDataPDU ( self , dataPDU ) : if dataPDU . shareDataHeader . pduType2 . value == data . PDUType2 . PDUTYPE2_SET_ERROR_INFO_PDU : if dataPDU . pduData . errorInfo . value == 0 : return errorMessage = "Unknown code %s" % hex ( dataPDU . pduData . errorInfo . value ) if data . ErrorInfo . _MESSAGES_ . has_key ( dataPDU . pduData . errorInfo ) : errorMessage = data . ErrorInfo . _MESSAGES_ [ dataPDU . pduData . errorInfo ] log . error ( "INFO PDU : %s" % errorMessage ) elif dataPDU . shareDataHeader . pduType2 . value == data . PDUType2 . PDUTYPE2_SHUTDOWN_DENIED : self . _transport . close ( ) elif dataPDU . shareDataHeader . pduType2 . value == data . PDUType2 . PDUTYPE2_SAVE_SESSION_INFO : self . _listener . onSessionReady ( ) elif dataPDU . shareDataHeader . pduType2 . value == data . PDUType2 . PDUTYPE2_UPDATE : self . readUpdateDataPDU ( dataPDU . pduData )
@summary: read a data PDU object
        @param dataPDU: DataPDU object