A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Callbacks

Wrap functions, objects, and arguments into self contained callbacks. More...

+ Collaboration diagram for Callbacks:

Modules

 Callback Implementation
 Callback implementation classes.
 

Files

file  callback.cc
 ns3::CallbackValue implementation.
 
file  callback.h
 Declaration of the various callback functions.
 

Classes

class  ns3::Callback< R, UArgs >
 Callback template class. More...
 

Functions

template<typename R , typename... Args>
Callback< R, Args... > ns3::MakeCallback (R(*fnPtr)(Args...))
 
template Callback< ObjectBase * > ns3::MakeCallback< ObjectBase * > (ObjectBase *(*)())
 Explicit instantiation for ObjectBase.
 
template<typename R , typename... Args>
Callback< R, Args... > ns3::MakeNullCallback ()
 

Detailed Description

Wrap functions, objects, and arguments into self contained callbacks.

Wrapped callbacks are at the heart of scheduling events in the simulator.

Function Documentation

◆ MakeCallback()

template<typename R , typename... Args>
Callback< R, Args... > ns3::MakeCallback ( R(*)(Args...)  fnPtr)
Template Parameters
R[deduced] Return type of the callback function..
Args[deduced] Type list of any arguments to the member function.
Parameters
[in]fnPtrFunction pointer
Returns
A wrapper Callback

Build Callbacks for functions which take varying numbers of arguments and potentially returning a value.

Definition at line 732 of file callback.h.

◆ MakeCallback< ObjectBase * >()

Explicit instantiation for ObjectBase.

Returns
A wrapper Callback
See also
ns3::MakeCallback

◆ MakeNullCallback()

template<typename R , typename... Args>
Callback< R, Args... > ns3::MakeNullCallback ( )
Template Parameters
R[deduced] Return type of the callback function..
Args[deduced] Type list of any arguments to the member function.
Returns
A wrapper Callback

Build null Callbacks which take no arguments, for varying number of template arguments, and potentially returning a value.

Definition at line 749 of file callback.h.

Referenced by ns3::ThreeGppHttpServerTxBuffer::CloseAllSockets(), ns3::ThreeGppHttpServerTxBuffer::CloseSocket(), ns3::NoBackhaulEpcHelper::DoDispose(), ns3::EpcPgwApplication::DoDispose(), ns3::EpcSgwApplication::DoDispose(), DualStackTestCase::DoRun(), TcpEndPointBug2211Test::DoRun(), ns3::TcpGeneralTest::DoRun(), TcpSynConnectionFailedTest::DoRun(), ns3::DhcpClient::LinkStateHandler(), ns3::ThreeGppHttpClient::NormalCloseCallback(), ns3::ThreeGppHttpServerTxBuffer::RemoveSocket(), ns3::FrameExchangeManager::ResetPhy(), TcpTestCase::SetupDefaultSim(), TcpTestCase::SetupDefaultSim6(), ns3::PacketSink::StartApplication(), ns3::UdpClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), EpsBearerTagUdpClient::StartApplication(), ns3::PacketSocketClient::StartApplication(), Receiver::StopApplication(), ns3::PacketSink::StopApplication(), ns3::ThreeGppHttpClient::StopApplication(), ns3::ThreeGppHttpServer::StopApplication(), ns3::UdpEchoClient::StopApplication(), ns3::UdpEchoServer::StopApplication(), ns3::UdpServer::StopApplication(), ns3::DhcpClient::StopApplication(), ns3::DhcpServer::StopApplication(), ns3::Radvd::StopApplication(), and ns3::PacketSocketServer::StopApplication().

+ Here is the caller graph for this function: