当前位置: 首页>>代码示例>>Java>>正文


Java EndPointDataPathTLV类代码示例

本文整理汇总了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);
	}

}
 
开发者ID:telefonicaid,项目名称:netphony-network-protocols,代码行数:37,代码来源:EndPoint.java

示例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;
	}
}
 
开发者ID:telefonicaid,项目名称:netphony-abno,代码行数:71,代码来源:Path_Computation.java

示例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;
	}	
}
 
开发者ID:telefonicaid,项目名称:netphony-abno,代码行数:65,代码来源:Path_Computation.java

示例4: getEndPointDataPathTLV

import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public EndPointDataPathTLV getEndPointDataPathTLV() {
	return endPointDataPathID;
}
 
开发者ID:telefonicaid,项目名称:netphony-network-protocols,代码行数:4,代码来源:EndPoint.java

示例5: setEndPointDataPathTLV

import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public void setEndPointDataPathTLV(EndPointDataPathTLV endPointDataPathID) {
	this.endPointDataPathID = endPointDataPathID;
}
 
开发者ID:telefonicaid,项目名称:netphony-network-protocols,代码行数:4,代码来源:EndPoint.java

示例6: getEndPointDataPathID

import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public EndPointDataPathTLV getEndPointDataPathID() {
	return endPointDataPathID;
}
 
开发者ID:telefonicaid,项目名称:netphony-network-protocols,代码行数:4,代码来源:EndPoint.java

示例7: setEndPointDataPathID

import es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV; //导入依赖的package包/类
public void setEndPointDataPathID(EndPointDataPathTLV endPointDataPathID) {
	this.endPointDataPathID = endPointDataPathID;
}
 
开发者ID:telefonicaid,项目名称:netphony-network-protocols,代码行数:4,代码来源:EndPoint.java


注:本文中的es.tid.pce.pcep.objects.tlvs.EndPointDataPathTLV类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。