blob: f4bd18766772c1510fe2275e04b2f7ffd222ae50 [file] [log] [blame]
Alexander Afanasyeve9c9d722012-01-19 16:59:30 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2011 UCLA
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: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 */
20
21#ifndef CCNX_PATH_WEIGHT_TRACER_H
22#define CCNX_PATH_WEIGHT_TRACER_H
23
24#include "ns3/ptr.h"
25#include "ns3/simple-ref-count.h"
26#include "ns3/ccnx-path-stretch-tag.h"
27#include <list>
28
29namespace ns3 {
30
31class Node;
32class Packet;
33class CcnxApp;
34
35class CcnxPathWeightTracer : public SimpleRefCount<CcnxPathWeightTracer>
36{
37public:
Alexander Afanasyev8e0d2812012-01-19 22:38:14 -080038 CcnxPathWeightTracer (std::ostream &os, Ptr<Node> node);
Alexander Afanasyeve9c9d722012-01-19 16:59:30 -080039 virtual ~CcnxPathWeightTracer () { };
40
41 void
42 Connect ();
43
Alexander Afanasyev6bff0df2012-01-19 17:51:52 -080044 static void
45 PrintHeader (std::ostream &os);
Alexander Afanasyeve9c9d722012-01-19 16:59:30 -080046
47 /**
48 * \brief Process packet weight upon reception of packet on a local face
49 */
50 virtual void
51 InLocalFace (std::string context,
Alexander Afanasyev6bff0df2012-01-19 17:51:52 -080052 Ptr<Node> src, Ptr<Node> dst, uint32_t seqno, uint32_t weight);
Alexander Afanasyeve9c9d722012-01-19 16:59:30 -080053
54protected:
55 std::ostream &m_os;
56 std::string m_node;
57 Ptr<Node> m_nodePtr;
Alexander Afanasyeve9c9d722012-01-19 16:59:30 -080058};
59
60} // namespace ns3
61
62#endif // CCNX_PATH_WEIGHT_TRACER_H