/* Altran Technologies Proprietary This source code is the sole property of Altran Technologies. Any form of utilization of this source code in whole or in part is prohibited without written consent from Altran Technologies File Name : BitmapLabelSet.java Principal Author : Nimmi Subsystem Name : Module Name : Pcepio Date of First Release : 15/5/2019 Author : Nimmi Description : Change History Version : 1.0 Date(DD/MM/YYYY) : 3/4/2019 Modified by : Nimmi Description of change : Initial version */ package org.onosproject.pcepio.protocol; import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.pcepio.exceptions.PcepParseException; /** * DWDM Wavelength Label (RFC 6205). *
*
* For the case of lambda switching of DWDM, the information carried in * a wavelength label is: *
* 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * |Grid | C.S. | Identifier | n | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | m | Reserved | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ *
* (1) Grid: 3 bits *
* The value for Grid is set to 1 for the ITU-T DWDM grid as defined in * [G.694.1]. *
* +----------+---------+ * | Grid | Value | * +----------+---------+ * | Reserved | 0 | * +----------+---------+ * |ITU-T DWDM| 1 | * +----------+---------+ * |ITU-T CWDM| 2 | * +----------+---------+ * |Future use| 3 - 7 | * +----------+---------+ *
* (2) C.S. (channel spacing): 4 bits *
* DWDM channel spacing is defined as follows. *
* +----------+---------+ * |C.S. (GHz)| Value | * +----------+---------+ * | Reserved | 0 | * +----------+---------+ * | 100 | 1 | * +----------+---------+ * | 50 | 2 | * +----------+---------+ * | 25 | 3 | * +----------+---------+ * | 12.5 | 4 | * +----------+---------+ * | 6.25 | 5 | * +----------+---------+ * |Future use| 6 - 15 | * +----------+---------+ *
* (3) Identifier: 9 bits *
* The Identifier field in lambda label format is used to distinguish * different lasers (in one node) when they can transmit the same * frequency lambda. The Identifier field is a per-node assigned and * scoped value. This field MAY change on a per-hop basis. In all * cases but one, a node MAY select any value, including zero (0), for * this field. Once selected, the value MUST NOT change until the LSP * is torn down, and the value MUST be used in all LSP-related messages, * e.g., in Resv messages and label Record Route Object (RRO) * subobjects. The sole special case occurs when this label format is * used in a label Explicit Route Object (ERO) subobject. In this case, * the special value of zero (0) means that the referenced node MAY * assign any Identifier field value, including zero (0), when * establishing the corresponding LSP. When a non-zero value is * assigned to the Identifier field in a label ERO subobject, the * referenced node MUST use the assigned value for the Identifier field * in the corresponding LSP-related messages. *
* (4) n: 16 bits *
* n is a two's-complement integer to take either a positive, negative, * or zero value. This value is used to compute the frequency as shown * above. * * */ public interface DwdmWavelengthLabel { /** * The value for Grid is set to 1 for the ITU-T DWDM grid as defined in [G.694.1]. * Returns grid. * * @return grid */ int getGrid(); /** * Sets label. * * @param grid . */ void setGrid(int grid); /** * Returns Channel spacing. * * @return int */ int getChannelSpacing(); /** * Sets label. * * @param channelSpacing . */ void setChannelSpacing(int channelSpacing); /** * The Identifier field in lambda label format is used to distinguish * different lasers (in one node) when they can transmit the same * frequency lambda. */ int getIdentifier(); /** * Sets identifier. * * @param identifier */ void setIdentifier(int identifier); /** * n is a two's-complement integer to take either a positive, negative, * or zero value. This value is used to compute the frequency */ int getN(); /** * Sets N. * * @param N */ void setN(int N); /** * Returns M bit * * @return */ int getM(); /** * Sets M. * * @param M */ void setM(int M); /** * Writes the DwdmWavelengthLabel into channel buffer. * * @param bb channel buffer * @return Returns the writerIndex of this buffer * @throws PcepParseException while writing DwdmWavelengthLabel object. */ int write(ChannelBuffer bb) throws PcepParseException; /** * Builder interface with get and set functions to build PcepSwitchLayer object. */ interface Builder { /** * Builds PcepSwitchLayer Object. * * @return PcepSwitchLayer Object */ DwdmWavelengthLabel build(); /** * Returns grid * * @return grid */ int getGrid(); /** * Sets label. * * @param grid . */ Builder setGrid(int grid); /** * Returns Channel spacing * * @return int */ int getChannelSpacing(); /** * Sets label. * * @param channelSpacing . */ Builder setChannelSpacing(int channelSpacing); /** * The Identifier field in lambda label format is used to distinguish * different lasers (in one node) when they can transmit the same * frequency lambda. */ int getIdentifier(); /** * Sets identifier. * * @param identifier */ Builder setIdentifier(int identifier); /** * n is a two's-complement integer to take either a positive, negative, * or zero value. This value is used to compute the frequency */ int getN(); /** * Sets N. * * @param N */ Builder setN(int N); /** * Returns M bit. * * @return */ int getM(); /** * Sets M. * * @param M */ Builder setM(int M); } }