X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Fserialization%2Faction%2FOF13SetNwTtlActionSerializer.java;h=8b36e7c0452fbb12d414ffcf9edf7ae008a9d999;hb=29a2a074c78708f6d18583779ece96bb6573f0c6;hp=b30cf5d5e3a293f85012a3b71d1389f990e7d70c;hpb=d58ee5d9fb3dffc8bf395d2e29342dd5e16c9932;p=openflowjava.git diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetNwTtlActionSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetNwTtlActionSerializer.java index b30cf5d5..8b36e7c0 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetNwTtlActionSerializer.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF13SetNwTtlActionSerializer.java @@ -1,41 +1,41 @@ -/* - * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.openflowjava.protocol.impl.serialization.action; - -import io.netty.buffer.ByteBuf; - -import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NwTtlAction; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action; - -/** - * @author michal.polkorab - * - */ -public class OF13SetNwTtlActionSerializer extends AbstractActionSerializer { - - @Override - public void serialize(Action action, ByteBuf outBuffer) { - super.serialize(action, outBuffer); - NwTtlAction nwTtl = action.getAugmentation(NwTtlAction.class); - outBuffer.writeByte(nwTtl.getNwTtl()); - outBuffer.writeZero(ActionConstants.SET_NW_TTL_PADDING); - } - - @Override - protected int getType() { - return ActionConstants.SET_NW_TTL_CODE; - } - - @Override - protected int getLength() { - return ActionConstants.GENERAL_ACTION_LENGTH; - } - -} +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.impl.serialization.action; + +import io.netty.buffer.ByteBuf; + +import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NwTtlAction; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action; + +/** + * @author michal.polkorab + * + */ +public class OF13SetNwTtlActionSerializer extends AbstractActionSerializer { + + @Override + public void serialize(Action action, ByteBuf outBuffer) { + super.serialize(action, outBuffer); + NwTtlAction nwTtl = action.getAugmentation(NwTtlAction.class); + outBuffer.writeByte(nwTtl.getNwTtl()); + outBuffer.writeZero(ActionConstants.SET_NW_TTL_PADDING); + } + + @Override + protected int getType() { + return ActionConstants.SET_NW_TTL_CODE; + } + + @Override + protected int getLength() { + return ActionConstants.GENERAL_ACTION_LENGTH; + } + +}