blob: cbb54ad0ccb81815165db94118c516d3f7a1677b [file] [log] [blame]
Alexander Afanasyev19426ef2011-11-23 20:55:28 -08001// /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2// /*
3// * Copyright (c) 2011 University of California, Los Angeles
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: Ilya Moiseenko <iliamo@cs.ucla.edu>
19// */
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070020
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080021// #include "ns3/application.h"
22// #include "ns3/log.h"
23// #include "ns3/random-variable.h"
24// #include "ns3/nstime.h"
25// #include "ns3/event-id.h"
26// #include "ns3/ptr.h"
27// #include "ns3/simulator.h"
28// #include "ns3/ccnx-interest-header.h"
29// #include "ns3/ccnx-local-face.h"
30// #include "ns3/ccnx-name-components.h"
31// #include "ns3/packet.h"
32// #include "ns3/boolean.h"
33// #include "ns3/integer.h"
34// #include "ns3/uinteger.h"
35// #include "ns3/random-variable.h"
36// #include <limits>
37// #include "ns3/pointer.h"
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070038
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080039// namespace ns3
40// {
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070041
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080042// class Socket;
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070043
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080044// class CcnxInterestSender: public Application
45// {
46// public:
47// static TypeId GetTypeId (void);
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070048
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080049// CcnxInterestSender ();
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070050
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080051// virtual ~CcnxInterestSender ();
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070052
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080053// protected:
54// virtual void DoDispose (void);
55// private:
56// // inherited from Application base class.
57// virtual void StartApplication (void); // Called at time specified by Start
58// virtual void StopApplication (void); // Called at time specified by Stop
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070059
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080060// //Time m_onTime;
61// Time m_offTime;
62// CcnxNameComponents m_interestName;
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070063
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080064// Time m_interestLifeTime;
65// int32_t m_minSuffixComponents;
66// int32_t m_maxSuffixComponents;
67// bool m_childSelector;
68// CcnxNameComponents m_exclude;
69// uint32_t m_initialNonce;
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070070
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080071// //EventId m_startStopEvent; // Event id for next start or stop event
72// EventId m_sendEvent; // Eventid of pending "send packet" event
73// TypeId m_tid;
74// Ptr<CcnxLocalFace> m_face;
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070075
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080076// //helpers
77// void CancelEvents ();
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070078
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080079// void Construct (Ptr<Node> n,
80// std::string tid,
81// const Time& offtime,
82// Ptr<CcnxLocalFace> face,
83// Ptr<CcnxNameComponents> nameComponents,
84// const Time& lifetime,
85// const int32_t& minSuffixComponents,
86// const int32_t& maxSuffixComponents,
87// const bool childSelector,
88// Ptr<CcnxNameComponents> exclude,
89// const uint32_t& initialNonce
90// );
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070091
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080092// // Event handlers
93// void StartSending ();
94// void StopSending ();
95// void SendPacket ();
Ilya Moiseenkoc706f262011-08-22 19:50:49 -070096
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080097// private:
98// void ScheduleNextTx ();
99// //void ScheduleStartEvent ();
100// //void ScheduleStopEvent ();
101// void ConnectionSucceeded (Ptr<Socket>);
102// void ConnectionFailed (Ptr<Socket>);
103// void Ignore (Ptr<Socket>);
Ilya Moiseenkoc706f262011-08-22 19:50:49 -0700104
Alexander Afanasyev19426ef2011-11-23 20:55:28 -0800105// };
106// }