use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializePortStatsBody.
private static void serializePortStatsBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestPortStatsCase portstatsCase = (MultipartRequestPortStatsCase) multipartRequestBody;
MultipartRequestPortStats portstats = portstatsCase.getMultipartRequestPortStats();
output.writeInt(portstats.getPortNo().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_PORTSTATS_BODY);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeMeterConfigBody.
private static void serializeMeterConfigBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestMeterConfigCase meterConfigCase = (MultipartRequestMeterConfigCase) multipartRequestBody;
MultipartRequestMeterConfig meterConfig = meterConfigCase.getMultipartRequestMeterConfig();
output.writeInt(meterConfig.getMeterId().getValue().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_METER_CONFIG_BODY);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class MultipartRequestInputFactory method serializeFlowBody.
private void serializeFlowBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestFlowCase flowCase = (MultipartRequestFlowCase) multipartRequestBody;
MultipartRequestFlow flow = flowCase.getMultipartRequestFlow();
output.writeByte(flow.getTableId().byteValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_FLOW_BODY_01);
output.writeInt(flow.getOutPort().intValue());
output.writeInt(flow.getOutGroup().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_FLOW_BODY_02);
output.writeLong(flow.getCookie().longValue());
output.writeLong(flow.getCookieMask().longValue());
OFSerializer<Match> serializer = registry.getSerializer(new MessageTypeKey<>(EncodeConstants.OF13_VERSION_ID, Match.class));
serializer.serialize(flow.getMatch(), output);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody 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);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody in project openflowplugin by opendaylight.
the class OF10StatsRequestInputFactory method serializePortBody.
private static void serializePortBody(final MultipartRequestBody multipartRequestBody, final ByteBuf output) {
MultipartRequestPortStatsCase portstatsCase = (MultipartRequestPortStatsCase) multipartRequestBody;
MultipartRequestPortStats portstats = portstatsCase.getMultipartRequestPortStats();
output.writeShort(portstats.getPortNo().intValue());
output.writeZero(PADDING_IN_MULTIPART_REQUEST_PORT_BODY);
}
Aggregations