Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 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.pcepio.protocol; |
| 18 | |
| 19 | /** |
| 20 | * Enum to Provide the Different types of PCEP messages. |
| 21 | */ |
| 22 | public enum PcepType { |
| 23 | |
| 24 | NONE(0), OPEN(1), KEEP_ALIVE(2), PATH_COMPUTATION_REQUEST(3), PATH_COMPUTATION_REPLY(4), |
Mahesh Poojary S | f1bbd36 | 2016-02-25 18:19:59 +0530 | [diff] [blame] | 25 | NOTIFICATION(5), ERROR(6), CLOSE(7), REPORT(10), UPDATE(11), INITIATE(12), |
| 26 | LS_REPORT(224), LABEL_RANGE_RESERV(225), LABEL_UPDATE(226), MAX(227), END(228); |
Phaneendra Manda | 1c0061d | 2015-08-06 12:29:38 +0530 | [diff] [blame] | 27 | |
| 28 | int iValue; |
| 29 | |
| 30 | /** |
| 31 | * Assign iValue with the value iVal as the types of PCEP message. |
| 32 | * |
| 33 | * @param iVal type of pcep message |
| 34 | */ |
| 35 | PcepType(int iVal) { |
| 36 | |
| 37 | iValue = iVal; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Returns iValue as type of PCEP message. |
| 42 | * |
| 43 | * @return iValue type of pcep message |
| 44 | */ |
| 45 | public byte getType() { |
| 46 | |
| 47 | return (byte) iValue; |
| 48 | } |
| 49 | } |