public class BandwidthExistingLSP extends Bandwidth
Represents a PCEP BANDWIDTH object, as defined in RFC 5440.
From RFC 5440 Section 7.7. BANDWIDTH Object:
The BANDWIDTH object is used to specify the requested bandwidth for a TE LSP. The notion of bandwidth is similar to the one used for RSVP signaling in [RFC2205], [RFC3209], and [RFC3473].
If the requested bandwidth is equal to 0, the BANDWIDTH object is optional. Conversely, if the requested bandwidth is not equal to 0, the PCReq message MUST contain a BANDWIDTH object.
In the case of the reoptimization of a TE LSP, the bandwidth of the existing TE LSP MUST also be included in addition to the requested bandwidth if and only if the two values differ. Consequently, two Object-Type values are defined that refer to the requested bandwidth and the bandwidth of the TE LSP for which a reoptimization is being performed.
The BANDWIDTH object may be carried within PCReq and PCRep messages. BANDWIDTH Object-Class is 5.
Two Object-Type values are defined for the BANDWIDTH object:
o Requested bandwidth: BANDWIDTH Object-Type is 1.
o Bandwidth of an existing TE LSP for which a reoptimization is
requested. BANDWIDTH Object-Type is 2.
The format of the BANDWIDTH object body is as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bandwidth |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 14: BANDWIDTH Object Body Format
Bandwidth (32 bits): The requested bandwidth is encoded in 32 bits in IEEE floating point format (see [IEEE.754.1985]), expressed in bytes per second. Refer to Section 3.1.2 of [RFC3471] for a table of commonly used values.
The BANDWIDTH object body has a fixed length of 4 bytes.
| Modifier and Type | Field and Description |
|---|---|
float |
bw
Bandwidth (32 bits): The requested bandwidth is encoded in 32 bits
in IEEE floating point format (see [IEEE.754.1985]), expressed in
bytes per second.
|
Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res| Constructor and Description |
|---|
BandwidthExistingLSP()
Constructs a Bandwidth object
|
BandwidthExistingLSP(byte[] bytes,
int offset)
Constructs a PCEP object from a sequence of bytes
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode()
Decodes the BANDWDITH object
|
Bandwidth |
duplicate() |
void |
encode()
Encodes the PCEP BANDWIDTH object
|
boolean |
equals(Object obj) |
float |
getBw()
Gets the requested bandwidth
|
int |
hashCode() |
void |
setBw(float bw)
Sets the requested bandwidth
|
String |
toString() |
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObjectpublic float bw
public BandwidthExistingLSP()
public BandwidthExistingLSP(byte[] bytes,
int offset)
throws MalformedPCEPObjectException
bytes - Sequence of bytes where the object is presentoffset - Position at which the object startsMalformedPCEPObjectExceptionpublic void encode()
encode in interface PCEPElementencode in class PCEPObjectpublic void decode()
throws MalformedPCEPObjectException
decode in class PCEPObjectMalformedPCEPObjectExceptionpublic float getBw()
public void setBw(float bw)
bw - Requested Bandwidthpublic int hashCode()
hashCode in class PCEPObjectpublic boolean equals(Object obj)
equals in class PCEPObjectCopyright © 2016. All rights reserved.