Interface PiPipeconfService

    • Method Detail

      • register

        void register​(PiPipeconf pipeconf)
               throws IllegalStateException
        Registers the given pipeconf making it available to other subsystems.
        Parameters:
        pipeconf - a pipeconf
        Throws:
        IllegalStateException - if the same pipeconf identifier is already registered.
      • unregister

        void unregister​(PiPipeconfId pipeconfId)
                 throws IllegalStateException
        Unregisters the given pipeconf. Once unregistered, other subsystems will not be able to access the pipeconf content.
        Parameters:
        pipeconfId - a pipeconfId
        Throws:
        IllegalStateException - if the same pipeconf identifier is already registered.
      • getPipeconfs

        Iterable<PiPipeconf> getPipeconfs()
        Returns all pipeconfs registered.
        Returns:
        a collection of pipeconfs
      • getPipeconf

        Optional<PiPipeconf> getPipeconf​(PiPipeconfId id)
        Returns the pipeconf instance associated with the given identifier, if present. If not present, it means that no pipeconf with such identifier has been registered so far.
        Parameters:
        id - a pipeconf identifier
        Returns:
        an optional pipeconf
      • getPipeconf

        Optional<PiPipeconf> getPipeconf​(DeviceId deviceId)
        Returns the pipeconf instance associated with the given device, if present. If not present, it means no pipeconf has been associated with that device so far.
        Parameters:
        deviceId - a device identifier
        Returns:
        an optional pipeconf
      • bindToDevice

        void bindToDevice​(PiPipeconfId pipeconfId,
                          DeviceId deviceId)
        Signals that the given pipeconf is associated to the given infrastructure device. As a result of this method, the pipeconf for the given device can be later retrieved using ofDevice(DeviceId)
        Parameters:
        pipeconfId - a pipeconf identifier
        deviceId - a device identifier
      • getMergedDriver

        String getMergedDriver​(DeviceId deviceId,
                               PiPipeconfId pipeconfId)
        Returns the name of a driver that is equivalent to the base driver of the given device plus all the pipeline-specific behaviors exposed by the given pipeconf (previously registered using register(PiPipeconf)). If such driver does not exist, this method creates one and registers is with all necessary ONOS subsystems, such that the returned name can be used to retrieve the driver instance using DriverResolver.getDriver(String).

        This method needs to be called on all nodes of the cluster that wants to use such merged driver.

        Returns null if such merged driver cannot be created.

        Parameters:
        deviceId - a device identifier
        pipeconfId - a pipeconf identifier
        Returns:
        driver name or null.
      • ofDevice

        @Deprecated
        Optional<PiPipeconfId> ofDevice​(DeviceId deviceId)
        Deprecated.
        in ONOS 2.1 use getPipeconf(DeviceId) instead
        Returns the pipeconf identifier currently associated with the given device identifier, if present. If not present, it means no pipeconf has been associated with that device so far.
        Parameters:
        deviceId - device identifier
        Returns:
        an optional pipeconf identifier