23 #include "waveglider_sv2_frontseat_driver.pb.h" 25 #include <dccl/field_codec_id.h> 29 void dccl3_load(dccl::Codec*
dccl);
30 void dccl3_unload(dccl::Codec*
dccl);
40 dccl::Bitset encode() {
return encode(0); }
42 dccl::Bitset encode(
const dccl::uint32& wire_value)
44 return dccl::Bitset(size(), wire_value - 0x7E0000);
47 dccl::uint32 decode(dccl::Bitset* bits) {
return 0x7E0000 + bits->to<dccl::uint32>(); }
49 unsigned size() {
return 2 * dccl::BITS_IN_BYTE; }
51 unsigned size(
const dccl::uint32& field_value) {
return size(); }
53 unsigned max_size() {
return size(); }
55 unsigned min_size() {
return size(); }
58 template <
typename Integer>
class SV2NumericCodec :
public dccl::TypedFixedFieldCodec<Integer>
63 dccl::uint64 v = dccl::FieldCodecBase::dccl_field_options().max() + 1;
69 dccl::Bitset encode() {
return dccl::Bitset(size()); }
72 dccl::Bitset encode(
const Integer& i)
75 b.from<Integer>(i, size());
79 Integer decode(dccl::Bitset* bits) {
return bits->to<Integer>(); }
The global namespace for the Goby project.