Search in sources :

Example 6 with MultipartRequestAggregateCase

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);
}
Also used : MultipartRequestAggregate(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate) MultipartRequestAggregateCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)

Example 7 with MultipartRequestAggregateCase

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());
}
Also used : MultipartRequestAggregate(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate) MatchV10(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10) MultipartRequestAggregateCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase)

Aggregations

MultipartRequestAggregateCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCaseBuilder)5 MultipartRequestAggregateBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder)5 BigInteger (java.math.BigInteger)4 MessageCodeKey (org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey)2 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)2 MatchV10 (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10)2 MultipartRequestAggregateCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase)2 MultipartRequestAggregate (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregate)2