Skip to content

Release 4.2.0

Compare
Choose a tag to compare
@tsaubergine tsaubergine released this 30 Oct 05:01
· 14 commits to 4.0 since this release

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