Closed chrismurf closed 5 years ago
Toby, if you are amenable to this, do you mind pushing a new release to the PPA after merging? I don't know how much that's automated already.
Which PPA?
ppa:tes/dccl-daily is automatically build from 3.0 daily ppa:dccl-dev/ppa is a release one (manual release)
I'll eventually need a release, but I may come up with another PR before then for this project. For now, I'll point at dccl-daily, and then request a real release in the future once we get stable.
cd ~/dccl/include/dccl/test/dccl_packed_enum
dccl -a -f test.proto
gives
dccl -a -f test.proto
||||||| Dynamic Compact Control Language (DCCL) Codec |||||||
2 messages loaded.
Field sizes are in bits unless otherwise noted.
================== 2: dccl.test.TestMsgPack ==================
Actual maximum size of message: 2 bytes / 16 bits
dccl.id head...........................8
user head..............................0
body...................................8
padding to full byte...................0
Allowed maximum size of message: 2 bytes / 16 bits
--------------------------- Header ---------------------------
dccl.id head...................................8 {dccl.default.id}
---------------------------- Body ----------------------------
dccl.test.TestMsgPack..........................8 {dccl.default3}
1. five_bit_padding....................5 {dccl.default3}
2. value...............................3 {dccl.default3}
================= 3: dccl.test.TestMsgUnpack =================
Actual maximum size of message: 4 bytes / 32 bits
dccl.id head...........................8
user head..............................0
body..................................24
padding to full byte...................0
Allowed maximum size of message: 4 bytes / 32 bits
--------------------------- Header ---------------------------
dccl.id head...................................8 {dccl.default.id}
---------------------------- Body ----------------------------
dccl.test.TestMsgUnpack.......................24 {dccl.default3}
1. value..............................24 {dccl.default3}
Looks good to me
When set to false, packed_enum will leave gaps in the encoded value range (rather than looking only at the enum value index). This fixes #45.