All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.onosproject.net.pi.model.PiPipelineModel Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
/*
 * Copyright 2017-present Open Networking Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.onosproject.net.pi.model;

import com.google.common.annotations.Beta;

import java.util.Collection;
import java.util.Optional;

/**
 * Model of a protocol-independent pipeline.
 */
@Beta
public interface PiPipelineModel {

    /**
     * Returns the table model associated with the given ID, if present.
     *
     * @param tableId table ID
     * @return optional table model
     */
    Optional table(PiTableId tableId);

    /**
     * Returns the collection of all table models defined by this pipeline model.
     *
     * @return collection of actions
     */
    Collection tables();

    /**
     * Returns the counter model associated with the given ID, if present.
     *
     * @param counterId counter ID
     * @return optional counter model
     */
    Optional counter(PiCounterId counterId);

    /**
     * Returns all counter models defined by this pipeline model.
     *
     * @return collection of counter models
     */
    Collection counters();

    /**
     * Returns the meter model associated with the given ID, if present.
     *
     * @param meterId meter ID
     * @return optional meter model
     */
    Optional meter(PiMeterId meterId);

    /**
     * Returns all meter models defined by this pipeline model.
     *
     * @return collection of meter models
     */
    Collection meters();

    /**
     * Returns the register model associated with the given ID, if present.
     *
     * @param registerId register ID
     * @return optional register model
     */
    Optional register(PiRegisterId registerId);

    /**
     * Returns all register models defined by this pipeline model.
     *
     * @return collection of register models
     */
    Collection registers();

    /**
     * Returns the action profile model associated with the given ID, if present.
     *
     * @param actionProfileId action profile ID
     * @return optional action profile model
     */
    Optional actionProfiles(PiActionProfileId actionProfileId);

    /**
     * Returns all action profile models defined by this pipeline model.
     *
     * @return collection of action profile models
     */
    Collection actionProfiles();

    /**
     * Returns the packet operation model of the given type, if present.
     *
     * @param type packet operation type
     * @return packet operation model
     */
    Optional packetOperationModel(PiPacketOperationType type);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy