public class LoadBalancing extends PCEPObject
Represents a PCEP Load Balancing Object. From RFC 5440
From RFC 5440 7.16. LOAD-BALANCING Object
There are situations where no TE LSP with a bandwidth of X could be found by a PCE although such a bandwidth requirement could be satisfied by a set of TE LSPs such that the sum of their bandwidths is equal to X. Thus, it might be useful for a PCC to request a set of TE LSPs so that the sum of their bandwidth is equal to X Mbit/s, with potentially some constraints on the number of TE LSPs and the minimum bandwidth of each of these TE LSPs. Such a request is made by inserting a LOAD-BALANCING object in a PCReq message sent to a PCE. The LOAD-BALANCING object is optional. LOAD-BALANCING Object-Class is 14. LOAD-BALANCING Object-Type is 1. The format of the LOAD-BALANCING 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Flags | Max-LSP | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Min-Bandwidth | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 21: LOAD-BALANCING Object Body Format Reserved (16 bits): This field MUST be set to zero on transmission and MUST be ignored on receipt. Flags (8 bits): No flag is currently defined. The Flags field MUST be set to zero on transmission and MUST be ignored on receipt. Max-LSP (8 bits): maximum number of TE LSPs in the set. Min-Bandwidth (32 bits): Specifies the minimum bandwidth of each element of the set of TE LSPs. The bandwidth is encoded in 32 bits in IEEE floating point format (see [IEEE.754.1985]), expressed in bytes per second. The LOAD-BALANCING object body has a fixed length of 8 bytes. If a PCC requests the computation of a set of TE LSPs so that the sum of their bandwidth is X, the maximum number of TE LSPs is N, and each TE LSP must at least have a bandwidth of B, it inserts a BANDWIDTH object specifying X as the required bandwidth and a LOAD-BALANCING object with the Max-LSP and Min-Bandwidth fields set to N and B, respectively.
Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res
Constructor and Description |
---|
LoadBalancing() |
LoadBalancing(byte[] bytes,
int offset)
Constructs a new LOAD-BALANCING Object from a sequence of bytes
|
Modifier and Type | Method and Description |
---|---|
void |
decode()
Decode the LOAD BALANCING Object
|
void |
encode()
Encode the LOAD BALANCING Object
|
boolean |
equals(Object obj) |
int |
getMaxLSP() |
float |
getMinBandwidth() |
int |
hashCode() |
void |
setMaxLSP(int maxLSP) |
void |
setMinBandwidth(float minBandwidth) |
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObject
public LoadBalancing()
public LoadBalancing(byte[] bytes, int offset) throws MalformedPCEPObjectException
bytes
- Sequence of bytes where the object is presentoffset
- Position at which the object startsMalformedPCEPObjectException
- Thrown if the decoded object is not well formedpublic void encode()
encode
in interface PCEPElement
encode
in class PCEPObject
public void decode() throws MalformedPCEPObjectException
decode
in class PCEPObject
MalformedPCEPObjectException
public int getMaxLSP()
public void setMaxLSP(int maxLSP)
public float getMinBandwidth()
public void setMinBandwidth(float minBandwidth)
public int hashCode()
hashCode
in class PCEPObject
public boolean equals(Object obj)
equals
in class PCEPObject
Copyright © 2016. All rights reserved.