WSF
WsfEventUtils.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 2019 Infoscitex, a DCS 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 WSFEVENTUTILS_HPP
13#define WSFEVENTUTILS_HPP
14
15#include "wsf_export.h"
16
17#include <map>
18#include <ostream>
19
20class UtAttributeContainer;
21class UtEntity;
22
23#include "WsfCovariance.hpp"
24#include "WsfEM_Interaction.hpp"
25class WsfEM_XmtrRcvr;
26#include "WsfEventResult.hpp"
27class WsfMessage;
28class WsfPlatform;
29class WsfPlatformPart;
30class WsfSensor;
31class WsfSensorResult;
32class WsfSimulation;
33class WsfTrack;
34
35namespace wsf
36{
37namespace comm
38{
39class Comm;
40
41namespace router
42{
43class Router;
44}
45
46} // namespace comm
47} // namespace wsf
48
49namespace wsf
50{
51namespace event
52{
53
55namespace utils
56{
57
58WSF_EXPORT void PrintLLA(std::ostream& aStream, double aLat, double aLon, double aAlt, int aLatLonFormat);
59
60WSF_EXPORT std::string ContinueChar(bool aPrintSingleLinePerEvent);
61
62WSF_EXPORT void PrintTime(std::ostream& aStream, double aSimTime, int aTimeFormat);
63WSF_EXPORT void PrintTime(std::ostream& aStream, WsfSimulation& aSimulation, int aTimeFormat);
64
65WSF_EXPORT void PrintDateTime(std::ostream& aStream, const WsfSimulation& aSimulation);
66WSF_EXPORT void PrintDateTime(std::ostream& aStream, double aSimTime, const WsfSimulation& aSimulation);
67
68WSF_EXPORT std::string MakePrintableString(const std::string& aInput);
69
70WSF_EXPORT double PrintableAngle(double aAngle);
71
72WSF_EXPORT void PrintCommData(std::ostream& aStream, wsf::comm::Comm* aCommPtr, bool aShowAddress = true);
73
74WSF_EXPORT void PrintRouterData(std::ostream& aStream, wsf::comm::router::Router* aRouterPtr);
75
76WSF_EXPORT void PrintEM_Interaction(std::ostream& aStream, WsfEM_Interaction& aResult, const Settings& aSettings);
77
78WSF_EXPORT void PrintEM_AbsTargetData(std::ostream& aStream,
79 const WsfEM_Interaction& aResult,
80 const char* aPrefix,
81 WsfPlatform* aTgtPtr,
82 const WsfEM_Interaction::LocationData& aLocData,
83 const Settings& aSettings);
84
85WSF_EXPORT void PrintEM_RelTargetData(std::ostream& aStream,
86 const WsfEM_Interaction& aResult,
87 const char* aPrefix,
88 WsfPlatform* aTgtPtr,
89 const WsfEM_Interaction::RelativeData& aRelData,
90 bool aPrintSingleLinePerEvent);
91
92WSF_EXPORT void PrintEM_AbsXmtrRcvrData(std::ostream& aStream,
93 const WsfEM_Interaction& aResult,
94 const char* aPrefix,
95 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
96 const WsfEM_Interaction::LocationData& aLocData,
97 const Settings& aSettings);
98
99WSF_EXPORT void PrintEM_RelXmtrRcvrData(std::ostream& aStream,
100 const WsfEM_Interaction& aResult,
101 const char* aPrefix,
102 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
103 const WsfEM_Interaction::RelativeData& aRelData,
104 bool aPrintSingleLinePerEvent);
105
106WSF_EXPORT void PrintEM_BeamData(std::ostream& aStream,
107 const char* aPrefix,
108 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
109 const WsfEM_Interaction::BeamData& aBeamData,
110 bool aPrintSingleLinePerEvent);
111
112WSF_EXPORT void PrintEM_LocationData(std::ostream& aStream,
113 const char* aPrefix,
114 WsfPlatform* aPlatformPtr,
115 const WsfEM_Interaction::LocationData& aLocationData,
116 const Settings& aSettings);
117
118WSF_EXPORT void PrintEM_Range(std::ostream& aStream,
119 const char* aPrefix,
120 double aRange,
121 bool aPrintSingleLinePerEvent,
122 bool aWriteEndOfLine = true);
123
124WSF_EXPORT void PrintLocationDataLLA(std::ostream& aStream, double aLat, double aLon, double aAlt, int aLatLonFormat);
125
126WSF_EXPORT void PrintLocationData(std::ostream& aStream, UtEntity* aPlatformPtr, const Settings& aSettings);
127
128WSF_EXPORT void PrintLocationDataECI(std::ostream& aStream, const double aLocationECI[3]);
129
130WSF_EXPORT void PrintNonLocationData(std::ostream& aStream,
131 WsfPlatform* aPlatformPtr,
132 const std::string& aIndent,
133 const Settings& aSettings);
134
135WSF_EXPORT void PrintMessageData(std::ostream& aStream,
136 double aSimTime,
137 const WsfMessage& aMessage,
138 WsfSimulation& aSimulation,
139 const Settings& aSettings);
140
141WSF_EXPORT void PrintPlatformEvent(std::ostream& aStream, WsfPlatform* aPlatformPtr, bool aShowPs, const Settings& aSettings);
142
143WSF_EXPORT void
144PrintSensorResult(std::ostream& aStream, WsfSensor* aSensorPtr, WsfSensorResult& aResult, const Settings& aSettings);
145
146WSF_EXPORT void PrintSystemOffOnEvent(std::ostream& aStream,
147 double aSimTime,
148 const std::string& aEvent,
149 const std::string& aSystemType,
150 WsfPlatformPart* aSystemPtr,
151 const Settings& aSettings);
152
153WSF_EXPORT void PrintAuxData(std::ostream& aStream, const UtAttributeContainer* aAuxDataPtr);
154
155WSF_EXPORT void PrintTrackData(std::ostream& aStream,
156 double aSimTime,
157 const WsfTrack* aTrackPtr,
158 const WsfSimulation& aSimulation,
159 const Settings& aSettings);
160
161WSF_EXPORT void PrintTrackCovarianceData(std::ostream& aStream,
162 double aSimTime,
163 const std::string& aCovarianceType,
164 const WsfCovariance* aCovariancePtr,
165 const WsfTrack* aTrackPtr,
166 bool aPrintSingleLinePerEvent);
167
168WSF_EXPORT void PrintTrackDataBrief(std::ostream& aStream, double aSimTime, const WsfTrack* aTrackPtr, int aTimeFormat);
169
170WSF_EXPORT void PrintTrackTargetName(std::ostream& aStream, const WsfTrack* aTrackPtr, const WsfSimulation& aSimulation);
171
172WSF_EXPORT void PrintEvent(std::ostream& aStream,
173 double aSimTime,
174 const std::string& aSubjectName,
175 const std::string& aEventName,
176 const std::string& aObjectName,
177 const Settings& aSettings,
178 const std::string& aAdditionalInformation = "");
179
180} // namespace utils
181
183namespace utilsCSV
184{
185
186WSF_EXPORT void PrintTime(std::ostream& aStream, WsfSimulation& aSimulation);
187WSF_EXPORT void PrintTime(std::ostream& aStream, double aSimTime);
188
189WSF_EXPORT void PrintDateTime(std::ostream& aStream, const WsfSimulation& aSimulation);
190WSF_EXPORT void PrintDateTime(std::ostream& aStream, double aSimTime, const WsfSimulation& aSimulation);
191
192WSF_EXPORT void PrintLLA(std::ostream& aStream, double aLat, double aLon, double aAlt);
193
194WSF_EXPORT std::string MakePrintableString(const std::string& aInput);
195
196WSF_EXPORT void PrintEM_Interaction(std::ostream& aStream, WsfEM_Interaction& aResult);
197
198WSF_EXPORT void PrintEM_AbsTargetData(std::ostream& aStream,
199 const WsfEM_Interaction& aResult,
200 WsfPlatform* aTgtPtr,
201 const WsfEM_Interaction::LocationData& aLocData);
202
203WSF_EXPORT void PrintEM_RelTargetData(std::ostream& aStream,
204 const WsfEM_Interaction& aResult,
205 WsfPlatform* aTgtPtr,
206 const WsfEM_Interaction::RelativeData& aRelData);
207
208WSF_EXPORT void PrintEM_AbsXmtrRcvrData(std::ostream& aStream,
209 const WsfEM_Interaction& aResult,
210 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
211 const WsfEM_Interaction::LocationData& aLocData);
212
213WSF_EXPORT void PrintEM_RelXmtrRcvrData(std::ostream& aStream,
214 const WsfEM_Interaction& aResult,
215 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
216 const WsfEM_Interaction::RelativeData& aRelData);
217
218WSF_EXPORT void PrintEM_BeamData(std::ostream& aStream,
219 WsfEM_XmtrRcvr* aXmtrRcvrPtr,
220 const WsfEM_Interaction::BeamData& aBeamData);
221
222WSF_EXPORT void PrintEM_LocationData(std::ostream& aStream,
223 WsfPlatform* aPlatformPtr,
224 const WsfEM_Interaction::LocationData& aLocationData);
225
226WSF_EXPORT void PrintEM_Range(std::ostream& aStream, double aRange, bool aWriteEndOfLine = true);
227
228WSF_EXPORT void PrintLocationDataLLA(std::ostream& aStream, double aLat, double aLon, double aAlt);
229
230WSF_EXPORT void PrintLocationData(std::ostream& aStream, UtEntity* aPlatformPtr);
231
232WSF_EXPORT void PrintLocationDataECI(std::ostream& aStream, const double aLocationECI[3]);
233
234WSF_EXPORT void PrintNonLocationData(std::ostream& aStream, WsfPlatform* aPlatformPtr, const std::string& aIndent);
235
236WSF_EXPORT void PrintMessageData(std::ostream& aStream,
237 double aSimTime,
238 const WsfMessage& aMessage,
239 WsfSimulation& aSimulation,
240 Settings::MessagePrintMap mMessagePrinters,
241 bool aPrintTrackDataBrief);
242
243WSF_EXPORT void PrintPlatformEvent(std::ostream& aStream, WsfPlatform* aPlatformPtr, bool aShowPs);
244
245WSF_EXPORT void PrintSensorResult(std::ostream& aStream, WsfSensor* aSensorPtr, WsfSensorResult& aResult);
246
247WSF_EXPORT void PrintSystemOffOnEvent(std::ostream& aStream,
248 double aSimTime,
249 const std::string& aEvent,
250 const std::string& aSystemType,
251 WsfPlatformPart* aSystemPtr);
252
253WSF_EXPORT void PrintAuxData(std::ostream& aStream, const UtAttributeContainer* aAuxDataPtr);
254
255WSF_EXPORT void PrintTrackData(std::ostream& aStream,
256 double aSimTime,
257 const WsfTrack* aTrackPtr,
258 const WsfSimulation& aSimulation,
259 bool aPrintTrackDataBrief = false);
260
261WSF_EXPORT void PrintTrackCovarianceData(std::ostream& aStream,
262 double aSimTime,
263 const std::string& aCovarianceType,
264 const UtCovariance* aCovariancePtr,
265 const WsfTrack* aTrackPtr);
266
267WSF_EXPORT void PrintTrackTargetName(std::ostream& aStream, const WsfTrack* aTrackPtr, WsfSimulation& aSimulation);
268
269WSF_EXPORT void PrintEvent(std::ostream& aStream,
270 double aSimTime,
271 const std::string& aSubjectName,
272 const std::string& aEventName,
273 const std::string& aObjectName,
274 const std::string& aAdditionalInformation = "");
275
276} // namespace utilsCSV
277
278} // namespace event
279} // namespace wsf
280
281#endif
UtCovariance WsfCovariance
Definition WsfCovariance.hpp:17
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfEM_XmtrRcvr.hpp:42
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
Definition WsfPlatformPart.hpp:61
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:92
The main controller for a simulation.
Definition WsfSimulation.hpp:109
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfComm.hpp:43
Definition WsfCommRouter.hpp:55
std::map< WsfStringId, MessagePrintFunction > MessagePrintMap
Definition WsfEventResult.hpp:38
Definition WsfComm.hpp:36
Definition WsfComm.cpp:34
csv_event_output utilities for printing of CSV based event results
Definition WsfXIO_EventUtils.cpp:30
void PrintEM_AbsTargetData(std::ostream &aStream, const WsfEM_Interaction &aResult, WsfPlatform *aTgtPtr, const WsfEM_Interaction::LocationData &aLocData)
Definition WsfEventUtils.cpp:1896
void PrintTrackData(std::ostream &aStream, double aSimTime, const WsfTrack *aTrackPtr, const WsfSimulation &aSimulation, bool aPrintTrackDataBrief)
Definition WsfEventUtils.cpp:2394
void PrintLocationDataECI(std::ostream &aStream, const double aLocationECI[3])
Like PrintLocationDataLLA, but outputs ECI values instead.
Definition WsfEventUtils.cpp:2098
void PrintEM_RelXmtrRcvrData(std::ostream &aStream, const WsfEM_Interaction &aResult, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::RelativeData &aRelData)
Definition WsfEventUtils.cpp:1953
void PrintLocationDataLLA(std::ostream &aStream, double aLat, double aLon, double aAlt)
Definition WsfEventUtils.cpp:2069
void PrintEM_BeamData(std::ostream &aStream, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::BeamData &aBeamData)
Definition WsfEventUtils.cpp:1990
void PrintSensorResult(std::ostream &aStream, WsfSensor *aSensorPtr, WsfSensorResult &aResult)
Definition WsfEventUtils.cpp:2256
void PrintEM_AbsXmtrRcvrData(std::ostream &aStream, const WsfEM_Interaction &aResult, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::LocationData &aLocData)
Definition WsfEventUtils.cpp:1943
void PrintEM_Range(std::ostream &aStream, double aRange, bool aWriteNewLine)
Definition WsfEventUtils.cpp:2063
void PrintTime(std::ostream &aStream, double aSimTime)
Definition WsfEventUtils.cpp:1442
void PrintLLA(std::ostream &aStream, double aLat, double aLon, double aAlt)
Definition WsfEventUtils.cpp:1473
void PrintDateTime(std::ostream &aStream, const WsfSimulation &aSimulation)
Definition WsfEventUtils.cpp:1448
void PrintTrackTargetName(std::ostream &aStream, const WsfTrack *aTrackPtr, WsfSimulation &aSimulation)
Definition WsfEventUtils.cpp:2804
void PrintAuxData(std::ostream &aStream, const UtAttributeContainer *aAuxDataPtr)
Definition WsfEventUtils.cpp:2369
void PrintTrackCovarianceData(std::ostream &aStream, double aSimTime, const std::string &aCovarianceType, const UtCovariance *aCovariancePtr, const WsfTrack *aTrackPtr)
Definition WsfEventUtils.cpp:2329
std::string MakePrintableString(const std::string &aInput)
Transform an input string that may contain unprintable characters into one that is 'acceptable'.
Definition WsfEventUtils.cpp:1483
void PrintMessageData(std::ostream &aStream, double aSimTime, const WsfMessage &aMessage, WsfSimulation &aSimulation, Settings::MessagePrintMap aMessagePrinters, bool aPrintTrackDataBrief)
Definition WsfEventUtils.cpp:2165
void PrintLocationData(std::ostream &aStream, UtEntity *aPlatformPtr)
Definition WsfEventUtils.cpp:2081
void PrintEvent(std::ostream &aStream, double aSimTime, const std::string &aSubjectName, const std::string &aEventName, const std::string &aObjectName, const std::string &aAdditionalInformation)
Definition WsfEventUtils.cpp:2830
void PrintPlatformEvent(std::ostream &aStream, WsfPlatform *aPlatformPtr, bool aShowPs)
Perform common print processing for the "PLATFORM_" messages.
Definition WsfEventUtils.cpp:2238
void PrintSystemOffOnEvent(std::ostream &aStream, double aSimTime, const std::string &aEvent, const std::string &aSystemType, WsfPlatformPart *aSystemPtr)
Print common information associated with turning a system off or on.
Definition WsfEventUtils.cpp:2310
void PrintEM_Interaction(std::ostream &aStream, WsfEM_Interaction &aResult)
Definition WsfEventUtils.cpp:1544
void PrintNonLocationData(std::ostream &aStream, WsfPlatform *aPlatformPtr, const std::string &aIndent)
Definition WsfEventUtils.cpp:2115
void PrintEM_RelTargetData(std::ostream &aStream, const WsfEM_Interaction &aResult, WsfPlatform *aTgtPtr, const WsfEM_Interaction::RelativeData &aRelData)
Definition WsfEventUtils.cpp:1906
void PrintEM_LocationData(std::ostream &aStream, WsfPlatform *aPlatformPtr, const WsfEM_Interaction::LocationData &aLocationData)
Definition WsfEventUtils.cpp:2031
event_output utilities for printing of text based event results
Definition WsfXIO_EventUtils.cpp:22
void PrintEM_AbsTargetData(std::ostream &aStream, const WsfEM_Interaction &aResult, const char *aPrefix, WsfPlatform *aTgtPtr, const WsfEM_Interaction::LocationData &aLocData, const Settings &aSettings)
Definition WsfEventUtils.cpp:413
void PrintLocationDataLLA(std::ostream &aStream, double aLat, double aLon, double aAlt, int aLatLonFormat)
Definition WsfEventUtils.cpp:601
void PrintSystemOffOnEvent(std::ostream &aStream, double aSimTime, const std::string &aEvent, const std::string &aSystemType, WsfPlatformPart *aSystemPtr, const Settings &aSettings)
Print common information associated with turning a system off or on.
Definition WsfEventUtils.cpp:847
void PrintTrackData(std::ostream &aStream, double aSimTime, const WsfTrack *aTrackPtr, const WsfSimulation &aSimulation, const Settings &aSettings)
Definition WsfEventUtils.cpp:925
void PrintMessageData(std::ostream &aStream, double aSimTime, const WsfMessage &aMessage, WsfSimulation &aSimulation, const Settings &aSettings)
Definition WsfEventUtils.cpp:691
std::string ContinueChar(bool aPrintSingleLinePerEvent)
Definition WsfEventUtils.cpp:59
void PrintPlatformEvent(std::ostream &aStream, WsfPlatform *aPlatformPtr, bool aShowPs, const Settings &aSettings)
Perform common print processing for the "PLATFORM_" messages.
Definition WsfEventUtils.cpp:755
void PrintLLA(std::ostream &aStream, double aLat, double aLon, double aAlt, int aLatLonFormat)
Definition WsfEventUtils.cpp:50
double PrintableAngle(double aAngle)
Definition WsfEventUtils.cpp:100
void PrintEM_Range(std::ostream &aStream, const char *aPrefix, double aRange, bool aPrintSingleLinePerEvent, bool aWriteNewLine)
Definition WsfEventUtils.cpp:585
void PrintNonLocationData(std::ostream &aStream, WsfPlatform *aPlatformPtr, const std::string &aIndent, const Settings &aSettings)
Definition WsfEventUtils.cpp:646
void PrintEM_RelXmtrRcvrData(std::ostream &aStream, const WsfEM_Interaction &aResult, const char *aPrefix, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::RelativeData &aRelData, bool aPrintSingleLinePerEvent)
Definition WsfEventUtils.cpp:472
void PrintTrackDataBrief(std::ostream &aStream, double aSimTime, const WsfTrack *aTrackPtr, int aTimeFormat)
Definition WsfEventUtils.cpp:1361
void PrintEM_BeamData(std::ostream &aStream, const char *aPrefix, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::BeamData &aBeamData, bool aPrintSingleLinePerEvent)
Definition WsfEventUtils.cpp:505
std::string MakePrintableString(const std::string &aInput)
Transform an input string that may contain unprintable characters into one that is 'acceptable'.
Definition WsfEventUtils.cpp:129
void PrintCommData(std::ostream &aStream, wsf::comm::Comm *aCommPtr, bool aShowAddress)
Definition WsfEventUtils.cpp:111
void PrintDateTime(std::ostream &aStream, const WsfSimulation &aSimulation)
Definition WsfEventUtils.cpp:84
void PrintLocationDataECI(std::ostream &aStream, const double aLocationECI[3])
Like PrintLocationDataLLA, but outputs ECI values instead.
Definition WsfEventUtils.cpp:631
void PrintEM_Interaction(std::ostream &aStream, WsfEM_Interaction &aResult, const Settings &aSettings)
Definition WsfEventUtils.cpp:190
void PrintTrackTargetName(std::ostream &aStream, const WsfTrack *aTrackPtr, const WsfSimulation &aSimulation)
Definition WsfEventUtils.cpp:1398
void PrintEM_RelTargetData(std::ostream &aStream, const WsfEM_Interaction &aResult, const char *aPrefix, WsfPlatform *aTgtPtr, const WsfEM_Interaction::RelativeData &aRelData, bool aPrintSingleLinePerEvent)
Definition WsfEventUtils.cpp:426
void PrintSensorResult(std::ostream &aStream, WsfSensor *aSensorPtr, WsfSensorResult &aResult, const Settings &aSettings)
Definition WsfEventUtils.cpp:771
void PrintEM_AbsXmtrRcvrData(std::ostream &aStream, const WsfEM_Interaction &aResult, const char *aPrefix, WsfEM_XmtrRcvr *aXmtrRcvrPtr, const WsfEM_Interaction::LocationData &aLocData, const Settings &aSettings)
Definition WsfEventUtils.cpp:459
void PrintRouterData(std::ostream &aStream, wsf::comm::router::Router *aRouterPtr)
Definition WsfEventUtils.cpp:121
void PrintTrackCovarianceData(std::ostream &aStream, double aSimTime, const std::string &aCovarianceType, const WsfCovariance *aCovariancePtr, const WsfTrack *aTrackPtr, bool aPrintSingleLinePerEvent)
Definition WsfEventUtils.cpp:863
void PrintAuxData(std::ostream &aStream, const UtAttributeContainer *aAuxDataPtr)
Definition WsfEventUtils.cpp:901
void PrintLocationData(std::ostream &aStream, UtEntity *aPlatformPtr, const Settings &aSettings)
Definition WsfEventUtils.cpp:611
void PrintEvent(std::ostream &aStream, double aSimTime, const std::string &aSubjectName, const std::string &aEventName, const std::string &aObjectName, const Settings &aSettings, const std::string &aAdditionalInformation)
Definition WsfEventUtils.cpp:1423
void PrintTime(std::ostream &aStream, double aSimTime, int aTimeFormat)
Definition WsfEventUtils.cpp:72
void PrintEM_LocationData(std::ostream &aStream, const char *aPrefix, WsfPlatform *aPlatformPtr, const WsfEM_Interaction::LocationData &aLocationData, const Settings &aSettings)
Definition WsfEventUtils.cpp:540
Definition WsfXIO_EventResults.cpp:33
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved