GobySoft / dccl

Dynamic Compact Control Language
Other
17 stars 13 forks source link

Add custom clock to TimeCodec. Improve codec search by trying version as well #128

Closed tsaubergine closed 10 months ago

tsaubergine commented 10 months ago

Fixes #121 : New base class TimeCodecClock 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). Fixes #129 : Cleans up process of loading default codecs so that we can version each codec. Now the find logic for codecs tries both the base name (e.g. "dccl.static") and the name with the codec_version appended (e.g., "dccl.static4"). The versioned name is tried first so it takes precedence if it exists.