LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2012,2014 University of Zagreb | 3 * Copyright (c) 2012,2014 University of Zagreb |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Vedran Miletić <rivanvx@gmail.com> | 18 * Author: Vedran Miletić <rivanvx@gmail.com> |
19 */ | 19 */ |
20 | 20 |
21 #ifndef FAILED_WORKING_TIME_TRACKER_H | 21 #ifndef FAILURE_REPAIR_TIME_TRACKER_H |
22 #define»FAILED_WORKING_TIME_TRACKER_H | 22 #define FAILURE_REPAIR_TIME_TRACKER_H |
23 | 23 |
24 #include <ns3/time-unit-information.h> | |
25 #include <ns3/event-id.h> | 24 #include <ns3/event-id.h> |
26 #include <ns3/nstime.h> | 25 #include <ns3/nstime.h> |
27 #include <ns3/ptr.h> | 26 #include <ns3/ptr.h> |
28 #include <ns3/object.h> | 27 #include <ns3/object.h> |
29 | 28 |
30 #include <string> | 29 #include <string> |
31 | 30 |
32 namespace ns3 | 31 namespace ns3 |
33 { | 32 { |
34 | 33 |
35 /** | 34 /** |
36 * \ingroup core | 35 * \ingroup core |
37 * \defgroup startstop | 36 * \defgroup startstop |
38 */ | 37 */ |
39 /** | 38 /** |
40 * \ingroup startstop | 39 * \ingroup startstop |
41 * \brief Started and stopped time tracker | 40 * \brief Started and stopped time tracker |
42 * | 41 * |
43 * Started and stopped time tracker can be bound to an object and used to track | 42 * Started and stopped time tracker can be bound to an object and used to track |
44 * the object state changes. | 43 * the object state changes. |
45 */ | 44 */ |
46 class FailureRepairTimeTracker : public Object | 45 class FailureRepairTimeTracker : public Object |
47 { | 46 { |
48 public: | 47 public: |
49 static TypeId GetTypeId (void); | 48 static TypeId GetTypeId (void); |
50 FailureRepairTimeTracker (); | 49 FailureRepairTimeTracker (); |
51 virtual ~FailureRepairTimeTracker (); | 50 virtual ~FailureRepairTimeTracker (); |
52 | |
53 /** | |
54 * \brief FIXME | |
55 */ | |
56 void SetTimeUnit (Time::Unit unit); | |
57 ·· | |
58 /** | |
59 * \brief FIXME | |
60 */ | |
61 Time::Unit GetTimeUnit (void) const; | |
62 | 51 |
63 /** | 52 /** |
64 * This method attaches StartedStoppedTimeTracker to an Object. | 53 * This method attaches StartedStoppedTimeTracker to an Object. |
65 * | 54 * |
66 * Note that StartedStoppedTimeTracker can be bound to only one object, i.e. | 55 * Note that StartedStoppedTimeTracker can be bound to only one object, i.e. |
67 * trying to attach it to two objects will produce an error. | 56 * trying to attach it to two objects will produce an error. |
68 * | 57 * |
69 * \param obj pointer to Object which StartedStoppedTimeTracker will track | 58 * \param obj pointer to Object which StartedStoppedTimeTracker will track |
70 * \param traceName FIXME | 59 * \param traceName FIXME |
71 * \sa NotifyNewAggregate | 60 * \sa NotifyNewAggregate |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual void DoDispose (); | 109 virtual void DoDispose (); |
121 ·· | 110 ·· |
122 enum TrackedEventType | 111 enum TrackedEventType |
123 { | 112 { |
124 FAILURE, | 113 FAILURE, |
125 REPAIR, | 114 REPAIR, |
126 UNKNOWN | 115 UNKNOWN |
127 }; | 116 }; |
128 ·· | 117 ·· |
129 private: | 118 private: |
130 TimeUnitInformation m_timeInfo; | |
131 | |
132 TrackedEventType m_lastEventType; | 119 TrackedEventType m_lastEventType; |
133 Time m_lastEventTime; | 120 Time m_lastEventTime; |
134 Time m_totalTimeStarted; | 121 Time m_totalTimeStarted; |
135 Time m_totalTimeStopped; | 122 Time m_totalTimeStopped; |
136 | 123 |
137 Ptr<Object> m_object; | 124 Ptr<Object> m_object; |
138 std::string m_failureTraceName; | 125 std::string m_failureTraceName; |
139 std::string m_repairTraceName; | 126 std::string m_repairTraceName; |
140 }; | 127 }; |
141 | 128 |
142 } // namespace ns3 | 129 } // namespace ns3 |
143 | 130 |
144 #endif» /* FAILED_WORKING_TIME_TRACKER_H */ | 131 #endif /* FAILURE_REPAIR_TIME_TRACKER_H */ |
LEFT | RIGHT |