blob: ca43a5d3851d489834e3c9c2036ec9e832408cba [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:
38 CcnxPathWeightTracer (std::ostream &os, Ptr<Node> node, std::string appId);
39 virtual ~CcnxPathWeightTracer () { };
40
41 void
42 Connect ();
43
44 virtual void
45 PrintHeader (std::ostream &os) const;
46
47 /**
48 * \brief Process packet weight upon reception of packet on a local face
49 */
50 virtual void
51 InLocalFace (std::string context,
52 uint32_t weight, Ptr<Node> src, Ptr<Node> dst);
53
54protected:
55 std::ostream &m_os;
56 std::string m_node;
57 Ptr<Node> m_nodePtr;
58 std::string m_appId;
59};
60
61} // namespace ns3
62
63#endif // CCNX_PATH_WEIGHT_TRACER_H