本文整理汇总了Java中org.openflow.protocol.OFPacketQueue类的典型用法代码示例。如果您正苦于以下问题:Java OFPacketQueue类的具体用法?Java OFPacketQueue怎么用?Java OFPacketQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OFPacketQueue类属于org.openflow.protocol包,在下文中一共展示了OFPacketQueue类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.openflow.protocol.OFPacketQueue; //导入依赖的package包/类
/**
* Read the queue message data from the ChannelBuffer
* @param data the channel buffer from which we're deserializing
* @param length the length to the end of the enclosing message
*/
public void readFrom(ChannelBuffer data, int length) {
super.readFrom(data, length);
portNumber = data.readShort();
data.readInt(); // pad
data.readShort(); // pad
int availLength = (length - MINIMUM_LENGTH);
this.queues.clear();
while (availLength > 0) {
OFPacketQueue queue = new OFPacketQueue();
queue.readFrom(data);
queues.add(queue);
availLength -= queue.getLength();
}
}
示例2: getLength
import org.openflow.protocol.OFPacketQueue; //导入依赖的package包/类
/**
* @return the total length of the queue modify or delete msg
*/
@Override
public int getLength() {
int queuesLength = 0;
for (OFPacketQueue queue : queues) {
queuesLength += queue.getLength();
}
return super.getLength() + MINIMUM_LENGTH + queuesLength;
}
示例3: writeTo
import org.openflow.protocol.OFPacketQueue; //导入依赖的package包/类
/**
* Write the queue message data to the ChannelBuffer
* @param data the channel buffer to which we're serializing
*/
public void writeTo(ChannelBuffer data) {
super.writeTo(data);
data.writeShort(this.portNumber);
data.writeInt(0); // pad
data.writeShort(0); // pad
for (OFPacketQueue queue : queues) {
queue.writeTo(data);
}
}
示例4: getQueues
import org.openflow.protocol.OFPacketQueue; //导入依赖的package包/类
/**
* @return the queues
*/
public List<OFPacketQueue> getQueues() {
return queues;
}
示例5: setQueues
import org.openflow.protocol.OFPacketQueue; //导入依赖的package包/类
/**
* @param queues the queues to modify or delete
*/
public void setQueues(List<OFPacketQueue> queues) {
this.queues = queues;
}