DCCL v4
field_codec_default.h
1
// Copyright 2009-2023:
2
// GobySoft, LLC (2013-)
3
// Massachusetts Institute of Technology (2007-2014)
4
// Community contributors (see AUTHORS file)
5
// File authors:
6
// Toby Schneider <toby@gobysoft.org>
7
// Davide Fenucci <davfen@noc.ac.uk>
8
//
9
//
10
// This file is part of the Dynamic Compact Control Language Library
11
// ("DCCL").
12
//
13
// DCCL is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU Lesser General Public License as published by
15
// the Free Software Foundation, either version 2.1 of the License, or
16
// (at your option) any later version.
17
//
18
// DCCL is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU Lesser General Public License for more details.
22
//
23
// You should have received a copy of the GNU Lesser General Public License
24
// along with DCCL. If not, see <http://www.gnu.org/licenses/>.
25
// implements FieldCodecBase for all the basic DCCL types for version 3
26
27
#ifndef DCCLV4FIELDCODECDEFAULT20210701H
28
#define DCCLV4FIELDCODECDEFAULT20210701H
29
30
#include "../codecs3/field_codec_default.h"
31
#include "../codecs3/field_codec_var_bytes.h"
32
33
namespace
dccl
34
{
36
namespace
v4
37
{
38
// all these are the same as version 3
39
template
<
typename
WireType,
typename
FieldType = WireType>
40
using
DefaultNumericFieldCodec
=
v3::DefaultNumericFieldCodec<WireType, FieldType>
;
41
42
using
DefaultBoolCodec
=
v3::DefaultBoolCodec
;
43
using
DefaultEnumCodec
=
v3::DefaultEnumCodec
;
44
45
using
DefaultBytesCodec
=
v3::VarBytesCodec
;
46
using
DefaultStringCodec
=
v3::VarBytesCodec
;
47
48
template
<
typename
TimeType>
using
TimeCodec
=
v3::TimeCodec<TimeType>
;
49
template
<
typename
T>
using
StaticCodec
=
v3::StaticCodec<T>
;
50
51
}
// namespace v4
52
}
// namespace dccl
53
54
#endif
dccl::v2::StaticCodec
Placeholder codec that takes no space on the wire (0 bits).
Definition:
field_codec_default.h:451
dccl
Dynamic Compact Control Language namespace.
Definition:
any.h:46
dccl::v2::TimeCodec
Definition:
field_codec_default.h:435
dccl::v3::VarBytesCodec
Definition:
field_codec_var_bytes.h:36
dccl::v2::DefaultBoolCodec
Provides a bool encoder. Uses 1 bit if field is required, 2 bits if optional
Definition:
field_codec_default.h:253
dccl::v3::DefaultEnumCodec
Provides an enum encoder. This converts the enumeration to an integer and uses DefaultNumericFieldCod...
Definition:
field_codec_default.h:55
dccl::v2::DefaultNumericFieldCodec
Provides a basic bounded arbitrary length numeric (double, float, uint32, uint64, int32,...
Definition:
field_codec_default.h:51
dccl
codecs4
field_codec_default.h
Generated on Tue May 21 2024 20:13:33 for DCCL v4 by
1.8.17