NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
face-event-notification.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_MGMT_NFD_FACE_EVENT_NOTIFICATION_HPP
23
#define NDN_MGMT_NFD_FACE_EVENT_NOTIFICATION_HPP
24
25
#include "
face-traits.hpp
"
26
#include "../../encoding/block.hpp"
27
28
namespace
ndn
{
29
namespace
nfd
{
30
34
enum
FaceEventKind
{
35
FACE_EVENT_CREATED
= 1,
36
FACE_EVENT_DESTROYED
= 2,
37
FACE_EVENT_UP
= 3,
38
FACE_EVENT_DOWN
= 4
39
};
40
46
class
FaceEventNotification
:
public
FaceTraits
<FaceEventNotification>
47
{
48
public
:
49
FaceEventNotification
();
50
51
explicit
52
FaceEventNotification
(
const
Block
& block);
53
56
template
<encoding::Tag TAG>
57
size_t
58
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
59
62
const
Block
&
63
wireEncode
()
const
;
64
67
void
68
wireDecode
(
const
Block
& wire);
69
70
public
:
// getters & setters
71
FaceEventKind
72
getKind
()
const
73
{
74
return
m_kind;
75
}
76
77
FaceEventNotification
&
78
setKind
(
FaceEventKind
kind);
79
80
protected
:
81
void
82
wireReset
()
const
;
83
84
private
:
85
FaceEventKind
m_kind;
86
87
mutable
Block
m_wire;
88
};
89
90
std::ostream&
91
operator<<
(std::ostream& os,
const
FaceEventNotification
& notification);
92
93
}
// namespace nfd
94
}
// namespace ndn
95
96
#endif // NDN_MGMT_NFD_FACE_EVENT_NOTIFICATION_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::FACE_EVENT_UP
face went UP (from DOWN state)
Definition:
face-event-notification.hpp:37
ndn::nfd::FACE_EVENT_DESTROYED
face destroyed
Definition:
face-event-notification.hpp:36
ndn::nfd::FaceEventNotification
represents a Face status change notification
Definition:
face-event-notification.hpp:46
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::nfd::FaceEventNotification::setKind
FaceEventNotification & setKind(FaceEventKind kind)
Definition:
face-event-notification.cpp:165
ndn::nfd::FaceEventNotification::FaceEventNotification
FaceEventNotification()
Definition:
face-event-notification.cpp:36
ndn::nfd::FACE_EVENT_CREATED
face created
Definition:
face-event-notification.hpp:35
ndn::nfd::FaceEventNotification::wireReset
void wireReset() const
Definition:
face-event-notification.cpp:173
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::nfd::FaceEventNotification::getKind
FaceEventKind getKind() const
Definition:
face-event-notification.hpp:72
face-traits.hpp
ndn::nfd::operator<<
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Definition:
nfd-constants.cpp:30
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::nfd::FaceEventKind
FaceEventKind
Definition:
face-event-notification.hpp:34
ndn::nfd::FaceTraits
providers getters and setters of face information fields
Definition:
face-traits.hpp:36
ndn::nfd::FaceEventNotification::wireEncode
const Block & wireEncode() const
encode FaceEventNotification
Definition:
face-event-notification.cpp:75
ndn::nfd::FaceEventNotification::wireDecode
void wireDecode(const Block &wire)
decode FaceEventNotification
Definition:
face-event-notification.cpp:91
ndn::nfd::FACE_EVENT_DOWN
face went DOWN (from UP state)
Definition:
face-event-notification.hpp:38
ndnSIM
ndn-cxx
src
mgmt
nfd
face-event-notification.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13