use of org.projectfloodlight.openflow.protocol.OFCalientPortStatsRequest in project onos by opennetworkinglab.
the class OplinkSwitchHandshaker method sendMsg.
@Override
public final void sendMsg(OFMessage m) {
List<OFMessage> messages = new ArrayList<>();
messages.add(m);
if (m.getType() == OFType.STATS_REQUEST) {
OFStatsRequest sr = (OFStatsRequest) m;
log.debug("OPLK Switch: Rebuilding stats request type {}", sr.getStatsType());
switch(sr.getStatsType()) {
case PORT:
// Send experiment status request for Optical Fiber switch to device
// Note: We just re-use calient message for a short term.
OFCalientPortStatsRequest portRequest = this.factory().buildCalientPortStatsRequest().setXid(sr.getXid()).setFlags(sr.getFlags()).build();
messages.add(portRequest);
break;
default:
break;
}
} else {
log.debug("OPLK Switch: sends msg:{}, as is", m.getType());
}
super.sendMsg(messages);
}
Aggregations