2 * Copyright (c) 2015 Cable Television Laboratories, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.pcmm.gates;
11 import org.pcmm.base.IPCMMBaseObject;
14 * The aPacketCable Error object contains information on the type of error that has occurred. The error is generated in
15 * response to a Gate Control command and is contained in Gate-Set-Err, Gate-Info-Err and Gate-Delete-Err messages.
17 public interface IPCMMError extends IPCMMBaseObject {
22 * Returns the error code
23 * @return - not null or NA
25 ErrorCode getErrorCode();
28 * Returns the error sub-code
29 * @return - not null (mostly will be NA)
31 ErrorCode getErrorSubcode();
34 * Returns the error's description
37 String getDescription();
40 * The supported PCMM error codes with description.
44 INSUFF_RES((short) 1, "Insufficient Resources"),
45 UNK_GATE_ID((short) 2, "Unknown GateID"),
46 MISSING_REQ_OBJ((short) 6, "Missing Required Object"),
47 INVALID_OBJ((short) 7, "Invalid Object"),
48 VOL_USG_LMT((short) 8, "Volume Based Usage Limit Exceeded"),
49 TIME_USG_LMT((short) 9, "Time Based Usage Limit Exceeded"),
50 SESSN_CLASS_LMT((short) 10, "Session Class Limit Exceeded"),
51 UNDEF_SCN_NAME((short) 11, "Undefined Service Class Name"),
52 INCOMPAT_ENV((short) 12, "Incompatible Envelope"),
53 INVALID_SUB_ID((short) 13, "Invalid SubscriberID"),
54 UNAUTH_AMID((short) 14, "Unauthorized AMID"),
55 NUM_CLASSIFIERS((short) 15, "Number of Classifiers Not Supported"),
56 POLICY_EXCEPTION((short) 16, "Policy Exception"),
57 INVALID_FIELD((short) 17, "Invalid Field Value in Object"),
58 TRANSPORT_ERROR((short) 18, "Transport Error"),
59 UNK_GATE_CMD((short) 19, "Unknown Gate Command"),
60 DOCSIS_1_CM((short) 20, "DOCSIS 1.0 CM"),
61 NUM_CM_SID((short) 21, "Number of SIDs exceeded in CM"),
62 NUM_CMTS_SID((short) 22, "Number of SIDs exceeded in CMTS"),
63 UNAUTH_PSID((short) 23, "Unauthorized PSID"),
64 NO_STATE_PDP((short) 24, "No State for PDP"),
65 UNSUP_SYNC_TYPE((short) 25, "Unsupported Synch Type"),
66 STATE_INCMPL((short) 26, "State Data Incomplete"),
67 UP_DROP_UNSUPPORT((short) 27, "Upstream Drop Unsupported"),
68 MULTI_GATE_ERR((short) 28, "Multicast Gate Error"),
69 MULTI_VOL_LIMIT((short) 29, "Multicast Volume Limit Unsupported"),
70 MULTI_UNCOMMITTED((short) 30, "Uncommitted Multicast Not Supported"),
71 MULTI_GATE_MOD((short) 31, "Multicast Gate Modification Not Supported"),
72 MULTI_UP_ERR((short) 32, "Upstream Multicast Not Supported"),
73 MULTI_GATE_INCOMPAT((short) 33, "Multicast GateSpec incompatibility"),
74 MULTI_QOS_ERR((short) 34, "Multicast QoS Error"),
75 MULTI_DN_RESEQ((short) 35, "Multicast Downstream Resequencing mismatch"),
76 OTHER_UNSPECIFIED((short) 127, "Other, Unspecified Error");
78 private final short code;
79 private final String description;
81 ErrorCode(short code, String description) {
83 this.description = description;
86 public String getDescription() {
90 public short getCode() {
94 public static ErrorCode valueOf(final short index) {
103 return MISSING_REQ_OBJ;
111 return SESSN_CLASS_LMT;
113 return UNDEF_SCN_NAME;
117 return INVALID_SUB_ID;
121 return NUM_CLASSIFIERS;
123 return POLICY_EXCEPTION;
125 return INVALID_FIELD;
127 return TRANSPORT_ERROR;
141 return UNSUP_SYNC_TYPE;
145 return UP_DROP_UNSUPPORT;
147 return MULTI_GATE_ERR;
149 return MULTI_VOL_LIMIT;
151 return MULTI_UNCOMMITTED;
153 return MULTI_GATE_MOD;
157 return MULTI_GATE_INCOMPAT;
159 return MULTI_QOS_ERR;
161 return MULTI_DN_RESEQ;
163 return OTHER_UNSPECIFIED;