use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.esi.RouterIdGeneratedCase in project bgpcep by opendaylight.
the class RouterIdParser method serializeBody.
@Override
public void serializeBody(final Esi esi, final ByteBuf body) {
Preconditions.checkArgument(esi instanceof RouterIdGeneratedCase, "Unknown esi instance. Passed %s. Needed RouterIdGeneratedCase.", esi.getClass());
final RouterIdGenerated routerID = ((RouterIdGeneratedCase) esi).getRouterIdGenerated();
ByteBufWriteUtil.writeIpv4Address(routerID.getRouterId(), body);
ByteBufWriteUtil.writeUnsignedInt(routerID.getLocalDiscriminator(), body);
body.writeZero(ZERO_BYTE);
}
Aggregations