def _decode(self, bytes):
        intVal = Int1Encoder()._decode(bytes)
        modeVal = intVal & self.modeMask
        typeVal = intVal & self.typeMask
        gsmFeaturesVal = intVal & self.gsmFeaturesMask

        if modeVal not in constants.esm_class_mode_value_map:
            raise PDUParseError("Unknown esm_class mode %s" % modeVal, pdu_types.CommandStatus.ESME_RINVESMCLASS)
        if typeVal not in constants.esm_class_type_value_map:
            raise PDUParseError("Unknown esm_class type %s" % typeVal, pdu_types.CommandStatus.ESME_RINVESMCLASS)

        modeName = constants.esm_class_mode_value_map[modeVal]
        typeName = constants.esm_class_type_value_map[typeVal]
        gsmFeatureNames = [constants.esm_class_gsm_features_value_map[fVal] for fVal in constants.esm_class_gsm_features_value_map.keys() if fVal & gsmFeaturesVal]

        mode = getattr(pdu_types.EsmClassMode, modeName)
        type = getattr(pdu_types.EsmClassType, typeName)
        gsmFeatures = [getattr(pdu_types.EsmClassGsmFeatures, fName) for fName in gsmFeatureNames]

        return pdu_types.EsmClass(mode, type, gsmFeatures)
dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/smpp/pdu/pdu_encoding.py/EsmClassEncoder._decode/original