24 #ifndef GOBY_MIDDLEWARE_FRONTSEAT_WAVEGLIDER_WAVEGLIDER_SV2_CODECS_H
25 #define GOBY_MIDDLEWARE_FRONTSEAT_WAVEGLIDER_WAVEGLIDER_SV2_CODECS_H
27 #include <dccl/bitset.h>
28 #include <dccl/common.h>
29 #include <dccl/field_codec.h>
30 #include <dccl/field_codec_fixed.h>
31 #include <dccl/field_codec_id.h>
64 unsigned size(
const dccl::uint32& )
override {
return size(); }
66 unsigned max_size()
override {
return size(); }
68 unsigned min_size()
override {
return size(); }
71 template <
typename Integer>
class SV2NumericCodec :
public dccl::TypedFixedFieldCodec<Integer>
74 unsigned size()
override
76 dccl::uint64 v = dccl::FieldCodecBase::dccl_field_options().max() + 1;
88 b.from<Integer>(i, size());
92 Integer decode(
dccl::Bitset* bits)
override {
return bits->to<Integer>(); }
94 void validate()
override {}