247108dac531bed2819c9c2ff28eaac20f83fde1
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / gates / IGateID.java
1 /*
2  * Copyright (c) 2015 Cable Television Laboratories, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.pcmm.gates;
10
11 import org.pcmm.base.IPCMMBaseObject;
12
13 /**
14  * GateID is the handle for the Gate. The GateID is assigned by the CMTS and is used by the Application Manager,
15  * Policy Server, and client to reference the Gate.
16  *
17  * From the Packetcable Multimedia specification section 6.1.1
18  *
19  * A GateID is an identifier that is locally allocated by the CMTS where the Gate resides. A GateID MUST be
20  * associated with only one Gate. Whereas the PacketCable 1.x DQoS Gate Control model generally assumed a pair of
21  * unidirectional Gates (one upstream and one downstream) per GateID in support of a typical two-way voice session,
22  * here the Gate/GateID relationship is explicitly one-to-one, so that it is easier to support a wide range of Multimedia
23  * services.
24  *
25  * When the Application Manager issues a Gate-Set request, this triggers the Policy Server to issue a Gate-Set message
26  * to the CMTS. When the CMTS responds with an acknowledgment containing the GateID, the Policy Server
27  * forwards this response including the GateID back to the Application Manager. Note that since there can be a manyto-
28  * many relationship between a PS and CMTS, the GateID assigned by one CMTS cannot be guaranteed to be
29  * unique across the network, so the PSs may use the AMID of the AM along with the SubscriberID and GateID in
30  * order to uniquely identify the Gate.
31  *
32  * An algorithm that may be used to assign values of GateIDs is as follows. Partition the 32-bit word into two parts, an
33  * index part, and a random part. The index part identifies the Gate by indexing into a small table, while the random
34  * part provides some level of obscurity to the value. Regardless of the algorithm chosen, the CMTS SHOULD attempt
35  * to minimize the possibility of GateID ambiguities by ensuring that no GateID gets reused within three minutes of its
36  * prior closure or deletion. For the algorithm suggested this could be accomplished by simply incrementing the index
37  * part for each consecutively assigned GateID, wrapping around to zero when the maximum integer value of the index
38  * part is reached.
39  */
40 public interface IGateID extends IPCMMBaseObject {
41
42     /**
43      * The S-Type for Gate IDs
44      */
45     byte STYPE = 1;
46
47     /**
48      * Returns the gate ID value
49      * @return - the ID
50      */
51     int getGateID();
52
53 }