Search in sources :

Example 1 with MultipartRequestExperimenterCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method serializeExperimenterBody.

private void serializeExperimenterBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
    MultipartRequestExperimenterCase expCase = (MultipartRequestExperimenterCase) multipartRequestBody;
    MultipartRequestExperimenter experimenter = expCase.getMultipartRequestExperimenter();
    final long expId = experimenter.getExperimenter().getValue().longValue();
    // write experimenterId
    output.writeInt((int) expId);
    OFSerializer<ExperimenterDataOfChoice> serializer = registry.getSerializer(ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(EncodeConstants.OF10_VERSION_ID, expId, -1));
    serializer.serialize(experimenter.getExperimenterDataOfChoice(), output);
}
Also used : MultipartRequestExperimenter(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenter) ExperimenterDataOfChoice(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice) MultipartRequestExperimenterCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase)

Example 2 with MultipartRequestExperimenterCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase in project openflowplugin by opendaylight.

the class OF10StatsRequestInputFactory method setExperimenter.

private MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
    MultipartRequestExperimenterCaseBuilder caseBuilder = new MultipartRequestExperimenterCaseBuilder();
    MultipartRequestExperimenterBuilder experimenterBuilder = new MultipartRequestExperimenterBuilder();
    caseBuilder.setMultipartRequestExperimenter(experimenterBuilder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestExperimenterBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenterBuilder) MultipartRequestExperimenterCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCaseBuilder)

Example 3 with MultipartRequestExperimenterCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase in project openflowplugin by opendaylight.

the class MultipartRequestInputFactory method serializeExperimenterBody.

private void serializeExperimenterBody(final MultipartRequestInput message, final ByteBuf outBuffer) {
    MultipartRequestExperimenterCase expCase = (MultipartRequestExperimenterCase) message.getMultipartRequestBody();
    MultipartRequestExperimenter experimenter = expCase.getMultipartRequestExperimenter();
    final long expId = experimenter.getExperimenter().getValue().longValue();
    final long expType = experimenter.getExpType().longValue();
    // write experimenterId and type
    outBuffer.writeInt((int) expId);
    outBuffer.writeInt((int) expType);
    // serialize experimenter data
    OFSerializer<ExperimenterDataOfChoice> serializer = registry.getSerializer(ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(EncodeConstants.OF13_VERSION_ID, expId, expType));
    serializer.serialize(experimenter.getExperimenterDataOfChoice(), outBuffer);
}
Also used : MultipartRequestExperimenter(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenter) ExperimenterDataOfChoice(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice) MultipartRequestExperimenterCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase)

Example 4 with MultipartRequestExperimenterCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase in project openflowplugin by opendaylight.

the class MultipartRequestInputMessageFactory method setExperimenter.

private MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
    MultipartRequestExperimenterCaseBuilder caseBuilder = new MultipartRequestExperimenterCaseBuilder();
    MultipartRequestExperimenterBuilder experimenterBuilder = new MultipartRequestExperimenterBuilder();
    caseBuilder.setMultipartRequestExperimenter(experimenterBuilder.build());
    return caseBuilder.build();
}
Also used : MultipartRequestExperimenterBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenterBuilder) MultipartRequestExperimenterCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCaseBuilder)

Aggregations

ExperimenterDataOfChoice (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice)2 MultipartRequestExperimenterCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase)2 MultipartRequestExperimenterCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCaseBuilder)2 MultipartRequestExperimenter (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenter)2 MultipartRequestExperimenterBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.experimenter._case.MultipartRequestExperimenterBuilder)2