Example usage for io.netty.buffer ByteBuf writeZero

List of usage examples for io.netty.buffer ByteBuf writeZero

Introduction

In this page you can find the example usage for io.netty.buffer ByteBuf writeZero.

Prototype

public abstract ByteBuf writeZero(int length);

Source Link

Document

Fills this buffer with NUL (0x00) starting at the current writerIndex and increases the writerIndex by the specified length .

Usage

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNshc1Codec.java

License:Open Source License

@Override
public void serialize(Action input, ByteBuf outBuffer) {
    ActionSetNshc1 action = ((ActionSetNshc1) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSC_SUBTYPE, outBuffer);
    outBuffer.writeZero(padding);
    outBuffer.writeInt(action.getNxActionSetNshc1().getNshc().intValue());
}

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNshc2Codec.java

License:Open Source License

@Override
public void serialize(Action input, ByteBuf outBuffer) {
    ActionSetNshc2 action = ((ActionSetNshc2) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSC_SUBTYPE, outBuffer);
    outBuffer.writeZero(padding);
    outBuffer.writeInt(action.getNxActionSetNshc2().getNshc().intValue());
}

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNshc3Codec.java

License:Open Source License

@Override
public void serialize(Action input, ByteBuf outBuffer) {
    ActionSetNshc3 action = ((ActionSetNshc3) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSC_SUBTYPE, outBuffer);
    outBuffer.writeZero(padding);
    outBuffer.writeInt(action.getNxActionSetNshc3().getNshc().intValue());
}

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNshc4Codec.java

License:Open Source License

@Override
public void serialize(Action input, ByteBuf outBuffer) {
    ActionSetNshc4 action = ((ActionSetNshc4) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSC_SUBTYPE, outBuffer);
    outBuffer.writeZero(padding);
    outBuffer.writeInt(action.getNxActionSetNshc4().getNshc().intValue());
}

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNsiCodec.java

License:Open Source License

@Override
public void serialize(final Action input, final ByteBuf outBuffer) {
    ActionSetNsi action = ((ActionSetNsi) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSI_SUBTYPE, outBuffer);
    outBuffer.writeByte(action.getNxActionSetNsi().getNsi().byteValue());
    outBuffer.writeZero(padding);
}

From source file:org.opendaylight.openflowjava.nx.codec.action.SetNspCodec.java

License:Open Source License

@Override
public void serialize(Action input, ByteBuf outBuffer) {
    ActionSetNsp action = ((ActionSetNsp) input.getActionChoice());
    serializeHeader(LENGTH, NXAST_SET_NSP_SUBTYPE, outBuffer);
    outBuffer.writeZero(padding);
    outBuffer.writeInt(action.getNxActionSetNsp().getNsp().intValue());
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10EnqueueActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(/*  w  w  w.  jav a2  s  .c o m*/
            ((EnqueueCase) action.getActionChoice()).getEnqueueAction().getPort().getValue().intValue());
    outBuffer.writeZero(ActionConstants.PADDING_IN_ENQUEUE_ACTION);
    outBuffer.writeInt(
            ((EnqueueCase) action.getActionChoice()).getEnqueueAction().getQueueId().getValue().intValue());
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetDlDstActionSerializer.java

License:Open Source License

@Override
public void serialize(final Action action, final ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeBytes(IetfYangUtil.INSTANCE
            .bytesFor(((SetDlDstCase) action.getActionChoice()).getSetDlDstAction().getDlDstAddress()));
    outBuffer.writeZero(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetDlSrcActionSerializer.java

License:Open Source License

@Override
public void serialize(final Action action, final ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeBytes(IetfYangUtil.INSTANCE
            .bytesFor(((SetDlSrcCase) action.getActionChoice()).getSetDlSrcAction().getDlSrcAddress()));
    outBuffer.writeZero(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetNwTosActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeByte(((SetNwTosCase) action.getActionChoice()).getSetNwTosAction().getNwTos());
    outBuffer.writeZero(ActionConstants.PADDING_IN_SET_NW_TOS_ACTION);
}