|
WSF
|
#include <WsfXIO_Interface.hpp>


Classes | |
| class | ClockSource |
Public Types | |
| typedef std::pair< int, int > | SenderAddress |
| typedef std::vector< WsfXIO_Connection * > | ConnectionList |
| typedef UtCallbackN< void(WsfXIO_Connection *)> | ConnectionCallback |
| typedef UtCallbackListN< void(WsfXIO_Connection *)> | ConnectionCallbackList |
| Public Types inherited from WsfXIO_InputData | |
| enum | UDP_Type { cBROADCAST , cMULTICAST , cUNICAST } |
Public Member Functions | |
| WsfXIO_Interface () | |
| This form is used when the caller is not a WSF simulation. | |
| WsfXIO_Interface (const WsfXIO_InputData &aInputData) | |
| This form is used when the caller is a WSF simulation. | |
| ~WsfXIO_Interface () | |
| Public Member Functions inherited from WsfXIO_InputData | |
| WsfXIO_InputData () | |
| bool | ProcessInput (UtInput &aInput) |
| void | AddConnectType (int aApplicationType) |
| Specifies that applications of a certain type will be automatically connected to. | |
Miscellaneous methods. | |
| bool | IsXIO_Requested () const |
| Was a network connection requested? | |
| void | SetXIO_Requested () |
| bool | ShowConnections () const |
| Should connection status messages be shown? | |
| void | SetShowConnections (bool aShowConnections) |
| bool | IsDebugEnabled () const |
| Was detailed debugging information requested? | |
| void | SetDebugEnabled (bool aIsEnabled) |
| void | GetBytesCommunicated (size_t &aBytesSent, size_t &aBytesReceived) |
Various callbacks to which others can subscribe. | |
| UtCallbackListN< void(WsfXIO_Connection *)> | OnConnected |
| Invoked when a connection is initialized. | |
| UtCallbackListN< void(WsfXIO_Connection *)> | OnDisconnected |
| Invoked when a connection is no longer connected, prior to deletion. | |
| UtCallbackListN< void(double, GenUniqueId, bool)> | OnHeartbeatUpdate |
| UtCallbackListN< void(bool, const std::string &)> | OnApplicationBehind |
| Invoked when a connected application has fallen behind the real-time clock by some threshold, or is no longer behind. | |
| UtCallbackListN< void(int, int, int, int, double)> | BandwidthDataEvent |
| Executes on the heartbeat to provide bandwidth information to event output. | |
| std::unique_ptr< UtCallbackN< void()> > | TimeoutConnect (double aWaitTime, const std::function< void()> &aFunction) |
| std::unique_ptr< ConnectionCallback > | DisconnectConnect (WsfXIO_Connection *aConnectionPtr, const ConnectionCallback::FunctionType &aFunction) |
Application identification methods | |
| const GenUniqueId & | GetApplicationId () const |
| void | SetApplicationName (const std::string &aApplicationName) |
| std::string | GetApplicationName () const |
| void | SetApplicationType (wsf::xio::ApplicationType aApplicationType) |
| bool | Initialize () |
| void | AdvanceTime (double aSimTime) |
Simulation clock methods. | |
| double | GetSimTime () const |
| Returns the current simulation time. | |
| double | GetLastAdvanceTime () const |
| void | SetClockSource (ClockSource *aClockSourcePtr) |
Packet send methods. | |
| void | Send (WsfXIO_Packet &aPktPtr, WsfXIO_Connection *aConnectionPtr) |
| void | Send (WsfXIO_Packet &aPkt, WsfXIO_Destination &aDestination) |
| void | Send (WsfXIO_Packet &aPktPtr, const std::vector< PakSocketIO * > &aConnections) |
| void | SendToAll (WsfXIO_Packet &aPkt) |
| void | SendToAllUDP (WsfXIO_Packet &aPkt) |
| void | SendToAllTCP (WsfXIO_Packet &aPkt) |
| void | SetValidApplicationTypes (const std::vector< int > &aApplicationTypes) |
| WsfXIO_Connection * | GetSender (PakPacket &aPkt) |
Accessors to objects maintained by this class. | |
| WsfXIO_RequestManager & | GetRequestManager () |
| WsfXIO_QueryManager & | GetQueryManager () const |
| WsfXIO_Publisher & | GetPublisher () const |
Service management | |
| void | RegisterServiceType (std::string aServiceType, std::string aServiceVersion=std::string()) |
| Specifies that a service is available by this application. | |
Connection management | |
| void | AddUDP_Target (UDP_Target aTarget) |
| Adds a connection target. Can be called before or after initialization. | |
| bool | RemoveUDP_Target (int aTargetIndex) |
| const std::vector< UDP_Target > & | GetUDP_Targets () |
| const ConnectionList & | GetConnections () const |
| const ConnectionList & | GetReliableConnections () const |
| WsfXIO_Connection * | FindConnection (const GenUniqueId &aApplicationId) |
| WsfXIO_Connection * | FindConnection (int aConnectionIndex) |
| Returns a pointer to the connection with the given ID. | |
| WsfXIO_Connection * | FindConnection (const std::string &aApplicationName) |
| void | Disconnect (WsfXIO_Connection *aConnectionPtr) |
Additional Inherited Members | |
| Public Attributes inherited from WsfXIO_InputData | |
| InputCallbackList | ProcessInputEvent |
| XIO extenders can subscribe to this to add additional input into the 'xio_interface' block. | |
| WsfStringId | mApplicationName |
| The current application's name. | |
| int | mTCP_Port |
| Socket port used to receive TCP connections. | |
| int | mMulticastTimeToLive |
| Time to live for multicast connections. | |
| bool | mMulticastLoopback |
| Determines if sent multicast can be received on the local machine. | |
| double | mHeartbeatInterval |
| ut::optional< double > | mFallingBehindThreshold |
| std::set< int > | mApplicationTypeFilter |
| Set of application types to connect with automatically. | |
| std::vector< UDP_Target > | mUDP_Targets |
| Contains user input UDP target information. | |
| std::vector< WsfXIO_EntityId > | mRegularApplications |
| std::vector< WsfXIO_EntityId > | mAutoMappedApplications |
| bool | mAutoMappingDefault |
| int | mPublisherDebugLevel |
| bool | mDebugEnabled |
| bool | mShowConnections |
| bool | mShowTransferRate |
| bool | mPauseForConnection |
| bool | mInterfaceRequested |
| true if user has requested the XIO interface | |
| bool | mAuxDataUpdates = true |
This is communications interface for XIO. It is responsible for:
| typedef UtCallbackN<void(WsfXIO_Connection*)> WsfXIO_Interface::ConnectionCallback |
| typedef UtCallbackListN<void(WsfXIO_Connection*)> WsfXIO_Interface::ConnectionCallbackList |
| typedef std::vector<WsfXIO_Connection*> WsfXIO_Interface::ConnectionList |
| typedef std::pair<int, int> WsfXIO_Interface::SenderAddress |
| WsfXIO_Interface::WsfXIO_Interface | ( | ) |
This form is used when the caller is not a WSF simulation.
References WsfXIO_InputData::WsfXIO_InputData(), and WsfXIO_Interface().
Referenced by WsfXIO_Interface().
| WsfXIO_Interface::WsfXIO_Interface | ( | const WsfXIO_InputData & | aInputData | ) |
This form is used when the caller is a WSF simulation.
References WsfXIO_Connection::GetApplicationId(), WsfXIO_Packet::mApplicationId, WsfXIO_TimeBehindPkt::mIsBehind, WsfXIO_InputData::mPublisherDebugLevel, OnApplicationBehind, OnDisconnected, WsfXIO_PacketRegistry::RegisterPackets(), and WsfXIO_InputData::WsfXIO_InputData().
| WsfXIO_Interface::~WsfXIO_Interface | ( | ) |
References GetBytesCommunicated(), and IsDebugEnabled().
| void WsfXIO_Interface::AddUDP_Target | ( | UDP_Target | aTarget | ) |
Adds a connection target. Can be called before or after initialization.
References WsfXIO_InputData::mInterfaceRequested, and WsfXIO_InputData::mUDP_Targets.
| void WsfXIO_Interface::AdvanceTime | ( | double | aSimTime | ) |
| void WsfXIO_Interface::Disconnect | ( | WsfXIO_Connection * | aConnectionPtr | ) |
References WsfXIO_Connection::GetIO().
Referenced by RemoveUDP_Target().
| std::unique_ptr< WsfXIO_Interface::ConnectionCallback > WsfXIO_Interface::DisconnectConnect | ( | WsfXIO_Connection * | aConnectionPtr, |
| const ConnectionCallback::FunctionType & | aFunction ) |
| WsfXIO_Connection * WsfXIO_Interface::FindConnection | ( | const GenUniqueId & | aApplicationId | ) |
Referenced by RemoveUDP_Target(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| WsfXIO_Connection * WsfXIO_Interface::FindConnection | ( | const std::string & | aApplicationName | ) |
| WsfXIO_Connection * WsfXIO_Interface::FindConnection | ( | int | aConnectionIndex | ) |
Returns a pointer to the connection with the given ID.
|
inline |
|
inline |
References WsfXIO_InputData::mApplicationName.
| void WsfXIO_Interface::GetBytesCommunicated | ( | size_t & | aBytesSent, |
| size_t & | aBytesReceived ) |
References WsfXIO_Connection::GetTCP_IO(), and WsfXIO_Connection::GetUDP_IO().
Referenced by AdvanceTime(), and ~WsfXIO_Interface().
|
inline |
|
inline |
|
inline |
Referenced by UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
|
inline |
|
inline |
| WsfXIO_Connection * WsfXIO_Interface::GetSender | ( | PakPacket & | aPkt | ) |
Referenced by SetValidApplicationTypes().
|
inline |
Returns the current simulation time.
Referenced by Send(), Send(), SendToAll(), and SendToAllUDP().
|
inline |
References WsfXIO_InputData::mUDP_Targets.
| bool WsfXIO_Interface::Initialize | ( | ) |
|
inline |
Was detailed debugging information requested?
References WsfXIO_InputData::mDebugEnabled.
Referenced by ~WsfXIO_Interface().
|
inline |
Was a network connection requested?
References WsfXIO_InputData::mInterfaceRequested.
| void WsfXIO_Interface::RegisterServiceType | ( | std::string | aServiceType, |
| std::string | aServiceVersion = std::string() ) |
Specifies that a service is available by this application.
| bool WsfXIO_Interface::RemoveUDP_Target | ( | int | aTargetIndex | ) |
| void WsfXIO_Interface::Send | ( | WsfXIO_Packet & | aPkt, |
| WsfXIO_Destination & | aDestination ) |
References WsfXIO_Destination::GetIO_List(), and Send().
| void WsfXIO_Interface::Send | ( | WsfXIO_Packet & | aPktPtr, |
| const std::vector< PakSocketIO * > & | aConnections ) |
References GetSimTime(), WsfXIO_Packet::mApplicationId, and WsfXIO_Packet::SetTimeStamp().
| void WsfXIO_Interface::Send | ( | WsfXIO_Packet & | aPktPtr, |
| WsfXIO_Connection * | aConnectionPtr ) |
References WsfXIO_Connection::GetIO(), GetSimTime(), WsfXIO_Packet::mApplicationId, and WsfXIO_Packet::SetTimeStamp().
Referenced by Send().
| void WsfXIO_Interface::SendToAll | ( | WsfXIO_Packet & | aPkt | ) |
References GetSimTime(), WsfXIO_Packet::mApplicationId, and WsfXIO_Packet::SetTimeStamp().
| void WsfXIO_Interface::SendToAllTCP | ( | WsfXIO_Packet & | aPkt | ) |
References WsfXIO_Packet::mApplicationId.
| void WsfXIO_Interface::SendToAllUDP | ( | WsfXIO_Packet & | aPkt | ) |
References GetSimTime(), WsfXIO_Packet::mApplicationId, and WsfXIO_Packet::SetTimeStamp().
|
inline |
References WsfXIO_InputData::mApplicationName.
|
inline |
| void WsfXIO_Interface::SetClockSource | ( | ClockSource * | aClockSourcePtr | ) |
Referenced by WsfXIO_Simulation::WsfXIO_Simulation().
|
inline |
References WsfXIO_InputData::mDebugEnabled.
|
inline |
References WsfXIO_InputData::mShowConnections.
| void WsfXIO_Interface::SetValidApplicationTypes | ( | const std::vector< int > & | aApplicationTypes | ) |
References GetSender().
|
inline |
References WsfXIO_InputData::mInterfaceRequested.
|
inline |
Should connection status messages be shown?
References WsfXIO_InputData::mShowConnections.
| std::unique_ptr< UtCallbackN< void()> > WsfXIO_Interface::TimeoutConnect | ( | double | aWaitTime, |
| const std::function< void()> & | aFunction ) |
| UtCallbackListN<void(int, int, int, int, double)> WsfXIO_Interface::BandwidthDataEvent |
Executes on the heartbeat to provide bandwidth information to event output.
Referenced by AdvanceTime().
| UtCallbackListN<void(bool, const std::string&)> WsfXIO_Interface::OnApplicationBehind |
Invoked when a connected application has fallen behind the real-time clock by some threshold, or is no longer behind.
Referenced by WsfXIO_Interface().
| UtCallbackListN<void(WsfXIO_Connection*)> WsfXIO_Interface::OnConnected |
Invoked when a connection is initialized.
| UtCallbackListN<void(WsfXIO_Connection*)> WsfXIO_Interface::OnDisconnected |
Invoked when a connection is no longer connected, prior to deletion.
Referenced by WsfXIO_Interface(), and WsfXIO_RequestManager::WsfXIO_RequestManager().
| UtCallbackListN<void(double, GenUniqueId, bool)> WsfXIO_Interface::OnHeartbeatUpdate |
Invoked when a heartbeat is sent or received. double = Time Stamp GenUniqueId = ApplicationId bool = Received (!Sent)
Referenced by wsf::xio::EventPipe::EventPipe().