Murat Parlakisik | f95672c | 2016-12-05 00:53:17 -0800 | [diff] [blame] | 1 | -- binary |
| 2 | 06 20 # version, type |
| 3 | 00 28 # length |
| 4 | 12 34 56 78 # xid |
| 5 | 06 1d # version, type (METER_MOD) |
| 6 | 00 20 # length |
| 7 | 11 11 11 11 # xid |
| 8 | 00 00 # command (OFPMC_ADD) |
| 9 | 00 01 # flags (OFPMF_KBPS) |
| 10 | 00 00 00 01 # meter_id |
| 11 | 00 01 # bands[0].type (OFPMBT_DROP) |
| 12 | 00 10 # bands[0].length |
| 13 | 00 00 00 01 # bands[0].rate |
| 14 | 00 00 00 02 # bands[0].burst_size |
| 15 | 00 00 00 00 # pad |
| 16 | -- java |
| 17 | builder |
| 18 | .setXid(0x12345678) |
| 19 | .setRequest(factory.buildMeterMod().setXid(0x11111111).setCommand(OFMeterModCommand.ADD) |
| 20 | .setFlags(ImmutableSet.<OFMeterFlags>of(OFMeterFlags.KBPS)) |
| 21 | .setMeterId(1) |
| 22 | .setBands(ImmutableList.<OFMeterBand>of(factory.meterBands().buildDrop().setRate(1).setBurstSize(2).build())) |
| 23 | .build()) |
| 24 | .build() |