def addInterface(self, iTag, iType, clsName, addr):
        """ Add an interface to the ROS environment inside the container.

            @param iTag:        Tag which is used to identify the interface in
                                subsequent requests.
            @type  iTag:        str

            @param iType:       Type of the interface. The type has to be of
                                the form:
                                    {prefix}Interface
                                whit valid prefixes:
                                    ServiceClient, ServiceProvider,
                                    Publisher, Subscriber
            @type  iType:       str

            @param clsName:     Message type/Service type consisting of the
                                package and the name of the message/service,
                                i.e. 'std_msgs/Int32'.
            @type  clsName:     str

            @param addr:        ROS name/address which the interface should
                                use.
            @type  addr:        str
        """
        try:
            validateName(iTag)
        except IllegalName:
            raise InvalidRequest('Interface tag is not a valid.')

        if iTag in self._interfaces:
            raise InvalidRequest("Can not use the same interface tag '{0}' "
                                 'in the same container twice.'.format(iTag))

        try:
            iType = Types.encode(iType)
        except __HOLE__:
            raise InvalidRequest('Interface type is invalid (Unknown prefix).')

        interface = self._obj.createInterface(iType, clsName, addr)
        interface = Interface(interface, iType, clsName)
        self._interfaces[iTag] = interface
        interface.notifyOnDeath(self._interfaceDied)
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/core/wrapper.py/Container.addInterface