def _encode(self, registeredDelivery):
        receiptName = str(registeredDelivery.receipt)
        smeOriginatedAckNames = [str(a) for a in registeredDelivery.smeOriginatedAcks]

        if receiptName not in constants.registered_delivery_receipt_name_map:
            raise ValueError("Unknown registered_delivery receipt name %s" % receiptName)
        for ackName in smeOriginatedAckNames:
            if ackName not in constants.registered_delivery_sme_originated_acks_name_map:
                raise ValueError("Unknown registered_delivery SME orginated ack name %s" % ackName)

        receiptVal = constants.registered_delivery_receipt_name_map[receiptName]
        smeOriginatedAckVals = [constants.registered_delivery_sme_originated_acks_name_map[ackName] for ackName in smeOriginatedAckNames]
        intermediateNotificationVal = 0
        if registeredDelivery.intermediateNotification:
            intermediateNotificationVal = self.intermediateNotificationMask

        intVal = receiptVal | intermediateNotificationVal
        for aVal in smeOriginatedAckVals:
            intVal |= aVal

        return Int1Encoder().encode(intVal)
dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/smpp/pdu/pdu_encoding.py/RegisteredDeliveryEncoder._encode/original