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


Java AvailableLabels类代码示例

本文整理汇总了Java中es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels的典型用法代码示例。如果您正苦于以下问题:Java AvailableLabels类的具体用法?Java AvailableLabels怎么用?Java AvailableLabels使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AvailableLabels类属于es.tid.ospf.ospfv2.lsa.tlv.subtlv包,在下文中一共展示了AvailableLabels类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBitmapLabelSet

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public static void createBitmapLabelSet(AvailableLabels availableLabels,int numLabels,int grid, int cs,int n){
	//FIXME: no hay problema de que se salga el ancho de banda
	BitmapLabelSet bitmapLabelSet = new BitmapLabelSet();
	DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel();
	dwdmWavelengthLabel.setGrid(grid);
	dwdmWavelengthLabel.setChannelSpacing(cs);
	dwdmWavelengthLabel.setN(n);
	bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel);

	int numberBytes = numLabels/8;
	if ((numberBytes*8)<numLabels){
		numberBytes++;
	}
	byte[] bytesBitMap =  new byte[numberBytes];
	for (int i=0;i<numberBytes;i++)
		bytesBitMap[i]=0x00;	

	bitmapLabelSet.setBytesBitmap(bytesBitMap);
	bitmapLabelSet.setNumLabels(numLabels);

	availableLabels.setLabelSet(bitmapLabelSet);

}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:24,代码来源:FileTEDBUpdater.java

示例2: duplicateTEDDB

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public static SimpleDirectedWeightedGraph<Object,IntraDomainEdge>  duplicateTEDDB(SimpleDirectedWeightedGraph<Object,IntraDomainEdge> networkGraph){
	SimpleDirectedWeightedGraph<Object,IntraDomainEdge> networkGraphDuplicated= new SimpleDirectedWeightedGraph<Object,IntraDomainEdge> (IntraDomainEdge.class);
	Set<Object> nodes= networkGraph.vertexSet();
	Iterator<Object> iter=nodes.iterator();
	Set<IntraDomainEdge> fiberEdges= networkGraph.edgeSet();
	DataPathID dpid = new DataPathID();
	Iterator<IntraDomainEdge> iterFiberLink;
	while (iter.hasNext()){
		networkGraphDuplicated.addVertex( iter.next());			
	}
	iterFiberLink=fiberEdges.iterator();
	while (iterFiberLink.hasNext()){
		IntraDomainEdge fiberEdge =iterFiberLink.next();
		IntraDomainEdge edge=new IntraDomainEdge();
		TE_Information informationTEDB=new TE_Information();
		edge.setTE_info(informationTEDB);
		informationTEDB.setAvailableLabels(new AvailableLabels());
		BitmapLabelSet newBitmapLabelSet = new BitmapLabelSet();
		int numLabels = fiberEdge.getTE_info().getAvailableLabels().getLabelSet().getNumLabels();
		newBitmapLabelSet.createBytesBitMap(((BitmapLabelSet)fiberEdge.getTE_info().getAvailableLabels().getLabelSet()).getBytesBitMap());
		
		int numberBytes = numLabels/8;
		if ((numberBytes*8)<numLabels){
			numberBytes++;
		}
		byte[] bytesBitMapReserved =  new byte[numberBytes];
		for (int i=0;i<numberBytes;i++)
			bytesBitMapReserved[i]=0x00;	
		newBitmapLabelSet.setBytesBitmapReserved(bytesBitMapReserved);
		newBitmapLabelSet.setNumLabels(numLabels);
		informationTEDB.getAvailableLabels().setLabelSet(newBitmapLabelSet);
		networkGraphDuplicated.addEdge(fiberEdge.getSource(),fiberEdge.getTarget(),edge);			
	}
	return networkGraphDuplicated;
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:36,代码来源:PCEPUtils.java

示例3: fillBitmap

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public void fillBitmap(AvailableLabels availableLabels){
	
	int num_wavelength = 0;
		

	bitmapLabelSet = "";
	
	while(num_wavelength < availableLabels.getLabelSet().getNumLabels()){
		
		int num_byte=num_wavelength/8;
		boolean isFree = ((((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitMap()[num_byte]&(0x80>>>(num_wavelength%8)))==0);
		
		if(isFree){
			bitmapLabelSet = bitmapLabelSet + "0";				
		}else{
			bitmapLabelSet = bitmapLabelSet + "1";
		}
		
		num_wavelength++;
	}	
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:22,代码来源:DatabaseControlSimplifiedLSA.java

示例4: getAvailableLabels

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public AvailableLabels getAvailableLabels() {
	return availableLabels;
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:4,代码来源:TE_Information.java

示例5: setAvailableLabels

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public void setAvailableLabels(AvailableLabels availableLabels) {
	this.availableLabels = availableLabels;
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:4,代码来源:TE_Information.java

示例6: createBitmapLabelSet

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public void createBitmapLabelSet(int numLabels,int grid, int cs,int n,int lambdaIni, int lambdaEnd){
		//FIXME: no hay problema de que se salga el ancho de banda
//log.info("Creamos bit map");
	BitmapLabelSet bitmapLabelSet = new BitmapLabelSet();
		DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel();
		dwdmWavelengthLabel.setGrid(grid);
		dwdmWavelengthLabel.setChannelSpacing(cs);
		dwdmWavelengthLabel.setN(n);
		bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel);
							
		int numberBytes = 	getNumberBytes(numLabels);
	
		byte[] bytesBitMap =  new byte[numberBytes];
		for (int i=0;i<numberBytes;i++)
				bytesBitMap[i]=0x00;	
		
		bitmapLabelSet.setBytesBitmap(bytesBitMap);
		byte[] bytesBitMapRes =  new byte[numberBytes];
		for (int i=0;i<numberBytes;i++)
			bytesBitMapRes[i]=0x00;	
		/*----Opcion: LAMBDA SUBSET----*/
		/*Ponemos a 1 los bytes del BitMap que no maneje el pce. Esto es como poner tiempo de reserva infinito*/
		/*Traducir lambdaIni a numero de bytes*/
		int numberBytesLambdaIni = getNumberBytes(lambdaIni);
		
		/*Traducir lambdaEnd a numero bytes*/
		int numberBytesLambdaEnd =getNumberBytes( lambdaEnd);
		
		for (int i=0;i<numberBytesLambdaIni;i++){
			bytesBitMapRes[i]= (byte) 0xff;
			bytesBitMap[i]= (byte) 0xff;
			
		}
		
		for (int i=numberBytesLambdaEnd;i<numberBytes;i++){
			bytesBitMapRes[i]= (byte) 0xff;	
			bytesBitMap[i]= (byte) 0xff;
			
		}
		System.out.println("Setting Bytes:\n\rBytes: "+numberBytes+"\n\rLambdaIni: "+numberBytesLambdaIni+"\n\rLambdaEnd: "+numberBytesLambdaEnd);
		//FuncionesUtiles.printByte(bytesBitMap, "bytesBitMap",log);
		bitmapLabelSet.setBytesBitmapReserved(bytesBitMapRes);
		bitmapLabelSet.setNumLabels(numLabels);
		availableLabels = new AvailableLabels();
		availableLabels.setLabelSet(bitmapLabelSet);
		
	
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:49,代码来源:TE_Information.java

示例7: getCommonAvailableLabels

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public AvailableLabels getCommonAvailableLabels() {
	return commonAvailableLabels;
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:4,代码来源:WSONInformation.java

示例8: setCommonAvailableLabels

import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; //导入依赖的package包/类
public void setCommonAvailableLabels(AvailableLabels commonAvailableLabels) {
	this.commonAvailableLabels = commonAvailableLabels;
}
 
开发者ID:telefonicaid,项目名称:netphony-topology,代码行数:4,代码来源:WSONInformation.java


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