blob: 8f01194069dc71f28ccd0b63c56f3aabbc3b3317 [file] [log] [blame]
Alexander Afanasyev45b92d42011-08-14 23:11:38 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2008 INRIA
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19 */
20#include "ns3/node.h"
21#include "ns3/node-list.h"
22#include "ns3/simulator.h"
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070023#include "ns3/ccnx-forwarding-strategy.h"
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070024#include "ccnx-forwarding-helper.h"
25
26namespace ns3 {
27
28CcnxForwardingHelper::~CcnxForwardingHelper ()
29{
30}
31
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070032// void
33// CcnxForwardingHelper::PrintForwardingTableAllAt (Time printTime, Ptr<OutputStreamWrapper> stream) const
34// {
35// for (uint32_t i = 0; i < NodeList::GetNNodes (); i++)
36// {
37// Ptr<Node> node = NodeList::GetNode (i);
38// Simulator::Schedule (printTime, &CcnxForwardingHelper::Print, this, node, stream);
39// }
40// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070041
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070042// void
43// CcnxForwardingHelper::PrintForwardingTableAllEvery (Time printInterval, Ptr<OutputStreamWrapper> stream) const
44// {
45// for (uint32_t i = 0; i < NodeList::GetNNodes (); i++)
46// {
47// Ptr<Node> node = NodeList::GetNode (i);
48// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
49// }
50// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070051
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070052// void
53// CcnxForwardingHelper::PrintForwardingTableAt (Time printTime, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
54// {
55// Simulator::Schedule (printTime, &CcnxForwardingHelper::Print, this, node, stream);
56// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070057
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070058// void
59// CcnxForwardingHelper::PrintForwardingTableEvery (Time printInterval,Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
60// {
61// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
62// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070063
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070064// void
65// CcnxForwardingHelper::Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
66// {
67// Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
68// Ptr<CcnxForwardingStrategy> rp = ccnx->GetForwardingStrategy ();
69// NS_ASSERT (rp);
70// rp->PrintForwardingTable (stream);
71// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070072
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070073// void
74// CcnxForwardingHelper::PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
75// {
76// Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
77// Ptr<CcnxForwardingStrategy> rp = ccnx->GetForwardingStrategy ();
78// NS_ASSERT (rp);
79// rp->PrintForwardingTable (stream);
80// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
81// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070082
83} // namespace ns3