A Discrete-Event Network Simulator
API
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.
 
file  empty.h
 ns3::empty declaration, used by callbacks.
 

Classes

class  ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >
 Callback template class. More...
 

Functions

template<typename R , typename... Ts>
Callback< R, Ts... > ns3::MakeCallback (R(*fnPtr)(Ts...))
 
template<typename R , typename... Ts>
Callback< R, Ts... > ns3::MakeNullCallback (void)
 

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... Ts>
Callback<R,Ts...> ns3::MakeCallback ( R(*)(Ts...)  fnPtr)
Parameters
[in]fnPtrFunction pointer
Returns
A wrapper Callback

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

Template Parameters
R[deduced] Return type of the callback function..
Ts[deduced] Type list of any arguments to the member function.

Definition at line 1671 of file callback.h.

◆ MakeNullCallback()

template<typename R , typename... Ts>
Callback<R,Ts...> ns3::MakeNullCallback ( void  )
Returns
A wrapper Callback

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

Template Parameters
R[deduced] Return type of the callback function..
Ts[deduced] Type list of any arguments to the member function.

Definition at line 1688 of file callback.h.

Referenced by ns3::QKDKeyManagerSystemApplication::AddNewLink(), ns3::ThreeGppHttpServerTxBuffer::CloseAllSockets(), ns3::ThreeGppHttpServerTxBuffer::CloseSocket(), ns3::QKDKeyManagerSystemApplication::ConnectToSDNController(), ns3::NoBackhaulEpcHelper::DoDispose(), ns3::EpcPgwApplication::DoDispose(), ns3::EpcSgwApplication::DoDispose(), TcpEndPointBug2211Test::DoRun(), TcpSynConnectionFailedTest::DoRun(), DualStackTestCase::DoRun(), ns3::TcpGeneralTest::DoRun(), ns3::QKDApp004::HandlePeerCloseToKMS(), ns3::QKDApp004::HandlePeerErrorToKMS(), ns3::DhcpClient::LinkStateHandler(), ns3::ThreeGppHttpClient::NormalCloseCallback(), ns3::QKDKeyManagerSystemApplication::PrepareSinkSocket(), ns3::QKDSDNController::PrepareSinkSocket(), ns3::QKDApp004::PrepareSinkSocketFromApp(), ns3::QKDApp014::PrepareSinkSocketFromApp(), ns3::ThreeGppHttpServerTxBuffer::RemoveSocket(), ns3::FrameExchangeManager::ResetPhy(), TcpTestCase::SetupDefaultSim(), TcpTestCase::SetupDefaultSim6(), ns3::PacketSink::StartApplication(), ns3::QKDPostprocessingApplication::StartApplication(), ns3::UdpClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), EpsBearerTagUdpClient::StartApplication(), ns3::PacketSocketClient::StartApplication(), ns3::ThreeGppHttpClient::StopApplication(), ns3::ThreeGppHttpServer::StopApplication(), ns3::Ping6::StopApplication(), ns3::Radvd::StopApplication(), Receiver::StopApplication(), ns3::PacketSink::StopApplication(), ns3::QKDKeyManagerSystemApplication::StopApplication(), ns3::QKDSDNController::StopApplication(), ns3::UdpEchoClient::StopApplication(), ns3::UdpEchoServer::StopApplication(), ns3::UdpServer::StopApplication(), ns3::DhcpClient::StopApplication(), ns3::DhcpServer::StopApplication(), and ns3::PacketSocketServer::StopApplication().

+ Here is the caller graph for this function: