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


Java OFHello.setXid方法代码示例

本文整理汇总了Java中org.openflow.protocol.OFHello.setXid方法的典型用法代码示例。如果您正苦于以下问题:Java OFHello.setXid方法的具体用法?Java OFHello.setXid怎么用?Java OFHello.setXid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openflow.protocol.OFHello的用法示例。


在下文中一共展示了OFHello.setXid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.openflow.protocol.OFHello; //导入方法依赖的package包/类
@Before
public void setUp() throws IOException {
    factory = BasicFactory.getInstance();
    cntx = new FloodlightContext();
    
    sw1 = new OFMessageDamperMockSwitch();
    sw2 = new OFMessageDamperMockSwitch();
    
    echoRequst1 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1.setPayload(new byte[] { 1 });
    echoRequst1Clone = (OFEchoRequest)
            factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1Clone.setPayload(new byte[] { 1 });
    echoRequst2 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst2.setPayload(new byte[] { 2 });
    
    hello1 = (OFHello)factory.getMessage(OFType.HELLO);
    hello1.setXid(1);
    hello2 = (OFHello)factory.getMessage(OFType.HELLO);
    hello2.setXid(2);
    
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:23,代码来源:OFMessageDamperTest.java

示例2: setUp

import org.openflow.protocol.OFHello; //导入方法依赖的package包/类
@Before
public void setUp() throws IOException {
    factory = new BasicFactory();
    cntx = new FloodlightContext();
    
    sw1 = new OFMessageDamperMockSwitch();
    sw2 = new OFMessageDamperMockSwitch();
    
    echoRequst1 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1.setPayload(new byte[] { 1 });
    echoRequst1Clone = (OFEchoRequest)
            factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1Clone.setPayload(new byte[] { 1 });
    echoRequst2 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst2.setPayload(new byte[] { 2 });
    
    hello1 = (OFHello)factory.getMessage(OFType.HELLO);
    hello1.setXid(1);
    hello2 = (OFHello)factory.getMessage(OFType.HELLO);
    hello2.setXid(2);
    
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:23,代码来源:OFMessageDamperTest.java

示例3: setUp

import org.openflow.protocol.OFHello; //导入方法依赖的package包/类
@Before
public void setUp() throws IOException {
    factory = new BasicFactory();
    cntx = new ListenerContext();
    
    sw1 = new OFMessageDamperMockSwitch();
    sw2 = new OFMessageDamperMockSwitch();
    
    echoRequst1 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1.setPayload(new byte[] { 1 });
    echoRequst1Clone = (OFEchoRequest)
            factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst1Clone.setPayload(new byte[] { 1 });
    echoRequst2 = (OFEchoRequest)factory.getMessage(OFType.ECHO_REQUEST);
    echoRequst2.setPayload(new byte[] { 2 });
    
    hello1 = (OFHello)factory.getMessage(OFType.HELLO);
    hello1.setXid(1);
    hello2 = (OFHello)factory.getMessage(OFType.HELLO);
    hello2.setXid(2);
    
}
 
开发者ID:opendaylight,项目名称:archived-net-virt-platform,代码行数:23,代码来源:OFMessageDamperTest.java

示例4: testTranslate

import org.openflow.protocol.OFHello; //导入方法依赖的package包/类
public void testTranslate() {
    final OVXSwitch vsw = new OVXSingleSwitch(1, 1);

    // make a south-bound message....something simple.
    final OFHello ofh = new OFHello();
    ofh.setXid(0);

    final int newXid = this.translator.translate(ofh.getXid(), vsw);
    Assert.assertEquals(newXid, XidTranslator.MIN_XID);
}
 
开发者ID:CoVisor,项目名称:CoVisor,代码行数:11,代码来源:TranslatorTest.java

示例5: testUntranslate

import org.openflow.protocol.OFHello; //导入方法依赖的package包/类
public void testUntranslate() {
    final OVXSwitch vsw = new OVXSingleSwitch(1, 1);

    final OFHello ofh = new OFHello();
    ofh.setXid(0);
    this.translator.translate(ofh.getXid(), vsw);

    final XidPair<OVXSwitch> pair = this.translator
            .untranslate(XidTranslator.MIN_XID);
    Assert.assertEquals(pair.getSwitch().getSwitchId(), vsw.getSwitchId());
    Assert.assertEquals(pair.getXid(), ofh.getXid());
}
 
开发者ID:CoVisor,项目名称:CoVisor,代码行数:13,代码来源:TranslatorTest.java


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