Search in sources :

Example 1 with AsNumberSubobject

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AsNumberSubobject in project bgpcep by opendaylight.

the class AsNumberCaseParser method serializeSubobject.

public static ByteBuf serializeSubobject(final AsNumberCase asCase) {
    final AsNumberSubobject asNumber = asCase.getAsNumber();
    final ByteBuf body = Unpooled.buffer(CONTENT_LENGTH);
    Preconditions.checkArgument(asNumber.getAsNumber() != null, "AsNumber is mandatory.");
    writeShort(asNumber.getAsNumber().getValue().shortValue(), body);
    return body;
}
Also used : AsNumberSubobject(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AsNumberSubobject) ByteBuf(io.netty.buffer.ByteBuf)

Example 2 with AsNumberSubobject

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AsNumberSubobject in project bgpcep by opendaylight.

the class AsNumberCaseParser method serializeSubobject.

static ByteBuf serializeSubobject(final AsNumberCase asCase) {
    final AsNumberSubobject asNumber = asCase.getAsNumber();
    final ByteBuf body = Unpooled.buffer(CONTENT_LENGTH);
    Preconditions.checkArgument(asNumber.getAsNumber() != null, "AsNumber is mandatory.");
    writeShort(asNumber.getAsNumber().getValue().shortValue(), body);
    return body;
}
Also used : AsNumberSubobject(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AsNumberSubobject) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

ByteBuf (io.netty.buffer.ByteBuf)2 AsNumberSubobject (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.AsNumberSubobject)2