WSF
WsfXIO_InputData.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFXIO_INPUTDATA_HPP
13#define WSFXIO_INPUTDATA_HPP
14
15#include "wsf_export.h"
16
17#include <set>
18#include <vector>
19
20class UtInput;
21#include "UtCallback.hpp"
22#include "UtOptional.hpp"
23#include "WsfStringId.hpp"
26
32{
33public:
40
42 {
44 : mSendPort(0)
45 , mRecvPort(0)
46 , mConnectionId(0)
47 {
48 }
50 std::string mAddress;
51 std::string mInterface;
55 };
56
58
59 bool ProcessInput(UtInput& aInput);
60
62 class InputCallbackList : public UtCallbackListN<bool(UtInput&)>
63 {
64 public:
65 bool Callback(UtInput& aInput)
66 {
67 for (IterType it = mCallbackList.begin(); it != mCallbackList.end();)
68 {
69 if (static_cast<CallbackType*>(*(it++))->operator()(aInput))
70 {
71 return true;
72 }
73 }
74 return false;
75 }
76 };
77
80
83
86
91
93
94 ut::optional<double> mFallingBehindThreshold;
95
98
100 std::vector<UDP_Target> mUDP_Targets;
101
102 std::vector<WsfXIO_EntityId> mRegularApplications;
103 std::vector<WsfXIO_EntityId> mAutoMappedApplications;
105
107
112
114
115 bool mAuxDataUpdates = true;
116
117 void AddConnectType(int aApplicationType);
118
119private:
120 bool ProcessPorts(UtInput& aInput, int& aSendPort, int& aRecvPort);
121
122 WsfExtEntityId ReadApplicationId(UtInput& aInput);
123};
124
125#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfExtEntityId.hpp:22
An input processing callback list.
Definition WsfXIO_InputData.hpp:63
bool Callback(UtInput &aInput)
Definition WsfXIO_InputData.hpp:65
std::vector< WsfXIO_EntityId > mRegularApplications
Definition WsfXIO_InputData.hpp:102
bool mInterfaceRequested
true if user has requested the XIO interface
Definition WsfXIO_InputData.hpp:113
WsfStringId mApplicationName
The current application's name.
Definition WsfXIO_InputData.hpp:82
bool mDebugEnabled
Definition WsfXIO_InputData.hpp:108
ut::optional< double > mFallingBehindThreshold
Definition WsfXIO_InputData.hpp:94
int mTCP_Port
Socket port used to receive TCP connections.
Definition WsfXIO_InputData.hpp:85
UDP_Type
Definition WsfXIO_InputData.hpp:35
@ cUNICAST
Definition WsfXIO_InputData.hpp:38
@ cBROADCAST
Definition WsfXIO_InputData.hpp:36
@ cMULTICAST
Definition WsfXIO_InputData.hpp:37
InputCallbackList ProcessInputEvent
XIO extenders can subscribe to this to add additional input into the 'xio_interface' block.
Definition WsfXIO_InputData.hpp:79
bool mMulticastLoopback
Determines if sent multicast can be received on the local machine.
Definition WsfXIO_InputData.hpp:90
WsfXIO_InputData()
Definition WsfXIO_InputData.cpp:25
bool mShowConnections
Definition WsfXIO_InputData.hpp:109
bool ProcessInput(UtInput &aInput)
Definition WsfXIO_InputData.cpp:41
void AddConnectType(int aApplicationType)
Specifies that applications of a certain type will be automatically connected to.
Definition WsfXIO_InputData.cpp:192
std::vector< WsfXIO_EntityId > mAutoMappedApplications
Definition WsfXIO_InputData.hpp:103
std::vector< UDP_Target > mUDP_Targets
Contains user input UDP target information.
Definition WsfXIO_InputData.hpp:100
double mHeartbeatInterval
Definition WsfXIO_InputData.hpp:92
bool mPauseForConnection
Definition WsfXIO_InputData.hpp:111
bool mAuxDataUpdates
Definition WsfXIO_InputData.hpp:115
bool mShowTransferRate
Definition WsfXIO_InputData.hpp:110
int mMulticastTimeToLive
Time to live for multicast connections.
Definition WsfXIO_InputData.hpp:88
bool mAutoMappingDefault
Definition WsfXIO_InputData.hpp:104
int mPublisherDebugLevel
Definition WsfXIO_InputData.hpp:106
std::set< int > mApplicationTypeFilter
Set of application types to connect with automatically.
Definition WsfXIO_InputData.hpp:97
UDP_Type mType
Definition WsfXIO_InputData.hpp:49
std::string mInterface
Definition WsfXIO_InputData.hpp:51
int mSendPort
Definition WsfXIO_InputData.hpp:52
std::string mAddress
Definition WsfXIO_InputData.hpp:50
UDP_Target()
Definition WsfXIO_InputData.hpp:43
int mRecvPort
Definition WsfXIO_InputData.hpp:53
int mConnectionId
Definition WsfXIO_InputData.hpp:54
Copyrights Multiple, All Rights Reserved