Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 1 | /** -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 2 | /* |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Alexander Afanasyev |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 5 | * |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 6 | * BSD license, See the doc/LICENSE file for more information |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 7 | * |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 8 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 9 | */ |
| 10 | |
| 11 | #ifndef NDN_COMMON_H |
| 12 | #define NDN_COMMON_H |
| 13 | |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 14 | #include "ns3/nstime.h" |
| 15 | #include "ns3/simulator.h" |
| 16 | |
| 17 | #define NDNSIM_MODE 1 |
| 18 | |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 19 | #define NDN_NAMESPACE_BEGIN \ |
| 20 | namespace ns3 { \ |
| 21 | namespace ndn { |
| 22 | #define NDN_NAMESPACE_END \ |
| 23 | } /*ndn*/ \ |
| 24 | } /*ns3*/ |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 25 | |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 26 | /** |
| 27 | * @brief NS-3 namespace |
| 28 | */ |
| 29 | namespace ns3 { |
| 30 | |
| 31 | /** |
| 32 | * @brief ndnSIM namespace |
| 33 | */ |
| 34 | namespace ndn { |
| 35 | } |
Alexander Afanasyev | 7920651 | 2013-07-27 16:49:12 -0700 | [diff] [blame] | 36 | } |
| 37 | |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 38 | NDN_NAMESPACE_BEGIN |
| 39 | |
| 40 | typedef Time TimeInterval; |
| 41 | |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 42 | namespace time { |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 43 | |
| 44 | inline Time |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 45 | NowUnixTimestamp() |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 46 | { |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame^] | 47 | return Simulator::Now(); |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 48 | } |
Alexander Afanasyev | 9213601 | 2013-07-16 20:36:30 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | NDN_NAMESPACE_END |
| 52 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 53 | #endif // NDN_COMMON_H |