blob: 0e74e97bdfa0b850376b312127daf24ed3977d0b [file] [log] [blame]
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
Alexander Afanasyev45b92d42011-08-14 23:11:38 -07002/*
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -07003 * Copyright (c) 2011 University of California, Los Angeles
Alexander Afanasyev45b92d42011-08-14 23:11:38 -07004 *
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 *
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070018 * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070019 */
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070020
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070021#include "ns3/node.h"
22#include "ns3/node-list.h"
23#include "ns3/simulator.h"
Alexander Afanasyevc74a6022011-08-15 20:01:35 -070024#include "ns3/ccnx-forwarding-strategy.h"
Ilya Moiseenko82b8eea2011-11-02 23:08:47 -070025#include "ns3/ccnx-bestroute-strategy.h"
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070026#include "ccnx-forwarding-helper.h"
27
28namespace ns3 {
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070029
Alexander Afanasyev11453142011-11-25 16:13:33 -080030CcnxForwardingHelper::CcnxForwardingHelper ()
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070031{
Ilya Moiseenko25f7d4d2011-09-29 18:41:06 -070032}
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080033
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070034// void
35// CcnxForwardingHelper::PrintForwardingTableAllAt (Time printTime, Ptr<OutputStreamWrapper> stream) const
36// {
37// for (uint32_t i = 0; i < NodeList::GetNNodes (); i++)
38// {
39// Ptr<Node> node = NodeList::GetNode (i);
40// Simulator::Schedule (printTime, &CcnxForwardingHelper::Print, this, node, stream);
41// }
42// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070043
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070044// void
45// CcnxForwardingHelper::PrintForwardingTableAllEvery (Time printInterval, Ptr<OutputStreamWrapper> stream) const
46// {
47// for (uint32_t i = 0; i < NodeList::GetNNodes (); i++)
48// {
49// Ptr<Node> node = NodeList::GetNode (i);
50// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
51// }
52// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070053
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070054// void
55// CcnxForwardingHelper::PrintForwardingTableAt (Time printTime, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
56// {
57// Simulator::Schedule (printTime, &CcnxForwardingHelper::Print, this, node, stream);
58// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070059
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070060// void
61// CcnxForwardingHelper::PrintForwardingTableEvery (Time printInterval,Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
62// {
63// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
64// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070065
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070066// void
67// CcnxForwardingHelper::Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
68// {
69// Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
70// Ptr<CcnxForwardingStrategy> rp = ccnx->GetForwardingStrategy ();
71// NS_ASSERT (rp);
72// rp->PrintForwardingTable (stream);
73// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070074
Alexander Afanasyevcf133f02011-09-06 12:13:48 -070075// void
76// CcnxForwardingHelper::PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const
77// {
78// Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
79// Ptr<CcnxForwardingStrategy> rp = ccnx->GetForwardingStrategy ();
80// NS_ASSERT (rp);
81// rp->PrintForwardingTable (stream);
82// Simulator::Schedule (printInterval, &CcnxForwardingHelper::PrintEvery, this, printInterval, node, stream);
83// }
Alexander Afanasyev45b92d42011-08-14 23:11:38 -070084
85} // namespace ns3