blob: ce3a834f18fb2aec2018ab636a1a3ce08ac72ae6 [file] [log] [blame]
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
* ndn-cxx library is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received copies of the GNU General Public License and GNU Lesser
* General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
* <http://www.gnu.org/licenses/>.
*
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
*/
#ifndef NDN_CXX_LP_FIELDS_HPP
#define NDN_CXX_LP_FIELDS_HPP
#include "field-decl.hpp"
#include "sequence.hpp"
#include "cache-policy.hpp"
#include "nack-header.hpp"
#include "prefix-announcement.hpp"
#include <boost/mpl/set.hpp>
namespace ndn {
namespace lp {
typedef FieldDecl<field_location_tags::Header,
Sequence,
tlv::Sequence> SequenceField;
BOOST_CONCEPT_ASSERT((Field<SequenceField>));
typedef FieldDecl<field_location_tags::Header,
uint64_t,
tlv::FragIndex> FragIndexField;
BOOST_CONCEPT_ASSERT((Field<FragIndexField>));
typedef FieldDecl<field_location_tags::Header,
uint64_t,
tlv::FragCount> FragCountField;
BOOST_CONCEPT_ASSERT((Field<FragCountField>));
typedef FieldDecl<field_location_tags::Header,
NackHeader,
tlv::Nack> NackField;
BOOST_CONCEPT_ASSERT((Field<NackField>));
typedef FieldDecl<field_location_tags::Header,
uint64_t,
tlv::NextHopFaceId> NextHopFaceIdField;
BOOST_CONCEPT_ASSERT((Field<NextHopFaceIdField>));
typedef FieldDecl<field_location_tags::Header,
CachePolicy,
tlv::CachePolicy> CachePolicyField;
BOOST_CONCEPT_ASSERT((Field<CachePolicyField>));
typedef FieldDecl<field_location_tags::Header,
uint64_t,
tlv::IncomingFaceId> IncomingFaceIdField;
BOOST_CONCEPT_ASSERT((Field<IncomingFaceIdField>));
typedef FieldDecl<field_location_tags::Header,
uint64_t,
tlv::CongestionMark> CongestionMarkField;
BOOST_CONCEPT_ASSERT((Field<CongestionMarkField>));
typedef FieldDecl<field_location_tags::Header,
Sequence,
tlv::Ack,
true> AckField;
BOOST_CONCEPT_ASSERT((Field<AckField>));
typedef FieldDecl<field_location_tags::Header,
Sequence,
tlv::TxSequence> TxSequenceField;
BOOST_CONCEPT_ASSERT((Field<TxSequenceField>));
typedef FieldDecl<field_location_tags::Header,
EmptyValue,
tlv::NonDiscovery> NonDiscoveryField;
BOOST_CONCEPT_ASSERT((Field<NonDiscoveryField>));
typedef FieldDecl<field_location_tags::Header,
PrefixAnnouncement,
tlv::PrefixAnnouncement> PrefixAnnouncementField;
BOOST_CONCEPT_ASSERT((Field<PrefixAnnouncementField>));
/**
* The value of the wire encoded field is the data between the provided iterators. During
* encoding, the data is copied from the Buffer into the wire buffer.
*/
typedef FieldDecl<field_location_tags::Fragment,
std::pair<Buffer::const_iterator, Buffer::const_iterator>,
tlv::Fragment> FragmentField;
BOOST_CONCEPT_ASSERT((Field<FragmentField>));
/**
* \brief set of all field declarations
*/
typedef boost::mpl::set<
FragmentField,
SequenceField,
FragIndexField,
FragCountField,
NackField,
NextHopFaceIdField,
CachePolicyField,
IncomingFaceIdField,
CongestionMarkField,
AckField,
TxSequenceField,
NonDiscoveryField,
PrefixAnnouncementField
> FieldSet;
} // namespace lp
} // namespace ndn
#endif // NDN_CXX_LP_FIELDS_HPP