core: rename nfd::EventId to nfd::scheduler::EventId
refs #2298
Change-Id: I5d4f4c5234fd370666e81a8a8e7d312694a6ad5d
diff --git a/core/resolver.hpp b/core/resolver.hpp
index d4dc31c..d144645 100644
--- a/core/resolver.hpp
+++ b/core/resolver.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_CORE_RESOLVER_H
#define NFD_CORE_RESOLVER_H
@@ -199,7 +200,7 @@
private:
resolver m_resolver;
- EventId m_resolveTimeout;
+ scheduler::EventId m_resolveTimeout;
nfd::resolver::AddressSelector m_addressSelector;
SuccessCallback m_onSuccess;
diff --git a/core/scheduler.hpp b/core/scheduler.hpp
index a4b43c1..b846c64 100644
--- a/core/scheduler.hpp
+++ b/core/scheduler.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -94,8 +94,6 @@
} // namespace scheduler
-using scheduler::EventId;
-
} // namespace nfd
#endif // NFD_CORE_SCHEDULER_HPP
diff --git a/daemon/face/ethernet-face.hpp b/daemon/face/ethernet-face.hpp
index ce72a62..7a3d881 100644
--- a/daemon/face/ethernet-face.hpp
+++ b/daemon/face/ethernet-face.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -145,7 +145,7 @@
struct Reassembler
{
unique_ptr<ndnlp::PartialMessageStore> pms;
- EventId expireEvent;
+ scheduler::EventId expireEvent;
};
unique_ptr<pcap_t, void(*)(pcap_t*)> m_pcap;
diff --git a/daemon/face/ndnlp-partial-message-store.hpp b/daemon/face/ndnlp-partial-message-store.hpp
index 1aed1e0..4143107 100644
--- a/daemon/face/ndnlp-partial-message-store.hpp
+++ b/daemon/face/ndnlp-partial-message-store.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -56,7 +56,7 @@
reassemble();
public:
- EventId m_expiry;
+ scheduler::EventId m_expiry;
private:
size_t m_fragCount;
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 01eb07a..69a5241 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -83,9 +83,8 @@
shared_ptr<ip::tcp::socket> clientSocket =
make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
- EventId connectTimeoutEvent = scheduler::schedule(timeout,
- bind(&TcpChannel::handleFailedConnect, this,
- clientSocket, onConnectFailed));
+ scheduler::EventId connectTimeoutEvent = scheduler::schedule(timeout,
+ bind(&TcpChannel::handleFailedConnect, this, clientSocket, onConnectFailed));
clientSocket->async_connect(remoteEndpoint,
bind(&TcpChannel::handleSuccessfulConnect, this, _1,
@@ -106,9 +105,8 @@
shared_ptr<ip::tcp::resolver> resolver =
make_shared<ip::tcp::resolver>(ref(getGlobalIoService()));
- EventId connectTimeoutEvent = scheduler::schedule(timeout,
- bind(&TcpChannel::handleFailedConnect, this,
- clientSocket, onConnectFailed));
+ scheduler::EventId connectTimeoutEvent = scheduler::schedule(timeout,
+ bind(&TcpChannel::handleFailedConnect, this, clientSocket, onConnectFailed));
resolver->async_resolve(query,
bind(&TcpChannel::handleEndpointResolution, this, _1, _2,
@@ -201,7 +199,7 @@
void
TcpChannel::handleSuccessfulConnect(const boost::system::error_code& error,
const shared_ptr<ip::tcp::socket>& socket,
- const EventId& connectTimeoutEvent,
+ const scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const ConnectFailedCallback& onConnectFailed)
{
@@ -249,7 +247,7 @@
TcpChannel::handleEndpointResolution(const boost::system::error_code& error,
ip::tcp::resolver::iterator remoteEndpoint,
const shared_ptr<boost::asio::ip::tcp::socket>& socket,
- const EventId& connectTimeoutEvent,
+ const scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const ConnectFailedCallback& onConnectFailed,
const shared_ptr<ip::tcp::resolver>& resolver)
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index f126a47..f83ca55 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_DAEMON_FACE_TCP_CHANNEL_HPP
#define NFD_DAEMON_FACE_TCP_CHANNEL_HPP
@@ -124,7 +125,7 @@
void
handleSuccessfulConnect(const boost::system::error_code& error,
const shared_ptr<boost::asio::ip::tcp::socket>& socket,
- const EventId& connectTimeoutEvent,
+ const scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const ConnectFailedCallback& onConnectFailed);
@@ -136,7 +137,7 @@
handleEndpointResolution(const boost::system::error_code& error,
boost::asio::ip::tcp::resolver::iterator remoteEndpoint,
const shared_ptr<boost::asio::ip::tcp::socket>& socket,
- const EventId& connectTimeoutEvent,
+ const scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const ConnectFailedCallback& onConnectFailed,
const shared_ptr<boost::asio::ip::tcp::resolver>& resolver);
diff --git a/daemon/face/udp-face.hpp b/daemon/face/udp-face.hpp
index 49c374b..b56b81d 100644
--- a/daemon/face/udp-face.hpp
+++ b/daemon/face/udp-face.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_DAEMON_FACE_UDP_FACE_HPP
#define NFD_DAEMON_FACE_UDP_FACE_HPP
@@ -52,7 +53,7 @@
closeIfIdle();
private:
- EventId m_closeIfIdleEvent;
+ scheduler::EventId m_closeIfIdleEvent;
time::seconds m_idleTimeout;
time::steady_clock::TimePoint m_lastIdleCheck;
};
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index 8abdbac..016dcac 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -120,8 +120,8 @@
m_channelFaces[hdl] = face;
// Schedule PING message
- EventId pingEvent = scheduler::schedule(m_pingInterval,
- bind(&WebSocketChannel::sendPing, this, hdl));
+ scheduler::EventId pingEvent = scheduler::schedule(m_pingInterval,
+ bind(&WebSocketChannel::sendPing, this, hdl));
face->setPingEventId(pingEvent);
}
@@ -145,8 +145,8 @@
NFD_LOG_TRACE("sendPing: to " << it->second->getRemoteUri());
// Schedule next PING message
- EventId pingEvent = scheduler::schedule(m_pingInterval,
- bind(&WebSocketChannel::sendPing, this, hdl));
+ scheduler::EventId pingEvent = scheduler::schedule(m_pingInterval,
+ bind(&WebSocketChannel::sendPing, this, hdl));
it->second->setPingEventId(pingEvent);
}
}
diff --git a/daemon/face/websocket-face.cpp b/daemon/face/websocket-face.cpp
index ad344d1..26c1a25 100644
--- a/daemon/face/websocket-face.cpp
+++ b/daemon/face/websocket-face.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
diff --git a/daemon/face/websocket-face.hpp b/daemon/face/websocket-face.hpp
index 81a1111..56dd015 100644
--- a/daemon/face/websocket-face.hpp
+++ b/daemon/face/websocket-face.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -21,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_DAEMON_FACE_WEBSOCKET_FACE_HPP
#define NFD_DAEMON_FACE_WEBSOCKET_FACE_HPP
@@ -65,7 +65,7 @@
close();
void
- setPingEventId(EventId& id)
+ setPingEventId(scheduler::EventId& id)
{
m_pingEventId = id;
}
@@ -76,7 +76,7 @@
private:
websocketpp::connection_hdl m_handle;
websocket::Server& m_server;
- EventId m_pingEventId;
+ scheduler::EventId m_pingEventId;
bool m_closed;
};
diff --git a/daemon/fw/ncc-strategy.hpp b/daemon/fw/ncc-strategy.hpp
index 14a4696..0c0991f 100644
--- a/daemon/fw/ncc-strategy.hpp
+++ b/daemon/fw/ncc-strategy.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -110,9 +110,9 @@
public:
/// timer that expires when best face does not respond within predicted time
- EventId bestFaceTimeout;
+ scheduler::EventId bestFaceTimeout;
/// timer for propagating to another face
- EventId propagateTimer;
+ scheduler::EventId propagateTimer;
/// maximum interval between forwarding to two nexthops except best and previous
time::microseconds maxInterval;
};
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index 6593ee9..f2dd627 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ENTRY_HPP
#define NFD_DAEMON_TABLE_MEASUREMENTS_ENTRY_HPP
@@ -58,7 +59,7 @@
private: // lifetime
time::steady_clock::TimePoint m_expiry;
- EventId m_cleanup;
+ scheduler::EventId m_cleanup;
shared_ptr<name_tree::Entry> m_nameTreeEntry;
friend class nfd::NameTree;
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 8fcf4a7..6d59ce8 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -164,8 +164,8 @@
hasUnexpiredOutRecords() const;
public:
- EventId m_unsatisfyTimer;
- EventId m_stragglerTimer;
+ scheduler::EventId m_unsatisfyTimer;
+ scheduler::EventId m_stragglerTimer;
private:
shared_ptr<const Interest> m_interest;
diff --git a/rib/face-entry.hpp b/rib/face-entry.hpp
index c9eeb33..a6d468d 100644
--- a/rib/face-entry.hpp
+++ b/rib/face-entry.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -50,12 +50,12 @@
public:
void
- setExpirationEvent(const EventId eid)
+ setExpirationEvent(const scheduler::EventId eid)
{
m_expirationEvent = eid;
}
- const EventId&
+ const scheduler::EventId&
getExpirationEvent() const
{
return m_expirationEvent;
@@ -69,7 +69,7 @@
time::steady_clock::TimePoint expires;
private:
- EventId m_expirationEvent;
+ scheduler::EventId m_expirationEvent;
};
inline bool
diff --git a/rib/remote-registrator.hpp b/rib/remote-registrator.hpp
index 0d9eea3..bdd6ca9 100644
--- a/rib/remote-registrator.hpp
+++ b/rib/remote-registrator.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -222,7 +222,7 @@
* to Route Name. So it needs seperate sotrage instead
* of storing within the RIB.
*/
- typedef std::unordered_map<Name, EventId> RegisteredList;
+ typedef std::unordered_map<Name, scheduler::EventId> RegisteredList;
typedef RegisteredList::iterator RegisteredEntryIt;
typedef RegisteredList::value_type RegisteredEntry;
RegisteredList m_regEntries;
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 7d0f5b3..809b301 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -298,10 +298,8 @@
faceEntry.expires = time::steady_clock::now() + parameters.getExpirationPeriod();
// Schedule a new event, the old one will be cancelled during rib insertion.
- EventId eventId;
- eventId = scheduler::schedule(parameters.getExpirationPeriod(),
- bind(&RibManager::expireEntry,
- this, shared_ptr<Interest>(), parameters));
+ scheduler::EventId eventId = scheduler::schedule(parameters.getExpirationPeriod(),
+ bind(&RibManager::expireEntry, this, shared_ptr<Interest>(), parameters));
NFD_LOG_TRACE("Scheduled unregistration at: " << faceEntry.expires <<
" with EventId: " << eventId);
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index 181d210..e3750b1 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -297,7 +297,7 @@
static const Name FACES_LIST_DATASET_PREFIX;
static const time::seconds ACTIVE_FACE_FETCH_INTERVAL;
- EventId m_activeFaceFetchEvent;
+ scheduler::EventId m_activeFaceFetchEvent;
typedef std::set<uint64_t> FaceIdSet;
/** \brief contains FaceIds with one or more Routes in the RIB
diff --git a/tests/core/scheduler.cpp b/tests/core/scheduler.cpp
index 954c31e..dcafac2 100644
--- a/tests/core/scheduler.cpp
+++ b/tests/core/scheduler.cpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#include "core/scheduler.hpp"
@@ -29,6 +30,9 @@
namespace nfd {
namespace tests {
+using scheduler::EventId;
+using scheduler::ScopedEventId;
+
BOOST_FIXTURE_TEST_SUITE(CoreScheduler, BaseFixture)
class SchedulerFixture : protected BaseFixture
@@ -115,7 +119,7 @@
{
int hit = 0;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit, 0);
@@ -124,7 +128,7 @@
BOOST_FIXTURE_TEST_CASE(ScopedEventIdAssign, UnitTestTimeFixture)
{
int hit1 = 0, hit2 = 0;
- scheduler::ScopedEventId se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit1; });
+ ScopedEventId se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit1; });
se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit2; });
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit1, 0);
@@ -135,7 +139,7 @@
{
int hit = 0;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
se.release();
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
@@ -147,8 +151,8 @@
int hit = 0;
unique_ptr<scheduler::ScopedEventId> se2;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
- se2.reset(new scheduler::ScopedEventId(std::move(se)));
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ se2.reset(new ScopedEventId(std::move(se)));
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit, 1);
diff --git a/tests/limited-io.hpp b/tests/limited-io.hpp
index ee358b0..3e4be61 100644
--- a/tests/limited-io.hpp
+++ b/tests/limited-io.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -102,7 +102,7 @@
UnitTestTimeFixture* m_uttf;
bool m_isRunning;
int m_nOpsRemaining;
- EventId m_timeout;
+ scheduler::EventId m_timeout;
StopReason m_reason;
std::exception m_lastException;
};
diff --git a/tests/rib/remote-registrator.cpp b/tests/rib/remote-registrator.cpp
index c0ef540..ed3181a 100644
--- a/tests/rib/remote-registrator.cpp
+++ b/tests/rib/remote-registrator.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -348,7 +348,7 @@
Name indentity("/remote/register");
remoteRegistrator->m_regEntries.insert(
- nfd::rib::RemoteRegistrator::RegisteredEntry(indentity, EventId()));
+ nfd::rib::RemoteRegistrator::RegisteredEntry(indentity, scheduler::EventId()));
eraseEntryWithIdentity(indentity);
@@ -386,7 +386,7 @@
insertEntryWithIdentity(identity);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));
@@ -412,8 +412,8 @@
Name identityShort("/remote/register");
Name identityLong("/remote/register/long");
- EventId eventShort;
- EventId eventLong;
+ scheduler::EventId eventShort;
+ scheduler::EventId eventLong;
insertEntryWithIdentity(identityShort, name::Component("appA"));
@@ -461,7 +461,7 @@
insertEntryWithIdentity(identity, DEFAULT_APP_NAME, faceId);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));
@@ -488,7 +488,7 @@
insertEntryWithIdentity(identity);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));