fields.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013-2019 Regents of the University of California.
4  *
5  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6  *
7  * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License as published by the Free Software
9  * Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13  * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14  *
15  * You should have received copies of the GNU General Public License and GNU Lesser
16  * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17  * <http://www.gnu.org/licenses/>.
18  *
19  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20  */
21 
22 #ifndef NDN_CXX_LP_FIELDS_HPP
23 #define NDN_CXX_LP_FIELDS_HPP
24 
26 
30 
31 #include <boost/mpl/set.hpp>
32 
33 namespace ndn {
34 namespace lp {
35 
36 typedef FieldDecl<field_location_tags::Header,
37  Sequence,
39 BOOST_CONCEPT_ASSERT((Field<SequenceField>));
40 
41 typedef FieldDecl<field_location_tags::Header,
42  uint64_t,
44  false,
45  NonNegativeIntegerTag,
46  NonNegativeIntegerTag> FragIndexField;
47 BOOST_CONCEPT_ASSERT((Field<FragIndexField>));
48 
49 typedef FieldDecl<field_location_tags::Header,
50  uint64_t,
52  false,
53  NonNegativeIntegerTag,
54  NonNegativeIntegerTag> FragCountField;
55 BOOST_CONCEPT_ASSERT((Field<FragCountField>));
56 
57 typedef FieldDecl<field_location_tags::Header,
58  std::pair<Buffer::const_iterator, Buffer::const_iterator>,
60 BOOST_CONCEPT_ASSERT((Field<PitTokenField>));
61 
62 typedef FieldDecl<field_location_tags::Header,
63  NackHeader,
65 BOOST_CONCEPT_ASSERT((Field<NackField>));
66 
67 typedef FieldDecl<field_location_tags::Header,
68  uint64_t,
70  false,
71  NonNegativeIntegerTag,
72  NonNegativeIntegerTag> NextHopFaceIdField;
73 BOOST_CONCEPT_ASSERT((Field<NextHopFaceIdField>));
74 
75 typedef FieldDecl<field_location_tags::Header,
78 BOOST_CONCEPT_ASSERT((Field<CachePolicyField>));
79 
80 typedef FieldDecl<field_location_tags::Header,
81  uint64_t,
83  false,
84  NonNegativeIntegerTag,
85  NonNegativeIntegerTag> IncomingFaceIdField;
86 BOOST_CONCEPT_ASSERT((Field<IncomingFaceIdField>));
87 
88 typedef FieldDecl<field_location_tags::Header,
89  uint64_t,
91  false,
92  NonNegativeIntegerTag,
93  NonNegativeIntegerTag> CongestionMarkField;
94 BOOST_CONCEPT_ASSERT((Field<CongestionMarkField>));
95 
96 typedef FieldDecl<field_location_tags::Header,
97  Sequence,
98  tlv::Ack,
99  true> AckField;
100 BOOST_CONCEPT_ASSERT((Field<AckField>));
101 
102 typedef FieldDecl<field_location_tags::Header,
103  Sequence,
105 BOOST_CONCEPT_ASSERT((Field<TxSequenceField>));
106 
107 typedef FieldDecl<field_location_tags::Header,
108  EmptyValue,
110 BOOST_CONCEPT_ASSERT((Field<NonDiscoveryField>));
111 
112 typedef FieldDecl<field_location_tags::Header,
115 BOOST_CONCEPT_ASSERT((Field<PrefixAnnouncementField>));
116 
123  std::pair<Buffer::const_iterator, Buffer::const_iterator>,
125 BOOST_CONCEPT_ASSERT((Field<FragmentField>));
126 
129 typedef boost::mpl::set<
135  NackField,
140  AckField,
143  PrefixAnnouncementField
144  > FieldSet;
145 
146 } // namespace lp
147 } // namespace ndn
148 
149 #endif // NDN_CXX_LP_FIELDS_HPP
FieldDecl< field_location_tags::Header, uint64_t, tlv::CongestionMark, false, NonNegativeIntegerTag, NonNegativeIntegerTag > CongestionMarkField
Definition: fields.hpp:86
Definition: data.cpp:26
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragCount, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragCountField
Definition: fields.hpp:47
FieldDecl< field_location_tags::Header, uint64_t, tlv::NextHopFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > NextHopFaceIdField
Definition: fields.hpp:65
FieldDecl< field_location_tags::Header, uint64_t, tlv::IncomingFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > IncomingFaceIdField
Definition: fields.hpp:78
boost::mpl::set< FragmentField, SequenceField, FragIndexField, FragCountField, PitTokenField, NackField, NextHopFaceIdField, IncomingFaceIdField, CachePolicyField, CongestionMarkField, AckField, TxSequenceField, NonDiscoveryField, PrefixAnnouncementField > FieldSet
Set of all field declarations.
Definition: fields.hpp:125
FieldDecl< field_location_tags::Header, EmptyValue, tlv::NonDiscovery > NonDiscoveryField
Definition: fields.hpp:105
uint64_t Sequence
represents a sequence number
Definition: sequence.hpp:35
FieldDecl< field_location_tags::Header, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::PitToken > PitTokenField
Definition: fields.hpp:55
FieldDecl< field_location_tags::Header, Sequence, tlv::Ack, true > AckField
Definition: fields.hpp:94
FieldDecl< field_location_tags::Header, Sequence, tlv::TxSequence > TxSequenceField
Definition: fields.hpp:100
Declare a field.
Definition: field-decl.hpp:179
represents a PrefixAnnouncement header field in NDNLP
concept check for fields
Definition: field.hpp:61
FieldDecl< field_location_tags::Header, PrefixAnnouncementHeader, tlv::PrefixAnnouncement > PrefixAnnouncementField
Definition: fields.hpp:110
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragIndex, false, NonNegativeIntegerTag, NonNegativeIntegerTag > FragIndexField
Definition: fields.hpp:39
represents a zero-length TLV-VALUE
Definition: empty-value.hpp:33
FieldDecl< field_location_tags::Header, NackHeader, tlv::Nack > NackField
Definition: fields.hpp:60
FieldDecl< field_location_tags::Header, Sequence, tlv::Sequence > SequenceField
Definition: fields.hpp:38
represents a Network NACK header
Definition: nack-header.hpp:57
FieldDecl< field_location_tags::Header, CachePolicy, tlv::CachePolicy > CachePolicyField
Definition: fields.hpp:73
FieldDecl< field_location_tags::Fragment, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::Fragment > FragmentField
Declare the Fragment field.
Definition: fields.hpp:115