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-2018 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 
25 #include "field-decl.hpp"
26 
27 #include "cache-policy.hpp"
28 #include "nack-header.hpp"
29 #include "prefix-announcement.hpp"
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  NackHeader,
60 BOOST_CONCEPT_ASSERT((Field<NackField>));
61 
62 typedef FieldDecl<field_location_tags::Header,
63  uint64_t,
65  false,
66  NonNegativeIntegerTag,
67  NonNegativeIntegerTag> NextHopFaceIdField;
68 BOOST_CONCEPT_ASSERT((Field<NextHopFaceIdField>));
69 
70 typedef FieldDecl<field_location_tags::Header,
73 BOOST_CONCEPT_ASSERT((Field<CachePolicyField>));
74 
75 typedef FieldDecl<field_location_tags::Header,
76  uint64_t,
78  false,
79  NonNegativeIntegerTag,
80  NonNegativeIntegerTag> IncomingFaceIdField;
81 BOOST_CONCEPT_ASSERT((Field<IncomingFaceIdField>));
82 
83 typedef FieldDecl<field_location_tags::Header,
84  uint64_t,
86  false,
87  NonNegativeIntegerTag,
88  NonNegativeIntegerTag> CongestionMarkField;
89 BOOST_CONCEPT_ASSERT((Field<CongestionMarkField>));
90 
91 typedef FieldDecl<field_location_tags::Header,
92  Sequence,
93  tlv::Ack,
94  true> AckField;
95 BOOST_CONCEPT_ASSERT((Field<AckField>));
96 
97 typedef FieldDecl<field_location_tags::Header,
98  Sequence,
100 BOOST_CONCEPT_ASSERT((Field<TxSequenceField>));
101 
102 typedef FieldDecl<field_location_tags::Header,
103  EmptyValue,
105 BOOST_CONCEPT_ASSERT((Field<NonDiscoveryField>));
106 
107 typedef FieldDecl<field_location_tags::Header,
110 BOOST_CONCEPT_ASSERT((Field<PrefixAnnouncementField>));
111 
118  std::pair<Buffer::const_iterator, Buffer::const_iterator>,
120 BOOST_CONCEPT_ASSERT((Field<FragmentField>));
121 
124 typedef boost::mpl::set<
129  NackField,
134  AckField,
137  PrefixAnnouncementField
138  > FieldSet;
139 
140 } // namespace lp
141 } // namespace ndn
142 
143 #endif // NDN_CXX_LP_FIELDS_HPP
FieldDecl< field_location_tags::Header, uint64_t, tlv::CongestionMark, false, NonNegativeIntegerTag, NonNegativeIntegerTag > CongestionMarkField
Definition: fields.hpp:81
Copyright (c) 2013-2017 Regents of the University of California.
Definition: common.hpp:66
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:60
boost::mpl::set< FragmentField, SequenceField, FragIndexField, FragCountField, NackField, NextHopFaceIdField, CachePolicyField, IncomingFaceIdField, CongestionMarkField, AckField, TxSequenceField, NonDiscoveryField, PrefixAnnouncementField > FieldSet
Set of all field declarations.
Definition: fields.hpp:120
FieldDecl< field_location_tags::Header, uint64_t, tlv::IncomingFaceId, false, NonNegativeIntegerTag, NonNegativeIntegerTag > IncomingFaceIdField
Definition: fields.hpp:73
FieldDecl< field_location_tags::Header, PrefixAnnouncement, tlv::PrefixAnnouncement > PrefixAnnouncementField
Definition: fields.hpp:105
FieldDecl< field_location_tags::Header, EmptyValue, tlv::NonDiscovery > NonDiscoveryField
Definition: fields.hpp:100
uint64_t Sequence
represents a sequence number
Definition: sequence.hpp:35
FieldDecl< field_location_tags::Header, Sequence, tlv::Ack, true > AckField
Definition: fields.hpp:89
FieldDecl< field_location_tags::Header, Sequence, tlv::TxSequence > TxSequenceField
Definition: fields.hpp:95
Declare a field.
Definition: field-decl.hpp:178
concept check for fields
Definition: field.hpp:61
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:55
FieldDecl< field_location_tags::Header, Sequence, tlv::Sequence > SequenceField
Definition: fields.hpp:38
represents a Network NACK header
Definition: nack-header.hpp:59
FieldDecl< field_location_tags::Header, CachePolicy, tlv::CachePolicy > CachePolicyField
Definition: fields.hpp:68
FieldDecl< field_location_tags::Fragment, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::Fragment > FragmentField
Declare the Fragment field.
Definition: fields.hpp:110