change yans namespace to ns3
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
static double
|
||||
cb_one (double a, double b)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "ns3/event.tcc"
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
class MyModel {
|
||||
public:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "ns3/chunk.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
/* A sample Chunk implementation
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "ns3/simulator.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
class MyModel {
|
||||
public:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "ns3/pcap-writer.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
PacketLogger a;
|
||||
UiTracedVariable<unsigned short> b;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//#define TRACE(x) std::cout << x << std::endl;
|
||||
#define TRACE(x)
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Buffer::BufferDataList Buffer::m_free_list;
|
||||
uint32_t Buffer::m_max_total_add_start = 0;
|
||||
@@ -109,12 +109,12 @@ Buffer::create (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
void
|
||||
@@ -372,7 +372,7 @@ Buffer::peek_data (void) const
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
@@ -380,7 +380,7 @@ Buffer::peek_data (void) const
|
||||
#include "ns3/test.h"
|
||||
#include <iomanip>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class BufferTest: public Test {
|
||||
private:
|
||||
@@ -588,7 +588,7 @@ BufferTest::run_tests (void)
|
||||
|
||||
static BufferTest g_buffer_test;
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief automatically resized byte buffer
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
* byte buffer.
|
||||
*
|
||||
* The returned pointer points to an area of
|
||||
* memory which is yans::Buffer::get_size () bytes big.
|
||||
* memory which is ns3::Buffer::get_size () bytes big.
|
||||
* Please, try to never ever use this method. It is really
|
||||
* evil and is present only for a few specific uses.
|
||||
*/
|
||||
@@ -353,11 +353,11 @@ private:
|
||||
uint32_t m_size;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Buffer::Buffer ()
|
||||
: m_data (Buffer::create ()),
|
||||
@@ -684,7 +684,7 @@ Buffer::Iterator::read (uint8_t *buffer, uint16_t size)
|
||||
m_current += size;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* BUFFER_H */
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
#include "ns3/callback.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class CallbackLoggerBase {};
|
||||
|
||||
/**
|
||||
* \brief log arbitrary number of parameters to a matching yans:Callback
|
||||
* \brief log arbitrary number of parameters to a matching ns3::Callback
|
||||
*
|
||||
* Whenever operator () is invoked on this class, the call and its arguments
|
||||
* are forwarded to the internal matching yans::Callback.
|
||||
* are forwarded to the internal matching ns3::Callback.
|
||||
*/
|
||||
template<typename T1 = empty, typename T2 = empty,
|
||||
typename T3 = empty, typename T4 = empty,
|
||||
@@ -79,6 +79,6 @@ private:
|
||||
Callback<void,T1,T2,T3,T4,T5> m_callback;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* CALLBACK_LOGGER_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "chunk-constant-data.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
ChunkConstantData::ChunkConstantData (uint32_t len, uint8_t data)
|
||||
: m_len (len), m_data (data)
|
||||
@@ -60,4 +60,4 @@ ChunkConstantData::remove_from (Buffer *buffer)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "chunk.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
class ChunkConstantData : public Chunk {
|
||||
@@ -42,6 +42,6 @@ private:
|
||||
uint8_t m_data;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* CHUNK_CONSTANT_DATA_H */
|
||||
|
||||
@@ -34,7 +34,7 @@ std::cout << "CHUNK LLCSNAP TRACE " << Simulator::now_s () << " " << x << std::e
|
||||
#endif /* TRACE_CHUNK_LLC_SNAP */
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
ChunkLlcSnap::ChunkLlcSnap ()
|
||||
{}
|
||||
@@ -91,4 +91,4 @@ ChunkLlcSnap::remove_from (Buffer *buffer)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "chunk.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class ChunkLlcSnap : public Chunk {
|
||||
public:
|
||||
@@ -50,6 +50,6 @@ private:
|
||||
uint16_t m_ether_type;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* CHUNK_LLC_SNAP_H */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "chunk-utils.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
void write_to (Buffer::Iterator &i, Ipv4Address ad)
|
||||
{
|
||||
@@ -46,4 +46,4 @@ void read_from (Buffer::Iterator &i, MacAddress &ad)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ipv4-address.h"
|
||||
#include "mac-address.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
void write_to (Buffer::Iterator &i, Ipv4Address ad);
|
||||
void write_to (Buffer::Iterator &i, MacAddress ad);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "chunk.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Chunk::Chunk ()
|
||||
: m_must_peek_before_remove (false) {}
|
||||
@@ -62,4 +62,4 @@ std::ostream& operator<< (std::ostream& os, Chunk const& chunk)
|
||||
return os;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <ostream>
|
||||
#include "buffer.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief Protocol header serialization and deserialization.
|
||||
@@ -84,6 +84,6 @@ private:
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, Chunk const& chunk);
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* CHUNK_H */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef COUNT_PTR_HOLDER_TCC
|
||||
#define COUNT_PTR_HOLDER_TCC
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename T>
|
||||
class CountPtrHolder {
|
||||
@@ -65,6 +65,6 @@ make_const_count_ptr_holder (T *t) {
|
||||
return CountPtrHolder<T const> (t);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* REF_HOLDER_TCC */
|
||||
|
||||
@@ -42,7 +42,7 @@ std::cout << "DATA WRITER TRACE " << this << " " << x << std::endl;
|
||||
#define BUFFER_SIZE (4096)
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class DataWriterPrivate {
|
||||
public:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class DataWriterPrivate;
|
||||
|
||||
@@ -39,6 +39,6 @@ private:
|
||||
DataWriterPrivate *m_priv;
|
||||
};
|
||||
|
||||
}; //namespace yans
|
||||
}; //namespace ns3
|
||||
|
||||
#endif /* DATA_WRITER_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class FTracedVariableBase {
|
||||
public:
|
||||
@@ -53,6 +53,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* F_TRACED_VARIABLE_TCC */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "utils.h"
|
||||
#include "ipv4-address.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Ipv4Mask::Ipv4Mask ()
|
||||
: m_mask (0x66666666)
|
||||
@@ -200,4 +200,4 @@ std::ostream& operator<< (std::ostream& os, Ipv4Mask const& mask)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include <ostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/* Ipv4 addresses are stored in host order in
|
||||
* this class.
|
||||
@@ -102,6 +102,6 @@ public:
|
||||
};
|
||||
bool operator != (Ipv4Address const &a, Ipv4Address const &b);
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* IPV4_ADDRESS_H */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "ipv4-network-interface.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Ipv4NetworkInterface::~Ipv4NetworkInterface ()
|
||||
{}
|
||||
@@ -79,4 +79,4 @@ Ipv4NetworkInterface::forward_up (Packet packet)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
#include "packet.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Packet;
|
||||
|
||||
@@ -54,6 +54,6 @@ private:
|
||||
Ipv4Mask m_mask;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* IPV4_NETWORK_INTERFACE */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "mac-network-interface.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
uint32_t
|
||||
LlcSnapEncapsulation::get_overhead (void) const
|
||||
@@ -86,4 +86,4 @@ LlcSnapEncapsulation::receive (Packet packet, MacNetworkInterface *interface)
|
||||
}
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "mac-address.h"
|
||||
#include "packet.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class MacNetworkInterface;
|
||||
|
||||
@@ -47,6 +47,6 @@ private:
|
||||
MacNetworkInterface *m_interface;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* LLC_SNAP_ENCAPSULATION */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "mac-address-factory.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
MacAddressFactory::MacAddressFactory ()
|
||||
{
|
||||
@@ -43,4 +43,4 @@ MacAddressFactory::get_next (void)
|
||||
return MacAddress (m_addr);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "mac-address.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class MacAddressFactory {
|
||||
public:
|
||||
@@ -35,6 +35,6 @@ private:
|
||||
uint8_t m_index;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* MAC_ADDRESS_FACTORY_H */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "mac-address.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
MacAddress::MacAddress ()
|
||||
{
|
||||
@@ -184,4 +184,4 @@ std::ostream& operator<< (std::ostream& os, MacAddress const& address)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include <ostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class MacAddress {
|
||||
public:
|
||||
@@ -67,6 +67,6 @@ bool operator < (MacAddress const&a, MacAddress const&b);
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, MacAddress const& address);
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* MAC_ADDRESS_H */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "mac-network-interface.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
MacNetworkInterface::MacNetworkInterface (MacAddress self, uint16_t max_mtu)
|
||||
: m_self (self), m_max_mtu (max_mtu), m_mtu (max_mtu)
|
||||
@@ -93,4 +93,4 @@ MacNetworkInterface::notify_status_change (void)
|
||||
m_status_change_callback (this);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "mac-address.h"
|
||||
#include "packet.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class MacNetworkInterface {
|
||||
public:
|
||||
@@ -63,6 +63,6 @@ private:
|
||||
bool m_is_down;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* MAC_NETWORK_INTERFACE_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "packet-logger.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
PacketLogger::PacketLogger ()
|
||||
{}
|
||||
@@ -38,5 +38,5 @@ PacketLogger::set_callback (PacketLoggerCallback callback)
|
||||
m_callback = callback;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
#include "packet.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief log packets
|
||||
@@ -48,6 +48,6 @@ private:
|
||||
PacketLoggerCallback m_callback;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* PACKET_LOGGER_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "packet.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Packet::Packet ()
|
||||
: m_buffer () {}
|
||||
@@ -124,4 +124,4 @@ Packet::remove_all_tags (void)
|
||||
m_tags.remove_all ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "tags.h"
|
||||
#include "ns3/callback.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Packet {
|
||||
public:
|
||||
@@ -60,9 +60,9 @@ private:
|
||||
Tags m_tags;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename T>
|
||||
void Packet::add_tag (T const*tag)
|
||||
@@ -85,6 +85,6 @@ bool Packet::update_tag (T const*tag)
|
||||
return m_tags.update (tag);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* PACKET_H */
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "packet.h"
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
enum {
|
||||
PCAP_ETHERNET = 1
|
||||
@@ -96,4 +96,4 @@ PcapWriter::write_16 (uint16_t data)
|
||||
m_writer->write ((uint8_t*)&data, 2);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <stdint.h>
|
||||
#include "packet.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemFile;
|
||||
|
||||
@@ -68,6 +68,6 @@ private:
|
||||
Callback<void,uint8_t *,uint32_t> m_write_callback;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* PCAP_WRITER_H */
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
http://cutebugs.net/code/treegrowth-stable.
|
||||
*/
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
PopulationAnalysis::PopulationAnalysis ()
|
||||
{
|
||||
@@ -91,4 +91,4 @@ PopulationAnalysis::get_unbiased_variance (void)
|
||||
return m_square_sum / (m_n - 1);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class PopulationAnalysis {
|
||||
public:
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
uint32_t m_n;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* POPULATION_ANALYSIS_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "position.h"
|
||||
#include <math.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
Position::~Position ()
|
||||
{}
|
||||
@@ -44,4 +44,4 @@ Position::get_distance_from (Position const*position) const
|
||||
return sqrt (dx*dx+dy*dy+dz*dz);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef POSITION_H
|
||||
#define POSITION_H
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Position {
|
||||
public:
|
||||
@@ -33,6 +33,6 @@ private:
|
||||
virtual void real_get (double &x, double &y, double &z) const = 0;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* POSITION_H */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef REF_PTR_H
|
||||
#define REF_PTR_H
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename T>
|
||||
class RefPtr {
|
||||
@@ -134,6 +134,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* REF_PTR_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "seed-generator.h"
|
||||
#include "rng-mrg32k3a.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SeedGeneratorPrivate {
|
||||
public:
|
||||
@@ -58,4 +58,4 @@ SeedGenerator::get (void)
|
||||
return SeedGeneratorPrivate::get ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SeedGeneratorPrivate;
|
||||
|
||||
@@ -35,6 +35,6 @@ private:
|
||||
SeedGenerator ();
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* SEED_GENERATOR_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SiTracedVariableBase {
|
||||
public:
|
||||
@@ -66,12 +66,12 @@ class UiTracedVariable;
|
||||
*
|
||||
* To instantiate a 32-bit signed variable (to store
|
||||
* a TCP counter for example), you would create a variable of type
|
||||
* yans::UiTracedVariable<int32_t> :
|
||||
* ns3::UiTracedVariable<int32_t> :
|
||||
\code
|
||||
#include <stdint.h>
|
||||
#include "ns3/si-traced-variable.tcc"
|
||||
|
||||
yans::SiTracedVariable<uint16_t> var;
|
||||
ns3::SiTracedVariable<uint16_t> var;
|
||||
\endcode
|
||||
* and you would use it like any other variable of type int32_t:
|
||||
\code
|
||||
@@ -232,6 +232,6 @@ SiTracedVariable<T> &operator ^= (SiTracedVariable<T> &lhs, U const &rhs) {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* TRACED_VARIABLE_TCC */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "static-position.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
StaticPosition::StaticPosition ()
|
||||
: m_x (0.0), m_y (0.0), m_z (0.0)
|
||||
@@ -43,4 +43,4 @@ StaticPosition::real_get (double &x, double &y, double &z) const
|
||||
z = m_z;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "position.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class StaticPosition : public Position {
|
||||
public:
|
||||
@@ -38,6 +38,6 @@ private:
|
||||
double m_z;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* STATIC_POSITION_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "static-speed-position.h"
|
||||
#include "ns3/simulator.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
StaticSpeedPosition::StaticSpeedPosition ()
|
||||
: m_x (0.0),
|
||||
@@ -65,4 +65,4 @@ StaticSpeedPosition::real_get (double &x, double &y, double &z) const
|
||||
z = m_z;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdint.h>
|
||||
#include "position.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class StaticSpeedPosition : public Position {
|
||||
public:
|
||||
@@ -46,6 +46,6 @@ private:
|
||||
mutable uint64_t m_prev_us;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* STATIC_SPEED_POSITION */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "tags.h"
|
||||
#include <string.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
TagsPrettyPrinterRegistry::PrettyPrinters TagsPrettyPrinterRegistry::g_pretty_printers;
|
||||
|
||||
@@ -174,7 +174,7 @@ Tags::pretty_print (std::ostream &os)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
|
||||
@@ -182,7 +182,7 @@ Tags::pretty_print (std::ostream &os)
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class TagsTest : Test {
|
||||
public:
|
||||
@@ -316,7 +316,7 @@ TagsTest::run_tests (void)
|
||||
static TagsTest g_tags_test;
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename T>
|
||||
class TagPrettyPrinter;
|
||||
@@ -110,13 +110,13 @@ private:
|
||||
};
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* The TypeUid class is used to create a mapping Type --> uid
|
||||
@@ -287,6 +287,6 @@ Tags::remove_all (void)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* TAGS_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <utility>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
TraceContainer::TraceContainer ()
|
||||
{}
|
||||
@@ -158,11 +158,11 @@ TraceContainer::register_callback (char const *name, CallbackLoggerBase *logger)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#include <iostream>
|
||||
void
|
||||
yans::TraceContainer::print_debug (void)
|
||||
ns3::TraceContainer::print_debug (void)
|
||||
{
|
||||
if (!m_ui_list.empty ()) {
|
||||
std::cout << "ui var: " << std::endl;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class PacketLogger;
|
||||
class TraceStream;
|
||||
@@ -45,12 +45,12 @@ class TraceStream;
|
||||
* model trace event sources.
|
||||
*
|
||||
* TraceContainer can be used to register the following event sources:
|
||||
* - yans::PacketLogger : can be connected to yans::PcapWriter
|
||||
* - yans::TraceStream : can be connected to any std::ostream
|
||||
* - yans::CallbackLogger: can be connected to yans::Callback
|
||||
* - yans::UiTracedVariable
|
||||
* - yans::SiTracedVariable
|
||||
* - yans::FTracedVariable
|
||||
* - ns3::PacketLogger : can be connected to ns3::PcapWriter
|
||||
* - ns3::TraceStream : can be connected to any std::ostream
|
||||
* - ns3::CallbackLogger: can be connected to ns3::Callback
|
||||
* - ns3::UiTracedVariable
|
||||
* - ns3::SiTracedVariable
|
||||
* - ns3::FTracedVariable
|
||||
*
|
||||
* The following sample code shows how you can:
|
||||
* - create trace event sources
|
||||
@@ -214,13 +214,13 @@ private:
|
||||
CallbackList m_callback_list;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#ifndef NDEBUG
|
||||
#include <cassert>
|
||||
#endif
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename T1>
|
||||
void
|
||||
@@ -294,6 +294,6 @@ TraceContainer::set_callback (char const *name, Callback<void,T1,T2,T3,T4,T5> ca
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* TRACED_VARIABLE_CONTAINER_H */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
class TestTraceStream : public yans::Test {
|
||||
class TestTraceStream : public ns3::Test {
|
||||
public:
|
||||
TestTraceStream ();
|
||||
virtual bool run_tests (void);
|
||||
@@ -42,7 +42,7 @@ bool
|
||||
TestTraceStream::run_tests (void)
|
||||
{
|
||||
bool ok = true;
|
||||
yans::TraceStream trace;
|
||||
ns3::TraceStream trace;
|
||||
//trace.set_stream (&std::cout);
|
||||
trace << 1;
|
||||
trace << " X ";
|
||||
@@ -63,6 +63,6 @@ TestTraceStream::run_tests (void)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief log arbitrary data to std::ostreams
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
std::ostream *m_os;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* TRACE_STREAM_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Foo {
|
||||
public:
|
||||
@@ -247,6 +247,6 @@ TracedVariableTest::TracedVariableTest ()
|
||||
|
||||
static TracedVariableTest g_traced_variable_test;
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/callback.h"
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class UiTracedVariableBase {
|
||||
public:
|
||||
@@ -69,12 +69,12 @@ class SiTracedVariable;
|
||||
*
|
||||
* To instantiate a 32-bit unsigned variable (to store
|
||||
* a TCP counter for example), you would create a variable of type
|
||||
* yans::UiTracedVariable<uint32_t> :
|
||||
* ns3::UiTracedVariable<uint32_t> :
|
||||
\code
|
||||
#include <stdint.h>
|
||||
#include "ns3/ui-traced-variable.tcc"
|
||||
|
||||
yans::UiTracedVariable<uint32_t> var;
|
||||
ns3::UiTracedVariable<uint32_t> var;
|
||||
\endcode
|
||||
* and you would use it like any other variable of type uint32_t:
|
||||
\code
|
||||
@@ -234,6 +234,6 @@ UiTracedVariable<T> &operator ^= (UiTracedVariable<T> &lhs, U const &rhs) {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* UI_TRACED_VARIABLE_TCC */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
uint16_t
|
||||
utils_hton_16 (uint16_t v)
|
||||
@@ -156,12 +156,12 @@ utils_checksum_complete (uint16_t checksum)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
#include "ns3/test.h"
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class UtilsTest : public Test {
|
||||
public:
|
||||
@@ -289,5 +289,5 @@ UtilsTest::run_tests (void)
|
||||
return ok;
|
||||
}
|
||||
static UtilsTest g_utils_test;
|
||||
}; //namespace yans
|
||||
}; //namespace ns3
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
uint16_t utils_hton_16 (uint16_t v);
|
||||
uint32_t utils_hton_32 (uint32_t v);
|
||||
@@ -38,6 +38,6 @@ void ascii_to_mac_network (char const *str, uint8_t address[6]);
|
||||
uint16_t utils_checksum_calculate (uint16_t checksum, uint8_t *buffer, uint16_t size);
|
||||
uint16_t utils_checksum_complete (uint16_t checksum);
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* UTILS_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
static bool g_test5 = false;
|
||||
static bool g_test6 = false;
|
||||
@@ -47,7 +47,7 @@ int test7 (int a)
|
||||
return a;
|
||||
}
|
||||
|
||||
class CallbackTest : public yans::Test {
|
||||
class CallbackTest : public ns3::Test {
|
||||
private:
|
||||
bool m_test1;
|
||||
bool m_test2;
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
};
|
||||
|
||||
CallbackTest::CallbackTest ()
|
||||
: yans::Test ("Callback"),
|
||||
: ns3::Test ("Callback"),
|
||||
m_test1 (false),
|
||||
m_test2 (false),
|
||||
m_test3 (false),
|
||||
@@ -133,13 +133,13 @@ CallbackTest::run_tests (void)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
typedef yans::Callback<void> A;
|
||||
typedef yans::Callback<int> B;
|
||||
typedef yans::Callback<void, double> C;
|
||||
typedef yans::Callback<int, double, int> D;
|
||||
typedef yans::Callback<void> E;
|
||||
typedef yans::Callback<void,int> F;
|
||||
typedef yans::Callback<int,int> G;
|
||||
typedef ns3::Callback<void> A;
|
||||
typedef ns3::Callback<int> B;
|
||||
typedef ns3::Callback<void, double> C;
|
||||
typedef ns3::Callback<int, double, int> D;
|
||||
typedef ns3::Callback<void> E;
|
||||
typedef ns3::Callback<void,int> F;
|
||||
typedef ns3::Callback<int,int> G;
|
||||
|
||||
A a0 (this, &CallbackTest::test1);
|
||||
B b0;
|
||||
@@ -164,13 +164,13 @@ CallbackTest::run_tests (void)
|
||||
|
||||
reset ();
|
||||
|
||||
A a1 = yans::make_callback (&CallbackTest::test1, this);
|
||||
B b1 = yans::make_callback (&CallbackTest::test2, this);
|
||||
C c1 = yans::make_callback (&CallbackTest::test3, this);
|
||||
D d1 = yans::make_callback (&CallbackTest::test4, this);
|
||||
E e1 = yans::make_callback (&test5);
|
||||
F f1 = yans::make_callback (&test6);
|
||||
G g1 = yans::make_callback (&test7);
|
||||
A a1 = ns3::make_callback (&CallbackTest::test1, this);
|
||||
B b1 = ns3::make_callback (&CallbackTest::test2, this);
|
||||
C c1 = ns3::make_callback (&CallbackTest::test3, this);
|
||||
D d1 = ns3::make_callback (&CallbackTest::test4, this);
|
||||
E e1 = ns3::make_callback (&test5);
|
||||
F f1 = ns3::make_callback (&test6);
|
||||
G g1 = ns3::make_callback (&test7);
|
||||
|
||||
a1 ();
|
||||
b1 ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "reference-list.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/***
|
||||
* \internal
|
||||
@@ -512,7 +512,7 @@ Callback<R,T1,T2,T3,T4,T5> make_bound_callback (R (*fn_ptr) (TX,T1,T2,T3,T4,T5),
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* CALLBACK_H */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <vector>
|
||||
#include "callback.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class ExecCommandsPrivate;
|
||||
|
||||
|
||||
@@ -48,20 +48,20 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class RefTest : public yans::Test {
|
||||
class RefTest : public ns3::Test {
|
||||
public:
|
||||
RefTest ();
|
||||
virtual bool run_tests (void);
|
||||
private:
|
||||
void test (yans::ReferenceList<A *>);
|
||||
void test (ns3::ReferenceList<A *>);
|
||||
};
|
||||
|
||||
RefTest::RefTest ()
|
||||
: yans::Test ("ReferenceList")
|
||||
: ns3::Test ("ReferenceList")
|
||||
{}
|
||||
|
||||
void
|
||||
RefTest::test (yans::ReferenceList<A *> a)
|
||||
RefTest::test (ns3::ReferenceList<A *> a)
|
||||
{
|
||||
a->trace ();
|
||||
}
|
||||
@@ -72,9 +72,9 @@ RefTest::run_tests (void)
|
||||
bool ok = true;
|
||||
|
||||
{
|
||||
yans::ReferenceList<A *> tmp;
|
||||
ns3::ReferenceList<A *> tmp;
|
||||
{
|
||||
yans::ReferenceList<A *> a (new A ());
|
||||
ns3::ReferenceList<A *> a (new A ());
|
||||
|
||||
test (a);
|
||||
tmp = a;
|
||||
@@ -88,22 +88,22 @@ RefTest::run_tests (void)
|
||||
}
|
||||
|
||||
{
|
||||
yans::ReferenceList<A *> tmp;
|
||||
ns3::ReferenceList<A *> tmp;
|
||||
}
|
||||
|
||||
{
|
||||
yans::ReferenceList<A *> tmp (new A ());
|
||||
ns3::ReferenceList<A *> tmp (new A ());
|
||||
}
|
||||
|
||||
{
|
||||
yans::ReferenceList<A *> tmp;
|
||||
ns3::ReferenceList<A *> tmp;
|
||||
tmp.set (new A ());
|
||||
}
|
||||
|
||||
{
|
||||
TRACE ("test assignement");
|
||||
yans::ReferenceList<A *> a0 (new A ());
|
||||
yans::ReferenceList<A *> a1 (new A ());
|
||||
ns3::ReferenceList<A *> a0 (new A ());
|
||||
ns3::ReferenceList<A *> a1 (new A ());
|
||||
a0 = a1;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
template <typename OBJ_PTR>
|
||||
class ReferenceList;
|
||||
@@ -112,6 +112,6 @@ private:
|
||||
mutable ReferenceList const*m_next;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* REFERENCE_LIST_H */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemFilePrivate;
|
||||
|
||||
@@ -39,6 +39,6 @@ private:
|
||||
SystemFilePrivate *m_priv;
|
||||
};
|
||||
|
||||
}; //namespace yans
|
||||
}; //namespace ns3
|
||||
|
||||
#endif /* SYSTEM_FILE_H */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemMutexPrivate;
|
||||
|
||||
@@ -37,6 +37,6 @@ public:
|
||||
SystemMutexPrivate *m_priv;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* SYSTEM_MUTEX_H */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemSemaphorePrivate;
|
||||
|
||||
@@ -39,6 +39,6 @@ private:
|
||||
SystemSemaphorePrivate *m_priv;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* SYSTEM_SEMAPHORE_H */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef SYSTEM_THREAD_H
|
||||
#define SYSTEM_THREAD_H
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemThreadPrivate;
|
||||
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
virtual void real_run (void) = 0;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* SYSTEM_THREAD_H */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifdef RUN_SELF_TESTS
|
||||
#include <iostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
TestManager *
|
||||
TestManager::get (void)
|
||||
@@ -102,6 +102,6 @@ Test::failure (void)
|
||||
return TestManager::failure ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class TestManager;
|
||||
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
Tests m_tests;
|
||||
bool m_verbose;
|
||||
};
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ std::cout << "COMMAND TRACE " << x << std::endl;
|
||||
#endif /* TRACE_COMMAND */
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class LogThread : public SystemThread {
|
||||
public:
|
||||
@@ -446,7 +446,7 @@ ExecCommands::get_size (void)
|
||||
return m_priv->get_size ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#ifdef RUN_SELF_TESTS
|
||||
|
||||
@@ -454,7 +454,7 @@ ExecCommands::get_size (void)
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class ExecCommandsTest: public Test {
|
||||
public:
|
||||
@@ -509,7 +509,7 @@ ExecCommandsTest::run_tests (void)
|
||||
|
||||
static ExecCommandsTest g_exec_commands_test;
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* RUN_SELF_TESTS */
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ std::cout << "SYS FILE TRACE " << this << " " << x << std::endl;
|
||||
#define BUFFER_SIZE (4096)
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemFilePrivate {
|
||||
public:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <pthread.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemMutexPrivate {
|
||||
public:
|
||||
@@ -79,4 +79,4 @@ SystemMutex::unlock (void)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "errno.h"
|
||||
#include "string.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemSemaphorePrivate {
|
||||
public:
|
||||
@@ -111,4 +111,4 @@ SystemSemaphore::wait (uint32_t n)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <pthread.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemThreadPrivate {
|
||||
public:
|
||||
@@ -65,5 +65,5 @@ SystemThread::~SystemThread ()
|
||||
delete m_priv;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "wall-clock-ms.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class WallClockMsPrivate {
|
||||
public:
|
||||
@@ -71,4 +71,4 @@ WallClockMs::end (void)
|
||||
return m_priv->end ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef WALL_CLOCK_MS_H
|
||||
#define WALL_CLOCK_MS_H
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class WallClockMs {
|
||||
public:
|
||||
@@ -35,6 +35,6 @@ private:
|
||||
class WallClockMsPrivate *m_priv;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* WALL_CLOCK_MS_H */
|
||||
|
||||
@@ -34,7 +34,7 @@ std::cout << "SYS FILE TRACE " << this << " " << x << std::endl;
|
||||
#define BUFFER_SIZE (4096)
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemFilePrivate {
|
||||
public:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <windows.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemMutexPrivate {
|
||||
public:
|
||||
@@ -75,4 +75,4 @@ SystemMutex::unlock (void)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemSemaphorePrivate {
|
||||
public:
|
||||
@@ -100,4 +100,4 @@ SystemSemaphore::wait (uint32_t n)
|
||||
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <windows.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SystemThreadPrivate {
|
||||
public:
|
||||
@@ -62,5 +62,5 @@ SystemThread::~SystemThread ()
|
||||
delete m_priv;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "wall-clock-ms.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class WallClockMsPrivate {
|
||||
public:
|
||||
@@ -62,4 +62,4 @@ WallClockMs::end (void)
|
||||
return m_priv->end ();
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "event-impl.h"
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
EventImpl::~EventImpl ()
|
||||
@@ -64,4 +64,4 @@ EventImpl::is_running (void)
|
||||
return (m_running == 1);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class EventImpl {
|
||||
public:
|
||||
@@ -44,6 +44,6 @@ private:
|
||||
uint32_t m_running : 1;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* EVENT_IMPL_H */
|
||||
|
||||
@@ -66,7 +66,7 @@ void five_cb (int a,int b,int c,int d,int e)
|
||||
|
||||
};
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
class EventTest : public Test {
|
||||
public:
|
||||
EventTest ();
|
||||
@@ -82,17 +82,17 @@ EventTest::run_tests (void)
|
||||
{
|
||||
Event ev;
|
||||
|
||||
ev = yans::make_event (&null_cb);
|
||||
ev = ns3::make_event (&null_cb);
|
||||
ev ();
|
||||
ev = yans::make_event (&one_cb, 1);
|
||||
ev = ns3::make_event (&one_cb, 1);
|
||||
ev ();
|
||||
ev = yans::make_event (&two_cb, 1, 2);
|
||||
ev = ns3::make_event (&two_cb, 1, 2);
|
||||
ev ();
|
||||
ev = yans::make_event (&three_cb, 1, 2, 3);
|
||||
ev = ns3::make_event (&three_cb, 1, 2, 3);
|
||||
ev ();
|
||||
ev = yans::make_event (&four_cb, 1, 2, 3, 4);
|
||||
ev = ns3::make_event (&four_cb, 1, 2, 3, 4);
|
||||
ev ();
|
||||
ev = yans::make_event (&five_cb, 1, 2, 3, 4, 5);
|
||||
ev = ns3::make_event (&five_cb, 1, 2, 3, 4, 5);
|
||||
ev ();
|
||||
|
||||
if (g_error) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "event-impl.h"
|
||||
#include "event.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class EventFunctionImpl0 : public EventImpl {
|
||||
public:
|
||||
@@ -44,4 +44,4 @@ Event make_event(void (*f) (void))
|
||||
return Event (new EventFunctionImpl0 (f));
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <algorithm>
|
||||
#include "event-impl.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
class EventImpl;
|
||||
@@ -135,6 +135,6 @@ private:
|
||||
EventImpl *m_impl;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* EVENT_H */
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include "event-impl.h"
|
||||
|
||||
/**
|
||||
* yans namespace
|
||||
* ns3 namespace
|
||||
*/
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \defgroup make_event make_event
|
||||
@@ -449,6 +449,6 @@ Event make_event(void (*f) (T1, T2, T3, T4, T5), T1 a1, T2 a2, T3 a3, T4 a4, T5
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* EVENT_TCC */
|
||||
|
||||
@@ -49,7 +49,7 @@ std::cout << "HEAP TRACE " << x << std::endl;
|
||||
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
SchedulerHeap::SchedulerHeap ()
|
||||
{
|
||||
@@ -240,4 +240,4 @@ SchedulerHeap::remove (Event const ev)
|
||||
return key;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Event;
|
||||
class EventHolder;
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
BinaryHeap m_heap;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* SCHEDULER_HEAP_H */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <utility>
|
||||
#include <cassert>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
SchedulerList::SchedulerList ()
|
||||
{}
|
||||
@@ -104,4 +104,4 @@ SchedulerList::remove (Event const ev)
|
||||
return key;
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <utility>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Event;
|
||||
|
||||
@@ -51,7 +51,7 @@ class SchedulerList : public Scheduler {
|
||||
Events m_events;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* SCHEDULER_LIST_H */
|
||||
|
||||
@@ -35,7 +35,7 @@ std::cout << "MAP TRACE " << x << std::endl;
|
||||
#endif /* TRACE_MAP */
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
SchedulerMap::SchedulerMap ()
|
||||
@@ -109,4 +109,4 @@ SchedulerMap::remove (Event const ev)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SchedulerMap : public Scheduler {
|
||||
public:
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
uint32_t m_uid;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* SCHEDULER_MAP_H */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <cassert>
|
||||
|
||||
|
||||
yans::Scheduler::~Scheduler ()
|
||||
ns3::Scheduler::~Scheduler ()
|
||||
{}
|
||||
|
||||
/* Note the invariants which this function must provide:
|
||||
@@ -32,7 +32,7 @@ yans::Scheduler::~Scheduler ()
|
||||
* - transitivity: f(x,y) and f(y,z) => f(x,z)
|
||||
*/
|
||||
bool
|
||||
yans::Scheduler::EventKeyCompare::operator () (struct EventKey a, struct EventKey b)
|
||||
ns3::Scheduler::EventKeyCompare::operator () (struct EventKey a, struct EventKey b)
|
||||
{
|
||||
assert (a.m_uid != b.m_uid);
|
||||
if (a.m_time < b.m_time) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include "event.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class Scheduler {
|
||||
public:
|
||||
@@ -48,7 +48,7 @@ class Scheduler {
|
||||
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#endif /* SCHEDULER_H */
|
||||
|
||||
@@ -46,7 +46,7 @@ std::cout << "SIMU TRACE " << x << std::endl;
|
||||
#endif /* TRACE_SIMU */
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class ParallelSimulatorQueuePrivate {
|
||||
public:
|
||||
@@ -362,7 +362,7 @@ SimulatorPrivate::remove (Event const ev)
|
||||
}
|
||||
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
#include "scheduler-list.h"
|
||||
@@ -370,7 +370,7 @@ SimulatorPrivate::remove (Event const ev)
|
||||
#include "scheduler-map.h"
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
SimulatorPrivate *Simulator::m_priv = 0;
|
||||
Simulator::ListType Simulator::m_list_type = LINKED_LIST;
|
||||
@@ -520,10 +520,10 @@ Simulator::remove (Event const ev)
|
||||
return get_priv ()->remove (ev);
|
||||
}
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
ParallelSimulatorQueue::ParallelSimulatorQueue ()
|
||||
{}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include "event.h"
|
||||
|
||||
namespace yans {
|
||||
namespace ns3 {
|
||||
|
||||
class SimulatorPrivate;
|
||||
class ParallelSimulatorQueuePrivate;
|
||||
@@ -226,6 +226,6 @@ private:
|
||||
} m_list_type;
|
||||
};
|
||||
|
||||
}; // namespace yans
|
||||
}; // namespace ns3
|
||||
|
||||
#endif /* SIMULATOR_H */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ns3/chunk-ipv4.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace yans;
|
||||
using namespace ns3;
|
||||
|
||||
static void
|
||||
bench_ptr_a (uint32_t n)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user