A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
event-id.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2005 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef EVENT_ID_H
21
#define EVENT_ID_H
22
23
#include <stdint.h>
24
#include "
ptr.h
"
25
#include "
event-impl.h
"
26
33
namespace
ns3 {
34
35
class
EventImpl;
36
53
class
EventId
{
54
public
:
56
EventId
();
65
EventId
(
const
Ptr<EventImpl>
&impl, uint64_t ts, uint32_t context, uint32_t uid);
70
void
Cancel
(
void
);
76
bool
IsExpired
(
void
)
const
;
82
bool
IsRunning
(
void
)
const
;
83
public
:
91
EventImpl
*
PeekEventImpl
(
void
)
const
;
93
uint64_t
GetTs
(
void
)
const
;
95
uint32_t
GetContext
(
void
)
const
;
97
uint32_t
GetUid
(
void
)
const
;
100
private
:
107
friend
bool
operator ==
(
const
EventId
&a,
const
EventId
&b);
114
friend
bool
operator !=
(
const
EventId
&a,
const
EventId
&b);
115
116
Ptr<EventImpl>
m_eventImpl
;
117
uint64_t
m_ts
;
118
uint32_t
m_context
;
119
uint32_t
m_uid
;
120
};
121
122
bool
operator ==
(
const
EventId
&a,
const
EventId
&b);
123
bool
operator !=
(
const
EventId
&a,
const
EventId
&b);
124
125
}
// namespace ns3
126
127
#endif
/* EVENT_ID_H */
ns3::EventId::m_uid
uint32_t m_uid
The unique id.
Definition:
event-id.h:119
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
event-impl.h
ns3::EventImpl declarations.
ns3::EventId::m_ts
uint64_t m_ts
The virtual time stamp.
Definition:
event-id.h:117
ptr.h
Smart pointer implementation.
ns3::EventId::IsRunning
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition:
event-id.cc:65
ns3::EventId::PeekEventImpl
EventImpl * PeekEventImpl(void) const
Definition:
event-id.cc:71
ns3::EventId::EventId
EventId()
Default constructor.
Definition:
event-id.cc:35
ns3::EventId::GetUid
uint32_t GetUid(void) const
Definition:
event-id.cc:89
ns3::EventId::m_eventImpl
Ptr< EventImpl > m_eventImpl
The underlying event implementation.
Definition:
event-id.h:116
ns3::EventId::operator!=
friend bool operator!=(const EventId &a, const EventId &b)
Test if two EventId's are not equal.
Definition:
event-id.cc:103
ns3::operator==
bool operator==(const BleAccessAddress &a, const BleAccessAddress &b)
Definition:
ble-access-address.h:160
ns3::operator!=
bool operator!=(const BleAccessAddress &a, const BleAccessAddress &b)
Definition:
ble-access-address.h:164
ns3::EventImpl
A simulation event.
Definition:
event-impl.h:44
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:53
ns3::EventId::Cancel
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition:
event-id.cc:53
ns3::EventId::GetContext
uint32_t GetContext(void) const
Definition:
event-id.cc:83
ns3::EventId::operator==
friend bool operator==(const EventId &a, const EventId &b)
Test if two EventId's are equal.
Definition:
event-id.cc:95
ns3::EventId::IsExpired
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
Definition:
event-id.cc:59
ns3::EventId::GetTs
uint64_t GetTs(void) const
Definition:
event-id.cc:77
ns3::EventId::m_context
uint32_t m_context
The context.
Definition:
event-id.h:118
src
core
model
event-id.h
Generated on Wed Jul 6 2016 17:11:26 for ns-3 by
1.8.6