Releases: GobySoft/dccl
Release 4.2.1
Distro support
Add builds for Ubuntu Noble and Debian Bookworm
Bugs
- Update to lua-protobuf to 0.5.1 to fix segfault in Noble
- Fix read-past-end bug in Codec::id when fewer bytes are passed than id_max_size
Release 4.2.0
Features
Message descriptor hash output / Hash codec
New hash output from dccl::Codec::load that can be used to determine if DCCL message changes in a way that would be make it incompatible with a prior version (this is nearly any change except non-DCCL metadata). The hash is now displayed with dccl --analyze
and can be displayed alone with dccl --analyze --hash_only
.
This hash output can be added to the message itself using the new HashCodec ((dccl.field).codec = "dccl.hash"
).
Custom Clock to TimeCodec
New base class TimeCodecClock for TimeCodec which defaults to std::chrono::system clock. Use TimeCodecClock::set_clock to change the clock in use (must implement now() function: see dccl_header unit tests for example).
This is primarily useful for correctly decoding historic DCCL messages that have been logged with a full timestamp that can drive the custom clock.
Improved codec load process for versioned codecs
Previously any non-default codecs had to be fully qualified (e.g., "(dccl.field).codec = "dccl.time2"
). Now, when finding a codec that doesn't end in a number, the (dccl.msg).codec_version
is appended to the codec name a tried first. This allows the correct versioned codec to be found. For example, in a message with (dccl.msg).codec_version = 4
, loading (dccl.field).codec = "dccl.time"
will search for dccl.time4
(and failing to find this, it will try dccl.time
). As part of this, the process of loading default codecs has been greatly streamlined using templated load functions.
Option to omit DCCL ID
Now, one can set (dccl.msg).omit_id = true
to omit the DCCL ID. This is useful (and saves 1-2 bytes) when the DCCL message is wrapped in another protocol or the DCCL message ID is known via some other means (e.g., it's the only message being sent on a particular link). Only the dccl::Codec::decode(...)
methods that take a fully instantiated google::protobuf::Message can be used when omit_id = true
.
Documentation improvements
The Doxygen documentation has been converted to Markdown from the Doxygen custom markup language, and many previously undocumented features are now described.
Bug fixes
Release 4.1.0
Features
Thread safety
DCCL now support thread safe behavior by default using std::mutex. If you wish to default to the old behavior set -Denable_thread_safety=OFF
to CMake during build.
- Individual dccl::Codec instantiations can be be used in individual threads (this was not previously the case).
- If you are sharing a single dccl::Codec between threads, full locking is still required.
- DynamicProtobufManager is now thread safe. This requires an API change for several advanced usage methods:
msg_factory()
->msg_factory_call(...)
,user_descriptor_pool() -> user_descriptor_pool_call(...)
,simple_database()
->simple_database_call(...)
. - The singleton
FieldCodecManager
has been replaced byFieldCodecManagerLocal
which is owned by each Codec and can be accessed withCodec::manager()
.
Boost no longer a requirement
Boost is no longer required when Units support is not enabled and C++17 is used. If Units is used, boost units
, spirit
, lamda
, and bimap
(all header-only) libraries are required. If C++14 is used, boost any
is required.
Protoc plugin load file
protoc-gen-dccl
can now generate a file that loads all the generated protobufs: See #106.
Protobuf update
Protobuf 3.0.0 or newer is now required.
Consistent code formatting
The entire project is consistently formatted now using clang-format.
OS X support
CircleCI support for Mac OS X builds using Homebrew (Protobuf 3.21).
Bug fixes
Thanks
Thanks to @philboske for significant contributions to this release and @ltoohey for bug reporting.
Release 4.0.3
Resolution tag
New resolution
dccl.field tag that can be used in place of precision
for non-power-of-ten intervals, e.g.,
required double u3 = 5 [
(dccl.field).min = 5.5,
(dccl.field).max = 15.5,
(dccl.field).resolution = 0.5
];
Thanks to @dfenucci for the idea and implementation
Min repeat tag
New min_repeat
dccl.field tag that can be used in conjunction with max_repeat
for repeated fields to set a minimum vector size (defaults to 0 for previous behavior):
Field b
is 2 or 3 elements in length
repeated int32 b = 2 [
(dccl.field) = { min: -100 max: 100 min_repeat: 2 max_repeat: 3 }
]; // min repeat and max repeat different
Thanks to @philboske for the idea
Better reporting of errors
Missing required fields are more clearly pinpointed in the dlog output:
Expected verbose error encoding empty message: Message dccl.test.TestMsg failed to encode. Reason: Message is not properly initialized. All `required` fields must be set. Fields with errors:
21: double_default_required
22: float_default_required
Thanks to @philboske for the idea and implementation.
Release 4.0.2
Fix arm CI builds. No functional changes.
Release 4.0.1
DCCL4 adds support for codec_version = 4 while remaining fully backwards compatible with codec_version = 3 (and codec_version = 2).
New features (enable using codec_version = 4):
- Support for
oneof
types. - Dynamic conditionals using Lua scripting: https://libdccl.org/4.0/idl.html#idl-dynamic-conditions
- Switch default string and bytes codecs to VarBytesCodec which should provide a more intuitive result.
Release 3.0.16
- Fix build with boost 1.75
- Add ability to set and get ID codec after construction and use this to enforce the correct codec in the CCL compat library.
- Update documentation to point to packages.gobysoft.org for compiled binary Debian/Ubuntu packages.
Release 3.0.15
- Fix bug compiling against Boost >= 1.70
- Support for Ubuntu 20.04 "Focal"
Release 3.0.14
Added Python3 support.
Release 3.0.13
- New "dccl.presence" code that wraps the existing v3::DefaultNumericFieldCodec but changes the set/unset from a value to a single bit. This is useful for fields that are frequently not set. Thanks to @kguilbert
- Python build fixes, unified version.txt for both python and C++.