|
WSF
|
#include <WsfXIO_Connection.hpp>
Inherits PakConnection, and UtReferenceTracked.
Public Member Functions | |
| WsfXIO_Connection * | GetLinkedConnection () const |
| void | SetLinkedConnection (WsfXIO_Connection *aConnectionPtr) |
| Sets the linked connection. | |
| PakSocketIO & | GetIO () const |
| Returns the IO Device used in this connection. | |
| PakTCP_IO * | GetTCP_IO () const |
| Returns the GenTCP_IO is this connection uses TCP, returns null otherwise. | |
| PakUDP_IO * | GetUDP_IO () const |
| Returns the GenUDP_IO is this connection uses UDP, returns null otherwise. | |
| WsfXIO_Interface & | GetInterface () |
| Returns the associated WsfXIO_Interface. | |
| wsf::xio::ApplicationType | GetApplicationType () const |
| Returns the application type. | |
| void | SetApplicationType (wsf::xio::ApplicationType aApplicationType) |
| Sets the application type. | |
| void | Send (WsfXIO_Packet &aPkt) |
| Sends a packet to this connection. | |
| int | GetConnectionId () const |
| Returns a locally unique identifier for this connection. | |
| const std::string & | GetApplicationName () const |
| Returns the name of the connected application. | |
| void | SetApplicationName (const std::string &aApplicationName) |
| Sets the name of the connected application. | |
| void | SetApplicationId (GenUniqueId &aApplicationId) |
| Sets the application ID. | |
| GenUniqueId | GetApplicationId () const |
| bool | IsReliable () const |
| Returns true if the connection is reliable. | |
| void | SetInitialized () |
| Specifies that the connection is initialized. | |
| bool | IsInitialized () const |
| Returns 'true' if the connection is initialized. | |
| bool | IsDisconnecting () const |
| Returns 'true' if the connection is in the process of disconnecting. | |
| void | SetDisconnecting () |
| void | SetClockOffset (double aRecvOffset) |
| Sets the offset between local and remote simulation time. | |
| double | GetClockOffset () const |
| Returns the offset between local and remote simulation time. | |
| bool | HasClockTranslation () |
| Returns 'true' if the clock offset is configured for packet synchronization with this connection. | |
| void | SetHasClockTranslation (bool aUseTranslation) |
| double | GetLastTimeStamp () const |
| Returns the last time stamp (simulation-time) from a PDU received by this connection. | |
| void | SetLastTimeStamp (double aTimeStamp) |
Static Public Member Functions | |
| static std::unique_ptr< UtScriptClass > | CreateScriptClass (UtScriptTypes *aScriptTypesPtr) |
| static UtScriptClass * | GetScriptClass () |
Static Public Attributes | |
| static UtScriptClass * | mScriptClassPtr = nullptr |
Protected Member Functions | |
| WsfXIO_Connection (WsfXIO_Interface *aInterfacePtr, PakSocketIO *aIOPtr) | |
| ~WsfXIO_Connection () override | |
Friends | |
| class | WsfXIO_Interface |
WsfXIO_Connection provides a means to communicate between applications. It may represent a single connection to a remote application, Or a broadcast/multicast setup between several applications.
|
protected |
References WsfXIO_Interface.
Referenced by GetLinkedConnection(), and SetLinkedConnection().
|
overrideprotected |
|
static |
References mScriptClassPtr.
|
inline |
Returns the remote application's unique ID This is only valid for TCP connections (UDP may have multiple listeners)
Referenced by WsfXIO_RemotePlatformList::AddConnection(), WsfXIO_TrackRequestManager::AddRequest(), WsfXIO_RemotePlatformList::DropConnection(), WsfXIO_RemotePlatformList::GetPlatformByIndex(), WsfXIO_TrackRequestManager::RequestCancelled(), WsfXIO_RemotePlatformList::SetInformationLevels(), and WsfXIO_Interface::WsfXIO_Interface().
|
inline |
Returns the name of the connected application.
|
inline |
Returns the application type.
| double WsfXIO_Connection::GetClockOffset | ( | ) | const |
Returns the offset between local and remote simulation time.
|
inline |
Returns a locally unique identifier for this connection.
Referenced by WsfXIO_RemotePlatformList::FindPlatformByIndex(), WsfXIO_RemotePlatformList::FindPlatformByName(), WsfXIO_AutoDisMapping::FindRemotePlatform(), WsfXIO_Service::FindSubscription(), WsfXIO_AutoDisMapping::HandleDisconnect(), WsfXIO_Service::HandleDisconnect(), WsfXIO_AutoDisMapping::HandlePlatformInfo(), WsfXIO_RequestManager::HandleRequestResponse(), WsfXIO_ScriptService::HandleScriptDataRequest(), WsfXIO_AutoDisMapping::PlatformDeleted(), and WsfXIO_AutoDisMapping::TranslatePlatformIndex().
|
inline |
Returns the associated WsfXIO_Interface.
References WsfXIO_Interface.
Referenced by WsfXIO_RemotePlatformList::AddConnection().
|
inline |
Returns the IO Device used in this connection.
Referenced by WsfXIO_Interface::Disconnect(), and WsfXIO_Interface::Send().
|
inline |
Returns the last time stamp (simulation-time) from a PDU received by this connection.
|
inline |
Returns a pointer to the linked connection if available This is only valid for TCP connections, and returns an unreliable connection capable of communicating to the remote application
References WsfXIO_Connection().
Referenced by wsf::event::HandleConnect::Print(), and wsf::event::HandleConnect::PrintCSV().
|
inlinestatic |
References mScriptClassPtr.
|
inline |
Returns the GenTCP_IO is this connection uses TCP, returns null otherwise.
Referenced by WsfXIO_Interface::GetBytesCommunicated().
|
inline |
Returns the GenUDP_IO is this connection uses UDP, returns null otherwise.
Referenced by WsfXIO_Interface::GetBytesCommunicated(), wsf::event::HandleConnect::Print(), and wsf::event::HandleConnect::PrintCSV().
|
inline |
Returns 'true' if the clock offset is configured for packet synchronization with this connection.
|
inline |
Returns 'true' if the connection is in the process of disconnecting.
|
inline |
Returns 'true' if the connection is initialized.
|
inline |
Returns true if the connection is reliable.
Referenced by WsfXIO_AutoDisMapping::HandleConnect(), WsfXIO_AutoDisMapping::HandleDisconnect(), and WsfXIO_Query::WsfXIO_Query().
| void WsfXIO_Connection::Send | ( | WsfXIO_Packet & | aPkt | ) |
Sends a packet to this connection.
Referenced by WsfXIO_Service::DenyRequest(), WsfXIO_WeaponInfo::FireSalvo(), WsfXIO_WeaponInfo::FireSalvo(), WsfXIO_ScriptService::HandleInformationRequest(), WsfXIO_ScriptService::HandleScriptDataRequest(), WsfXIO_Service::RemoveSubscription(), WsfXIO_RequestManager::RequestCancelled(), WsfXIO_PlatformInfo::RequestDelete(), WsfXIO_TaskService::SendInitial(), WsfXIO_Subscription::SendResponse(), and WsfXIO_PlatformInfoService::SendTrackManagerState().
|
inline |
Sets the application ID.
|
inline |
Sets the name of the connected application.
|
inline |
Sets the application type.
| void WsfXIO_Connection::SetClockOffset | ( | double | aRecvOffset | ) |
Sets the offset between local and remote simulation time.
|
inline |
|
inline |
Referenced by WsfXIO_TimeSynchronization::~WsfXIO_TimeSynchronization().
|
inline |
Specifies that the connection is initialized.
|
inline |
|
inline |
Sets the linked connection.
References WsfXIO_Connection().
|
friend |
References WsfXIO_Interface.
Referenced by GetInterface(), WsfXIO_Connection(), and WsfXIO_Interface.
|
static |
Referenced by CreateScriptClass(), and GetScriptClass().