本文整理汇总了Java中es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV类的典型用法代码示例。如果您正苦于以下问题:Java EndPointDataPathTLV类的具体用法?Java EndPointDataPathTLV怎么用?Java EndPointDataPathTLV使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EndPointDataPathTLV类属于es.tid.pce.pcep.objects.tlvs包,在下文中一共展示了EndPointDataPathTLV类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public void decode(byte[] bytes, int offset) throws MalformedPCEPObjectException {
int tlvtype=PCEPTLV.getType(bytes, offset);
int tlvlength=PCEPTLV.getTotalTLVLength(bytes, offset);
this.setLength(tlvlength);
if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_IPV4_ADDRESS){
endPointIPv4=new EndPointIPv4TLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_UNNUMBERED_ENDPOINT){
unnumberedEndpoint=new UnnumberedEndpointTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_ENDPOINTS_STORAGE){
endPointStorage=new EndPointStorageTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_ENDPOINTS_SERVER){
endPointServer=new EndPointServerTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_ENDPOINTS_APPLICATION){
endPointApplication=new EndPointApplicationTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_XIFI){
xifiEndPointTLV = new XifiEndPointTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_DATAPATHID){
endPointDataPathID = new EndPointDataPathTLV(bytes, offset);
}
else if (tlvtype==ObjectParameters.PCEP_TLV_TYPE_UNNUMBERED_ENDPOINT_DATAPATHID){
endPointUnnumberedDataPathID = new EndPointUnnumberedDataPathTLV(bytes, offset);
}
}
示例2: calculatePath
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public PCEPResponse calculatePath(String SourceString, String DestString, float bndwdth, int OFCode)
{
this.log.info("** PCE **");
try {
PCEPRequest pReq = new PCEPRequest();
LinkedList<SVECConstruct> svecList = new LinkedList<SVECConstruct>();
pReq.setSvecList(svecList);
Request req = new Request();
RequestParameters reqParams = new RequestParameters();
reqParams.setBidirect(false);
reqParams.setPrio(1);
reqParams.setRequestID(1L);
req.setRequestParameters(reqParams);
BandwidthRequested bandwidth=new BandwidthRequested();
bandwidth.setBw(bndwdth);
req.setBandwidth(bandwidth);
//***NEW
GeneralizedEndPoints endP = new GeneralizedEndPoints();
EndPointDataPathTLV sourceDataPathTLV = new EndPointDataPathTLV();
EndPointDataPathTLV destDataPathTLV = new EndPointDataPathTLV();
sourceDataPathTLV.setSwitchID(SourceString);
destDataPathTLV.setSwitchID(DestString);
EndPoint sourceEP=new EndPoint();
EndPoint destEP=new EndPoint();
sourceEP.setEndPointDataPathTLV(sourceDataPathTLV);
destEP.setEndPointDataPathTLV(destDataPathTLV);
P2PEndpoints p2pep=new P2PEndpoints();
p2pep.setSourceEndpoint(sourceEP);
p2pep.setDestinationEndPoints(destEP);
endP.setP2PEndpoints(p2pep);
req.setEndPoints(endP);
log.info("req:: "+req.getEndPoints().toString());
ObjectiveFunction obFunc = new ObjectiveFunction();
obFunc.setOFcode(OFCode);
req.setObjectiveFunction(obFunc);
InterLayer il= new InterLayer();
il.setIbit(true);
il.setIFlag(true);
il.setMFlag(true);
req.setInterLayer(il);
LinkedList<Request> reqList = new LinkedList<Request>();
reqList.add(req);
pReq.setRequestList(reqList);
PCEPResponse pr = this.crm.newRequest(pReq);
this.log.info("Response from PCE " + pr.toString());
return pr;
}
catch (Exception e) {
this.log.info(UtilsFunctions.exceptionToString(e));
return null;
}
}
示例3: calculateDataPathXRO
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public PCEPResponse calculateDataPathXRO(String SourceString, String DestString, String dpidXRO, long portXRO, float bndwdth ) {
log.info("** PCE **");
log.info("Calculating cost between " + SourceString + " and " + DestString + " whitout " + dpidXRO + ":" + portXRO );
try{
PCEPRequest p_r = new PCEPRequest();
Request req = new Request();
p_r.addRequest(req);
RequestParameters rp= new RequestParameters();
rp.setPbit(true);
req.setRequestParameters(rp);
rp.setRequestID(PCCPCEPSession.getNewReqIDCounter());
GeneralizedEndPoints endP = new GeneralizedEndPoints();
EndPointDataPathTLV sourceDataPathTLV = new EndPointDataPathTLV();
EndPointDataPathTLV destDataPathTLV = new EndPointDataPathTLV();
sourceDataPathTLV.setSwitchID(SourceString);
destDataPathTLV.setSwitchID(DestString);
EndPoint sourceEP=new EndPoint();
EndPoint destEP=new EndPoint();
sourceEP.setEndPointDataPathTLV(sourceDataPathTLV);
destEP.setEndPointDataPathTLV(destDataPathTLV);
P2PEndpoints p2pep=new P2PEndpoints();
p2pep.setSourceEndpoint(sourceEP);
p2pep.setDestinationEndPoints(destEP);
endP.setP2PEndpoints(p2pep);
req.setEndPoints(endP);
log.info("req:: "+req.getEndPoints().toString());
ObjectiveFunction of=new ObjectiveFunction();
of.setOFcode(this.ofCode);
req.setObjectiveFunction(of);
BandwidthRequested bandwidth = new BandwidthRequested();
bandwidth.setBw(bndwdth);
req.setBandwidth(bandwidth);
ExcludeRouteObject XRO= new ExcludeRouteObject();
LinkedList<XROSubobject> eROSubobjectList=new LinkedList<XROSubobject>();
DataPathIDXROSubobject xRONode = new DataPathIDXROSubobject();
xRONode.dataPath.setDataPathID(dpidXRO);
eROSubobjectList.add(xRONode);
XRO.setXROSubobjectList(eROSubobjectList);
req.setXro(XRO);
log.info("Path_Computation XRO:: "+req.getXro());
log.info("req: "+req.toString());
PCEPResponse pr=crm.newRequest(p_r);
log.info("Response from PCE "+pr.toString());
return pr;
}
catch(Exception e){
log.info("Exception");
log.info(UtilsFunctions.exceptionToString(e));
return null;
}
}
示例4: getEndPointDataPathTLV
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public EndPointDataPathTLV getEndPointDataPathTLV() {
return endPointDataPathID;
}
示例5: setEndPointDataPathTLV
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public void setEndPointDataPathTLV(EndPointDataPathTLV endPointDataPathID) {
this.endPointDataPathID = endPointDataPathID;
}
示例6: getEndPointDataPathID
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public EndPointDataPathTLV getEndPointDataPathID() {
return endPointDataPathID;
}
示例7: setEndPointDataPathID
import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public void setEndPointDataPathID(EndPointDataPathTLV endPointDataPathID) {
this.endPointDataPathID = endPointDataPathID;
}