use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeAggregateBody.
private void serializeAggregateBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestAggregateCase aggregateCase = (MultipartRequestAggregateCase) multipartRequestBody;
MultipartRequestAggregate aggregate = aggregateCase.getMultipartRequestAggregate();
output.writeByte(aggregate.getTableId().byteValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGREGGATE_BODY_01);
output.writeInt(aggregate.getOutPort().intValue());
output.writeInt(aggregate.getOutGroup().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGREGGATE_BODY_02);
output.writeLong(aggregate.getCookie().longValue());
output.writeLong(aggregate.getCookieMask().longValue());
OFSerializer<Match> serializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, Match.class));
serializer.serialize(aggregate.getMatch(), output);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase in project openflowplugin by opendaylight.
the class OF10StatsRequestInputFactory method serializeAggregateBody.
private void serializeAggregateBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestAggregateCase aggregateCase = (MultipartRequestAggregateCase) multipartRequestBody;
MultipartRequestAggregate aggregate = aggregateCase.getMultipartRequestAggregate();
OFSerializer<MatchV10> matchSerializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF10_VERSION_ID, MatchV10.class));
matchSerializer.serialize(aggregate.getMatchV10(), output);
output.writeByte(aggregate.getTableId().shortValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_AGGREGATE_BODY);
output.writeShort(aggregate.getOutPort().intValue());
}
Aggregations