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 "sequence.hpp"
28 #include "cache-policy.hpp"
29 #include "nack-header.hpp"
30 #include "prefix-announcement.hpp"
31 
32 #include <boost/mpl/set.hpp>
33 
34 namespace ndn {
35 namespace lp {
36 
37 typedef FieldDecl<field_location_tags::Header,
38  Sequence,
40 BOOST_CONCEPT_ASSERT((Field<SequenceField>));
41 
42 typedef FieldDecl<field_location_tags::Header,
43  uint64_t,
45 BOOST_CONCEPT_ASSERT((Field<FragIndexField>));
46 
47 typedef FieldDecl<field_location_tags::Header,
48  uint64_t,
50 BOOST_CONCEPT_ASSERT((Field<FragCountField>));
51 
52 typedef FieldDecl<field_location_tags::Header,
53  NackHeader,
55 BOOST_CONCEPT_ASSERT((Field<NackField>));
56 
57 typedef FieldDecl<field_location_tags::Header,
58  uint64_t,
60 BOOST_CONCEPT_ASSERT((Field<NextHopFaceIdField>));
61 
62 typedef FieldDecl<field_location_tags::Header,
65 BOOST_CONCEPT_ASSERT((Field<CachePolicyField>));
66 
67 typedef FieldDecl<field_location_tags::Header,
68  uint64_t,
70 BOOST_CONCEPT_ASSERT((Field<IncomingFaceIdField>));
71 
72 typedef FieldDecl<field_location_tags::Header,
73  uint64_t,
75 BOOST_CONCEPT_ASSERT((Field<CongestionMarkField>));
76 
77 typedef FieldDecl<field_location_tags::Header,
78  Sequence,
79  tlv::Ack,
80  true> AckField;
81 BOOST_CONCEPT_ASSERT((Field<AckField>));
82 
83 typedef FieldDecl<field_location_tags::Header,
84  Sequence,
86 BOOST_CONCEPT_ASSERT((Field<TxSequenceField>));
87 
88 typedef FieldDecl<field_location_tags::Header,
89  EmptyValue,
91 BOOST_CONCEPT_ASSERT((Field<NonDiscoveryField>));
92 
93 typedef FieldDecl<field_location_tags::Header,
96 BOOST_CONCEPT_ASSERT((Field<PrefixAnnouncementField>));
102  std::pair<Buffer::const_iterator, Buffer::const_iterator>,
104 BOOST_CONCEPT_ASSERT((Field<FragmentField>));
105 
109 typedef boost::mpl::set<
114  NackField,
119  AckField,
122  PrefixAnnouncementField
123  > FieldSet;
124 
125 } // namespace lp
126 } // namespace ndn
127 
128 #endif // NDN_CXX_LP_FIELDS_HPP
Copyright (c) 2013-2017 Regents of the University of California.
Definition: common.hpp:66
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:104
FieldDecl< field_location_tags::Header, uint64_t, tlv::IncomingFaceId > IncomingFaceIdField
Definition: fields.hpp:65
FieldDecl< field_location_tags::Header, uint64_t, tlv::CongestionMark > CongestionMarkField
Definition: fields.hpp:70
FieldDecl< field_location_tags::Header, PrefixAnnouncement, tlv::PrefixAnnouncement > PrefixAnnouncementField
Definition: fields.hpp:91
FieldDecl< field_location_tags::Header, EmptyValue, tlv::NonDiscovery > NonDiscoveryField
Definition: fields.hpp:86
uint64_t Sequence
represents a sequence number
Definition: sequence.hpp:35
FieldDecl< field_location_tags::Header, Sequence, tlv::Ack, true > AckField
Definition: fields.hpp:75
FieldDecl< field_location_tags::Header, Sequence, tlv::TxSequence > TxSequenceField
Definition: fields.hpp:81
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragIndex > FragIndexField
Definition: fields.hpp:40
FieldDecl< field_location_tags::Header, uint64_t, tlv::FragCount > FragCountField
Definition: fields.hpp:45
concept check for fields
Definition: field.hpp:61
represents a zero-length TLV-VALUE
Definition: empty-value.hpp:33
FieldDecl< field_location_tags::Header, NackHeader, tlv::Nack > NackField
Definition: fields.hpp:50
FieldDecl< field_location_tags::Header, Sequence, tlv::Sequence > SequenceField
Definition: fields.hpp:39
represents a Network NACK header
Definition: nack-header.hpp:59
FieldDecl< field_location_tags::Header, CachePolicy, tlv::CachePolicy > CachePolicyField
Definition: fields.hpp:60
FieldDecl< field_location_tags::Fragment, std::pair< Buffer::const_iterator, Buffer::const_iterator >, tlv::Fragment > FragmentField
The value of the wire encoded field is the data between the provided iterators.
Definition: fields.hpp:96
FieldDecl< field_location_tags::Header, uint64_t, tlv::NextHopFaceId > NextHopFaceIdField
Definition: fields.hpp:55