本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFStatsType.EXPERIMENTER属性的典型用法代码示例。如果您正苦于以下问题:Java OFStatsType.EXPERIMENTER属性的具体用法?Java OFStatsType.EXPERIMENTER怎么用?Java OFStatsType.EXPERIMENTER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.projectfloodlight.openflow.protocol.OFStatsType
的用法示例。
在下文中一共展示了OFStatsType.EXPERIMENTER属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processOFMultipartReply
private void processOFMultipartReply(OFStatsReply stats) {
log.debug("Received message {} during switch-driver " +
"subhandshake " + "from switch {} ... " +
stats,
getStringId());
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
try {
OFExpPortDescReply expPortDescReply = (OFExpPortDescReply) stats;
expPortDes.addAll(expPortDescReply.getEntries());
if (!expPortDescReply.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
driverHandshakeComplete.set(true);
return;
}
} catch (ClassCastException e) {
log.error("Unexspected Experimenter Multipart message type {} ",
stats.getClass().getName());
}
}
}
示例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 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);
}
}
示例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 EXPERIMENTER_VAL:
return OFStatsType.EXPERIMENTER;
default:
throw new IllegalArgumentException("Illegal wire value for type OFStatsType in version 1.0: " + val);
}
}
示例4: 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);
}
}
示例5: processOFMultipartReply
private void processOFMultipartReply(OFStatsReply stats) {
log.debug("OPLK Switch: Received message {} during switch-driver " +
"subhandshake from switch {} ... ", stats, getStringId());
//Process experimenter messages
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
try {
//Note: We just re-use calient message for a short term.
OFCalientPortDescStatsReply descReply = (OFCalientPortDescStatsReply) stats;
opticalPorts.addAll(descReply.getPortDesc());
driverHandshakeComplete.set(true);
} catch (ClassCastException e) {
log.error("OPLK Switch: Unexspected Experimenter Multipart message type {} ",
stats.getClass().getName());
}
}
}
示例6: 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);
}
}
示例7: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
log.debug("OPLK EDFA Received barrier response");
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case PORT_STATUS:
processOFPortStatus((OFCircuitPortStatus) m);
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.debug("OPLK EDFA : Received multipart (port desc) reply message {}", m);
//OTN Optical extension 1.0 port-desc
createOpticalPortList((OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake from switch {} ... " +
"Ignoring message", m, getStringId());
}
}
示例8: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
log.debug("OPLK ROADM Received barrier response");
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
case FLOW_REMOVED:
break;
case GET_ASYNC_REPLY:
break;
case PACKET_IN:
break;
case PORT_STATUS:
processOFPortStatus((OFCircuitPortStatus) m);
break;
case QUEUE_GET_CONFIG_REPLY:
break;
case ROLE_REPLY:
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.warn("OPLK ROADM : Received multipart (port desc) reply message {}", m);
//OTN Optical extension 1.0 port-desc
createOpticalPortList((OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake " + "from switch {} ... " +
"Ignoring message", m,
getStringId());
}
}
示例9: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
if (m.getXid() == barrierXidToWaitFor) {
log.debug("LINC-OE Received barrier response");
}
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
case FLOW_REMOVED:
break;
case GET_ASYNC_REPLY:
break;
case PACKET_IN:
break;
case PORT_STATUS:
log.warn("****LINC-OE Port Status {} {}", getStringId(), m);
processOFPortStatus((OFCircuitPortStatus) m);
break;
case QUEUE_GET_CONFIG_REPLY:
break;
case ROLE_REPLY:
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.warn("LINC-OE : Received stats reply message {}", m);
createOpticalPortList((OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake " + "from switch {} ... " +
"Ignoring message", m,
getStringId());
}
}
示例10: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
if (m.getXid() == barrierXidToWaitFor) {
log.debug("LINC-OE Received barrier response");
}
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
case FLOW_REMOVED:
break;
case GET_ASYNC_REPLY:
break;
case PACKET_IN:
break;
case PORT_STATUS:
log.warn("****LINC-OE Port Status {} {}", getStringId(), m);
processOFPortStatus((OFCircuitPortStatus) m);
break;
case QUEUE_GET_CONFIG_REPLY:
break;
case ROLE_REPLY:
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.warn("LINC-OE : Received stats reply message {}", m);
processHandshakeOFExperimenterPortDescRequest(
(OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake " + "from switch {} ... " +
"Ignoring message", m,
getStringId());
}
}
示例11: 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);
}
}
示例12: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
log.debug("OPLK ROADM Received barrier response");
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
case FLOW_REMOVED:
break;
case GET_ASYNC_REPLY:
break;
case PACKET_IN:
break;
case PORT_STATUS:
processOFPortStatus((OFCircuitPortStatus) m);
break;
case QUEUE_GET_CONFIG_REPLY:
break;
case ROLE_REPLY:
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.debug("OPLK ROADM : Received multipart (port desc) reply message {}", m);
//OTN Optical extension 1.0 port-desc
createOpticalPortList((OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake from switch {} ... " +
"Ignoring message", m, getStringId());
}
}
示例13: processDriverHandshakeMessage
@Override
public void processDriverHandshakeMessage(OFMessage m) {
if (!startDriverHandshakeCalled) {
throw new SwitchDriverSubHandshakeNotStarted();
}
if (driverHandshakeComplete.get()) {
throw new SwitchDriverSubHandshakeCompleted(m);
}
switch (m.getType()) {
case BARRIER_REPLY:
if (m.getXid() == barrierXidToWaitFor) {
log.debug("LINC-OE Received barrier response");
}
break;
case ERROR:
log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
case FLOW_REMOVED:
break;
case GET_ASYNC_REPLY:
break;
case PACKET_IN:
break;
case PORT_STATUS:
log.debug("****LINC-OE Port Status {} {}", getStringId(), m);
processOFPortStatus((OFCircuitPortStatus) m);
break;
case QUEUE_GET_CONFIG_REPLY:
break;
case ROLE_REPLY:
break;
case STATS_REPLY:
OFStatsReply stats = (OFStatsReply) m;
if (stats.getStatsType() == OFStatsType.EXPERIMENTER) {
log.debug("LINC-OE : Received stats reply message {}", m);
createOpticalPortList((OFCircuitPortsReply) m);
driverHandshakeComplete.set(true);
}
break;
default:
log.warn("Received message {} during switch-driver " +
"subhandshake " + "from switch {} ... " +
"Ignoring message", m,
getStringId());
}
}
示例14: handleMessage
@Override
public void handleMessage(Dpid dpid, OFMessage msg) {
if (isDisabled) {
return;
}
try {
switch (msg.getType()) {
case STATS_REPLY:
if (((OFStatsReply) msg).getStatsType() == OFStatsType.PORT) {
OFPortStatsReply portStatsReply = (OFPortStatsReply) msg;
List<OFPortStatsEntry> portStatsReplyList = portStatsReplies.get(dpid);
if (portStatsReplyList == null) {
portStatsReplyList = Lists.newCopyOnWriteArrayList();
}
portStatsReplyList.addAll(portStatsReply.getEntries());
portStatsReplies.put(dpid, portStatsReplyList);
if (!portStatsReply.getFlags().contains(OFStatsReplyFlags.REPLY_MORE)) {
List<OFPortStatsEntry> statsEntries = portStatsReplies.get(dpid);
if (statsEntries != null) {
pushPortMetrics(dpid, statsEntries);
statsEntries.clear();
}
}
} else if (((OFStatsReply) msg).getStatsType() == OFStatsType.EXPERIMENTER) {
OpenFlowSwitch sw = controller.getSwitch(dpid);
if (sw == null) {
LOG.error("Switch {} is not found", dpid);
break;
}
if (sw instanceof OpenFlowOpticalSwitch) {
// Optical switch uses experimenter stats message to update power
List<PortDescription> portDescs =
((OpenFlowOpticalSwitch) sw).processExpPortStats(msg);
if (!portDescs.isEmpty()) {
providerService.updatePorts(DeviceId.deviceId(Dpid.uri(dpid)), portDescs);
}
}
}
break;
case ERROR:
if (((OFErrorMsg) msg).getErrType() == OFErrorType.PORT_MOD_FAILED) {
LOG.error("port mod failed");
}
break;
default:
break;
}
} catch (IllegalStateException e) {
// system is shutting down and the providerService is no longer
// valid. Messages cannot be processed.
}
}
示例15: 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);
}
}