use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.traffic.rate.extended.community.TrafficRateExtendedCommunity in project bgpcep by opendaylight.
the class TrafficRateEcHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
checkArgument(extendedCommunity instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.TrafficRateExtendedCommunity, "The extended community %s is not TrafficRateExtendedCommunity type.", extendedCommunity);
final TrafficRateExtendedCommunity trafficRate = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.TrafficRateExtendedCommunity) extendedCommunity).getTrafficRateExtendedCommunity();
byteAggregator.writeShort(trafficRate.getInformativeAs().getValue().intValue());
byteAggregator.writeBytes(trafficRate.getLocalAdministrator().getValue());
}
Aggregations