WSF
WsfNetworkInterface Class Referenceabstract

#include <WsfNetworkInterface.hpp>

Inheritance diagram for WsfNetworkInterface:
Collaboration diagram for WsfNetworkInterface:

Public Member Functions

 WsfNetworkInterface (WsfSimulation &aSimulation, const std::string &aName, const WsfNetworkInterfaceInput &aNetInput)
virtual ~WsfNetworkInterface ()
virtual bool Initialize ()
virtual void NetworkUpdate (double aSimTime)=0
double GetUpdateInterval () const
void SetUpdateInterval (double aUpdateInterval)
void SetUpdateOnExternalTimer (bool aUseExternalTimer)
bool IsActive () const
bool IsDebug () const
void SetDebug (bool aIsDebug)
void SetUDP_Addr (const std::string &aUDP_Addr)
void SetSendPort (int aSendPort)
void SetRecvPort (int aRecvPort)
WsfSimulationGetSimulation ()

Protected Member Functions

virtual void PrivateInitialize ()
Protected Member Functions inherited from WsfNetworkInterfaceInput
 WsfNetworkInterfaceInput (WsfScenario &aScenario)
bool ProcessNetworkInput (UtInput &aInput)

Protected Attributes

WsfSimulationmSimulationPtr
std::string mName
GenNetIO * mIOPtr
GenTCP_IO * mTCP_IOPtr
GenUDP_IO * mUDP_IOPtr
GenTCP_Server mTCP_Server
UtCallbackHolder mCallbacks
Protected Attributes inherited from WsfNetworkInterfaceInput
WsfScenariomScenarioPtr
bool mIsRequested
bool mIsDisabled
bool mDebug
std::string mUDP_Addr
std::string mUDP_Interface
std::string mTCP_Addr
int mTTL
int mSendPort
int mReceivePort
double mUpdateInterval
bool mUpdateOnAdvanceTime
bool mUpdateOnExternalTimer

Detailed Description

WsfNetworkInterface is a general-purpose network interface for TCP client or server, or UDP connections. It uses the abstract features of the GenIO library in an extensible base class. To use this class, extend the "NetworkUpdate" method to perform custom processing.

Constructor & Destructor Documentation

◆ WsfNetworkInterface()

WsfNetworkInterface::WsfNetworkInterface ( WsfSimulation & aSimulation,
const std::string & aName,
const WsfNetworkInterfaceInput & aNetInput )

◆ ~WsfNetworkInterface()

WsfNetworkInterface::~WsfNetworkInterface ( )
virtual

References mCallbacks, mTCP_IOPtr, and mUDP_IOPtr.

Member Function Documentation

◆ GetSimulation()

WsfSimulation & WsfNetworkInterface::GetSimulation ( )
inline

References mSimulationPtr.

◆ GetUpdateInterval()

double WsfNetworkInterface::GetUpdateInterval ( ) const
inline

◆ Initialize()

◆ IsActive()

bool WsfNetworkInterface::IsActive ( ) const

◆ IsDebug()

bool WsfNetworkInterface::IsDebug ( ) const
inline

◆ NetworkUpdate()

virtual void WsfNetworkInterface::NetworkUpdate ( double aSimTime)
pure virtual

Referenced by Initialize().

◆ PrivateInitialize()

virtual void WsfNetworkInterface::PrivateInitialize ( )
inlineprotectedvirtual

Referenced by Initialize().

◆ SetDebug()

void WsfNetworkInterface::SetDebug ( bool aIsDebug)
inline

◆ SetRecvPort()

void WsfNetworkInterface::SetRecvPort ( int aRecvPort)
inline

◆ SetSendPort()

void WsfNetworkInterface::SetSendPort ( int aSendPort)
inline

◆ SetUDP_Addr()

void WsfNetworkInterface::SetUDP_Addr ( const std::string & aUDP_Addr)
inline

◆ SetUpdateInterval()

void WsfNetworkInterface::SetUpdateInterval ( double aUpdateInterval)
inline

◆ SetUpdateOnExternalTimer()

void WsfNetworkInterface::SetUpdateOnExternalTimer ( bool aUseExternalTimer)
inline

Member Data Documentation

◆ mCallbacks

UtCallbackHolder WsfNetworkInterface::mCallbacks
protected

◆ mIOPtr

GenNetIO* WsfNetworkInterface::mIOPtr
protected

Referenced by Initialize(), and WsfNetworkInterface().

◆ mName

std::string WsfNetworkInterface::mName
protected

Referenced by Initialize(), and WsfNetworkInterface().

◆ mSimulationPtr

WsfSimulation* WsfNetworkInterface::mSimulationPtr
protected

◆ mTCP_IOPtr

GenTCP_IO* WsfNetworkInterface::mTCP_IOPtr
protected

◆ mTCP_Server

GenTCP_Server WsfNetworkInterface::mTCP_Server
protected

Referenced by Initialize(), and WsfNetworkInterface().

◆ mUDP_IOPtr

GenUDP_IO* WsfNetworkInterface::mUDP_IOPtr
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved