本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFStatsType.DESC属性的典型用法代码示例。如果您正苦于以下问题:Java OFStatsType.DESC属性的具体用法?Java OFStatsType.DESC怎么用?Java OFStatsType.DESC使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.projectfloodlight.openflow.protocol.OFStatsType
的用法示例。
在下文中一共展示了OFStatsType.DESC属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case GROUP_VAL:
return OFStatsType.GROUP;
case GROUP_DESC_VAL:
return OFStatsType.GROUP_DESC;
case GROUP_FEATURES_VAL:
return OFStatsType.GROUP_FEATURES;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.2: " + val);
}
}
示例2: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.0: " + val);
}
}
示例3: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case GROUP_VAL:
return OFStatsType.GROUP;
case GROUP_DESC_VAL:
return OFStatsType.GROUP_DESC;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.1: " + val);
}
}
示例4: processOFStatsReply
@Override
void processOFStatsReply(OFStatsReply m) {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
illegalMessageReceived(m);
return;
}
OFDescStatsReply descStatsReply = (OFDescStatsReply) m;
SwitchDescription description = new SwitchDescription(descStatsReply);
sw = switchManager.getOFSwitchInstance(mainConnection, description, factory, featuresReply.getDatapathId());
// set switch information
// set features reply and channel first so we a DPID and
// channel info.
sw.setFeaturesReply(featuresReply);
if (portDescStats != null) {
sw.setPortDescStats(portDescStats);
}
/*
* Need to add after setting the features.
*/
switchManager.switchAdded(sw);
// Handle pending messages now that we have a sw object
handlePendingPortStatusMessages(description);
setState(new WaitTableFeaturesReplyState());
}
示例5: processOFStatsReply
@LogMessageDoc(message="Switch {switch info} bound to class " +
"{switch driver}, description {switch description}",
explanation="The specified switch has been bound to " +
"a switch driver based on the switch description" +
"received from the switch")
@Override
void processOFStatsReply(OFStatsReply m) {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
illegalMessageReceived(m);
return;
}
OFDescStatsReply descStatsReply = (OFDescStatsReply) m;
SwitchDescription description = new SwitchDescription(descStatsReply);
sw = switchManager.getOFSwitchInstance(mainConnection, description, factory, featuresReply.getDatapathId());
switchManager.switchAdded(sw);
// set switch information
// set features reply and channel first so we a DPID and
// channel info.
sw.setFeaturesReply(featuresReply);
if (portDescStats != null) {
sw.setPortDescStats(portDescStats);
}
// Handle pending messages now that we have a sw object
handlePendingPortStatusMessages(description);
sw.startDriverHandshake();
if (sw.isDriverHandshakeComplete()) {
setState(new WaitAppHandshakeState());
} else {
setState(new WaitSwitchDriverSubHandshakeState());
}
}
示例6: processOFStatsReply
@Override
void processOFStatsReply(OFStatsReply m) {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
illegalMessageReceived(m);
return;
}
OFDescStatsReply descStatsReply = (OFDescStatsReply) m;
SwitchDescription description = new SwitchDescription(descStatsReply);
sw = switchManager.getOFSwitchInstance(mainConnection, description, factory, featuresReply.getDatapathId());
// set switch information
// set features reply and channel first so we a DPID and
// channel info.
sw.setFeaturesReply(featuresReply);
if (portDescStats != null) {
sw.setPortDescStats(portDescStats);
}
/*
* Need to add after setting the features.
*/
switchManager.switchAdded(sw);
// Handle pending messages now that we have a sw object
handlePendingPortStatusMessages(description);
setState(new WaitTableFeaturesReplyState());
}
示例7: processOFStatsReply
@LogMessageDoc(message="Switch {switch info} bound to class " +
"{switch driver}, description {switch description}",
explanation="The specified switch has been bound to " +
"a switch driver based on the switch description" +
"received from the switch")
@Override
void processOFStatsReply(OFStatsReply m) {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
illegalMessageReceived(m);
return;
}
OFDescStatsReply descStatsReply = (OFDescStatsReply) m;
SwitchDescription description = new SwitchDescription(descStatsReply);
sw = switchManager.getOFSwitchInstance(mainConnection, description, factory, featuresReply.getDatapathId());
// set switch information
// set features reply and channel first so we a DPID and
// channel info.
sw.setFeaturesReply(featuresReply);
if (portDescStats != null) {
sw.setPortDescStats(portDescStats);
}
/*
* Need to add after setting the features.
*/
switchManager.switchAdded(sw);
// Handle pending messages now that we have a sw object
handlePendingPortStatusMessages(description);
setState(new WaitTableFeaturesReplyState());
}
示例8: processOFStatsReply
@LogMessageDoc(message="Switch {switch info} bound to class " +
"{switch driver}, description {switch description}",
explanation="The specified switch has been bound to " +
"a switch driver based on the switch description" +
"received from the switch")
@Override
void processOFStatsReply(OFStatsReply m) {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
illegalMessageReceived(m);
return;
}
OFDescStatsReply descStatsReply = (OFDescStatsReply) m;
SwitchDescription description = new SwitchDescription(descStatsReply);
sw = switchManager.getOFSwitchInstance(mainConnection, description, factory, featuresReply.getDatapathId());
switchManager.switchAdded(sw);
// set switch information
// set features reply and channel first so we a DPID and
// channel info.
//设置交换机信息
sw.setFeaturesReply(featuresReply);
if (portDescStats != null) {
sw.setPortDescStats(portDescStats);
}
// Handle pending messages now that we have a sw object
handlePendingPortStatusMessages(description);
sw.startDriverHandshake();
if (sw.isDriverHandshakeComplete()) {
setState(new WaitAppHandshakeState());
} else {
setState(new WaitSwitchDriverSubHandshakeState());
}
}
示例9: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case GROUP_VAL:
return OFStatsType.GROUP;
case GROUP_DESC_VAL:
return OFStatsType.GROUP_DESC;
case GROUP_FEATURES_VAL:
return OFStatsType.GROUP_FEATURES;
case METER_VAL:
return OFStatsType.METER;
case METER_CONFIG_VAL:
return OFStatsType.METER_CONFIG;
case METER_FEATURES_VAL:
return OFStatsType.METER_FEATURES;
case TABLE_FEATURES_VAL:
return OFStatsType.TABLE_FEATURES;
case PORT_DESC_VAL:
return OFStatsType.PORT_DESC;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.3: " + val);
}
}
示例10: processOFStatisticsReply
@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
throws SwitchStateException {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
log.warn("Expecting Description stats but received stats "
+ "type {} from {}. Ignoring ...", m.getStatsType(),
h.channel.getRemoteAddress());
return;
}
OFDescStatsReply drep = (OFDescStatsReply) m;
log.info("Received switch description reply {} from switch at {}",
drep, h.channel.getRemoteAddress());
// Here is where we differentiate between different kinds of switches
h.sw = h.controller.getOFSwitchInstance(h.thisdpid, drep, h.ofVersion);
h.sw.setOFVersion(h.ofVersion);
h.sw.setFeaturesReply(h.featuresReply);
//h.sw.setPortDescReply(h.portDescReply);
h.sw.setPortDescReplies(h.portDescReplies);
h.sw.setConnected(true);
h.sw.setChannel(h.channel);
// boolean success = h.sw.connectSwitch();
//
// if (!success) {
// disconnectDuplicate(h);
// return;
// }
// set switch information
log.debug("Switch {} bound to class {}, description {}",
h.sw, h.sw.getClass(), drep);
//Put switch in EQUAL mode until we hear back from the global registry
//log.debug("Setting new switch {} to EQUAL and sending Role request",
// h.sw.getStringId());
//h.sw.activateEqualSwitch();
//h.setSwitchRole(RoleState.EQUAL);
h.sw.startDriverHandshake();
if (h.sw.isDriverHandshakeComplete()) {
if (!h.sw.connectSwitch()) {
disconnectDuplicate(h);
}
handlePendingPortStatusMessages(h);
h.setState(ACTIVE);
} else {
h.setState(WAIT_SWITCH_DRIVER_SUB_HANDSHAKE);
}
}
示例11: processOFStatisticsReply
@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
throws SwitchStateException {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
log.warn("Expecting Description stats but received stats "
+ "type {} from {}. Ignoring ...", m.getStatsType(),
h.channel.getRemoteAddress());
return;
}
log.info("Received switch description reply from switch at {}",
h.channel.getRemoteAddress());
OFDescStatsReply drep = (OFDescStatsReply) m;
// Here is where we differentiate between different kinds of switches
h.sw = h.controller.getOFSwitchInstance(h.thisdpid, drep, h.ofVersion);
h.sw.setOFVersion(h.ofVersion);
h.sw.setFeaturesReply(h.featuresReply);
h.sw.setPortDescReply(h.portDescReply);
h.sw.setConnected(true);
h.sw.setChannel(h.channel);
// boolean success = h.sw.connectSwitch();
//
// if (!success) {
// disconnectDuplicate(h);
// return;
// }
// set switch information
log.debug("Switch {} bound to class {}, description {}",
new Object[] {h.sw, h.sw.getClass(), drep });
//Put switch in EQUAL mode until we hear back from the global registry
//log.debug("Setting new switch {} to EQUAL and sending Role request",
// h.sw.getStringId());
//h.sw.activateEqualSwitch();
//h.setSwitchRole(RoleState.EQUAL);
h.sw.startDriverHandshake();
if (h.sw.isDriverHandshakeComplete()) {
if (!h.sw.connectSwitch()) {
disconnectDuplicate(h);
}
handlePendingPortStatusMessages(h);
h.setState(ACTIVE);
} else {
h.setState(WAIT_SWITCH_DRIVER_SUB_HANDSHAKE);
}
}
示例12: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case GROUP_VAL:
return OFStatsType.GROUP;
case GROUP_DESC_VAL:
return OFStatsType.GROUP_DESC;
case GROUP_FEATURES_VAL:
return OFStatsType.GROUP_FEATURES;
case METER_VAL:
return OFStatsType.METER;
case METER_CONFIG_VAL:
return OFStatsType.METER_CONFIG;
case METER_FEATURES_VAL:
return OFStatsType.METER_FEATURES;
case TABLE_FEATURES_VAL:
return OFStatsType.TABLE_FEATURES;
case PORT_DESC_VAL:
return OFStatsType.PORT_DESC;
case TABLE_DESC_VAL:
return OFStatsType.TABLE_DESC;
case QUEUE_DESC_VAL:
return OFStatsType.QUEUE_DESC;
case FLOW_MONITOR_VAL:
return OFStatsType.FLOW_MONITOR;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.4: " + val);
}
}
示例13: processOFStatisticsReply
@Override
void processOFStatisticsReply(OFChannelHandler h, OFStatsReply m)
throws SwitchStateException {
// Read description, if it has been updated
if (m.getStatsType() != OFStatsType.DESC) {
log.warn("Expecting Description stats but received stats "
+ "type {} from {}. Ignoring ...", m.getStatsType(),
h.channel.remoteAddress());
return;
}
OFDescStatsReply drep = (OFDescStatsReply) m;
log.info("Received switch description reply {} from switch at {}",
drep, h.channel.remoteAddress());
// Here is where we differentiate between different kinds of switches
h.sw = h.controller.getOFSwitchInstance(h.thisdpid, drep, h.ofVersion);
h.sw.setOFVersion(h.ofVersion);
h.sw.setFeaturesReply(h.featuresReply);
h.sw.setPortDescReplies(h.portDescReplies);
h.sw.setMeterFeaturesReply(h.meterFeaturesReply);
h.sw.setConnected(true);
h.sw.setChannel(h);
// boolean success = h.sw.connectSwitch();
//
// if (!success) {
// disconnectDuplicate(h);
// return;
// }
// set switch information
log.debug("Switch {} bound to class {}, description {}",
h.sw, h.sw.getClass(), drep);
//Put switch in EQUAL mode until we hear back from the global registry
//log.debug("Setting new switch {} to EQUAL and sending Role request",
// h.sw.getStringId());
//h.sw.activateEqualSwitch();
//h.setSwitchRole(RoleState.EQUAL);
h.sw.startDriverHandshake();
if (h.sw.isDriverHandshakeComplete()) {
if (!h.sw.connectSwitch()) {
disconnectDuplicate(h);
}
handlePendingPortStatusMessages(h);
h.setState(ACTIVE);
} else {
h.setState(WAIT_SWITCH_DRIVER_SUB_HANDSHAKE);
}
}
示例14: ofWireValue
public static OFStatsType ofWireValue(short val) {
switch(val) {
case DESC_VAL:
return OFStatsType.DESC;
case FLOW_VAL:
return OFStatsType.FLOW;
case AGGREGATE_VAL:
return OFStatsType.AGGREGATE;
case TABLE_VAL:
return OFStatsType.TABLE;
case PORT_VAL:
return OFStatsType.PORT;
case QUEUE_VAL:
return OFStatsType.QUEUE;
case GROUP_VAL:
return OFStatsType.GROUP;
case GROUP_DESC_VAL:
return OFStatsType.GROUP_DESC;
case GROUP_FEATURES_VAL:
return OFStatsType.GROUP_FEATURES;
case METER_VAL:
return OFStatsType.METER;
case METER_CONFIG_VAL:
return OFStatsType.METER_CONFIG;
case METER_FEATURES_VAL:
return OFStatsType.METER_FEATURES;
case TABLE_FEATURES_VAL:
return OFStatsType.TABLE_FEATURES;
case PORT_DESC_VAL:
return OFStatsType.PORT_DESC;
case TABLE_DESC_VAL:
return OFStatsType.TABLE_DESC;
case QUEUE_DESC_VAL:
return OFStatsType.QUEUE_DESC;
case FLOW_MONITOR_VAL:
return OFStatsType.FLOW_MONITOR;
case FLOW_LIGHTWEIGHT_VAL:
return OFStatsType.FLOW_LIGHTWEIGHT;
case CONTROLLER_STATUS_VAL:
return OFStatsType.CONTROLLER_STATUS;
case BUNDLE_FEATURES_VAL:
return OFStatsType.BUNDLE_FEATURES;
case EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.5: " + val);
}
}