FrankWang | ea70de3 | 2018-05-08 15:41:25 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.net.pi.model; |
| 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | |
| 21 | /** |
| 22 | * Representation of data that can be used for runtime operations of a protocol-independent pipeline. |
| 23 | */ |
| 24 | @Beta |
| 25 | public interface PiData { |
| 26 | /** |
| 27 | * Types of data in a protocol-independent pipeline. |
| 28 | */ |
| 29 | enum Type { |
| 30 | /** |
| 31 | * Bit String. |
| 32 | */ |
| 33 | BITSTRING, |
| 34 | |
| 35 | /** |
| 36 | * Bool. |
| 37 | */ |
| 38 | BOOL, |
| 39 | |
| 40 | /** |
| 41 | * Tuple. |
| 42 | */ |
| 43 | TUPLE, |
| 44 | |
| 45 | /** |
| 46 | * Struct. |
| 47 | */ |
| 48 | STRUCT, |
| 49 | |
| 50 | /** |
| 51 | * Header. |
| 52 | */ |
| 53 | HEADER, |
| 54 | |
| 55 | /** |
| 56 | * Header Stack. |
| 57 | */ |
| 58 | HEADERSTACK, |
| 59 | |
| 60 | /** |
| 61 | * Header Union. |
| 62 | */ |
| 63 | HEADERUNION, |
| 64 | |
| 65 | /** |
| 66 | * Header Union Stack. |
| 67 | */ |
| 68 | HEADERUNIONSTACK, |
| 69 | |
| 70 | /** |
| 71 | * Enum String. |
| 72 | */ |
| 73 | ENUMSTRING, |
| 74 | |
| 75 | /** |
| 76 | * Error String. |
| 77 | */ |
| 78 | ERRORSTRING |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Returns the type of this protocol-independent data. |
| 83 | * @return the type of this instance |
| 84 | */ |
| 85 | Type type(); |
| 86 | } |