blob: e321b643efee2bc3b45dd586d3708f8199abcf5b [file] [log] [blame]
Alexander Afanasyevb3e4b852011-12-23 15:58:20 -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_AGGREGATE_APP_TRACER_H
22#define CCNX_AGGREGATE_APP_TRACER_H
23
24#include "ns3/ccnx-app-tracer.h"
25
26namespace ns3 {
27
28class CcnxAggregateAppTracer : public CcnxAppTracer
29{
30public:
31 CcnxAggregateAppTracer (const std::string &app, Ptr<Node> node, const std::string &appId = "*");
32 CcnxAggregateAppTracer (const std::string &app, const std::string &node, const std::string &appId = "*");
33 virtual ~CcnxAggregateAppTracer () { };
34
35 virtual void
36 PrintHeader (std::ostream &os) const;
37
38 virtual void
39 Print (std::ostream &os) const;
40
41 virtual void
42 OutInterests (std::string context,
43 Ptr<const CcnxInterestHeader>, Ptr<CcnxApp>, Ptr<CcnxFace>);
44
45 virtual void
46 InInterests (std::string context,
47 Ptr<const CcnxInterestHeader>, Ptr<CcnxApp>, Ptr<CcnxFace>);
48
49 virtual void
50 InNacks (std::string context,
51 Ptr<const CcnxInterestHeader>, Ptr<CcnxApp>, Ptr<CcnxFace>);
52
53 virtual void
54 OutData (std::string context,
55 Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<CcnxApp>, Ptr<CcnxFace>);
56
57 virtual void
58 InData (std::string context,
59 Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<CcnxApp>, Ptr<CcnxFace>);
60
61protected:
62 void
63 Reset ();
64
65protected:
66 uint64_t m_inInterests;
67 uint64_t m_outInterests;
68 uint64_t m_inNacks;
69 uint64_t m_inData;
70 uint64_t m_outData;
71
72 uint64_t m_inInterestsBytes;
73 uint64_t m_outInterestsBytes;
74 uint64_t m_inNacksBytes;
75 uint64_t m_inDataBytes;
76 uint64_t m_outDataBytes;
77};
78
79} // namespace ns3
80
81#endif // CCNX_AGGREGATE_APP_TRACER_H