use of org.onosproject.net.packet.PacketProgrammable in project onos by opennetworkinglab.
the class P4RuntimePacketProvider method emit.
@Override
public void emit(OutboundPacket packet) {
if (packet != null) {
DeviceId deviceId = packet.sendThrough();
Device device = deviceService.getDevice(deviceId);
if (device.is(PacketProgrammable.class) && mastershipService.isLocalMaster(deviceId)) {
PacketProgrammable packetProgrammable = device.as(PacketProgrammable.class);
packetProgrammable.emit(packet);
} else {
log.warn("No PacketProgrammable behavior for device {}", deviceId);
}
}
}
Aggregations