WSF
FiresDisObserver.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
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 FIRES_DISOBSERVER_HPP
13#define FIRES_DISOBSERVER_HPP
14
15#include "wsf_fires_export.h"
16
17#include <map>
18
19#include "DisEntityId.hpp"
20#include "DisEventId.hpp"
22class DisDetonation;
23class DisFire;
24#include "UtCallbackHolder.hpp"
26class WsfDisFire;
27#include "WsfDraw.hpp"
28class WsfPlatform;
29#include "WsfStringId.hpp"
30
31namespace Fires
32{
35class WSF_FIRES_EXPORT DisObserver
36{
37public:
38 explicit DisObserver(WsfSimulation* aSimPtr);
39
40 // void ProcessPDU(WsfDisFire& aFire); // incoming
41
42 void ProcessPDU(WsfDisDetonation& aDet); // incoming
43
44 void ProcessFirePDU(DisFire& aFire); // outgoing
45
46 void ProcessDetonationPDU(DisDetonation& aDet); // outgoing
47
48 typedef std::map<WsfStringId, DisEventId> NameToEventMap;
49 typedef std::map<DisEventId, WsfStringId> EventToNameMap;
50
51 const NameToEventMap& GetNameToEventMap() const { return mNameToEventMap; }
52 const EventToNameMap& GetEventToNameMap() const { return mEventToNameMap; }
53
54private:
55 void VisualizeDetonation(const DisEntityId& aFiringEntityId, const DisEntityId& aTargetEntityId);
56
57 // void VisualizeFire(const DisEntityId& aFiringEntityId,
58 // const DisEntityId& aTargetEntityId) const;
59
60 struct EngagementData
61 {
62 size_t mPlatformIndex;
63 WsfStringId mWeaponName;
64 int mEngagementId;
65 };
66
67 WsfSimulation* mSimPtr;
68 WsfDisInterface* mDisInterfacePtr;
69 WsfExtInterface* mExtInterfacePtr;
70
71 typedef std::map<DisEventId, EngagementData> EngagementDataMap;
72 EngagementDataMap mEngagementDataMap;
73
74 NameToEventMap mNameToEventMap;
75 EventToNameMap mEventToNameMap;
76 WsfDraw mDraw;
77 UtCallbackHolder mCallbacks;
78};
79}; // namespace Fires
80
81#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
std::map< DisEventId, WsfStringId > EventToNameMap
Definition FiresDisObserver.hpp:49
std::map< WsfStringId, DisEventId > NameToEventMap
Definition FiresDisObserver.hpp:48
void ProcessFirePDU(DisFire &aFire)
Perform custom processing on a fire PDU received from an external source.
Definition FiresDisObserver.cpp:144
DisObserver(WsfSimulation *aSimPtr)
Definition FiresDisObserver.cpp:32
void ProcessDetonationPDU(DisDetonation &aDet)
Definition FiresDisObserver.cpp:201
const NameToEventMap & GetNameToEventMap() const
Definition FiresDisObserver.hpp:51
void ProcessPDU(WsfDisDetonation &aDet)
Perform custom processing on a detonation PDU received from an external source.
Definition FiresDisObserver.cpp:100
const EventToNameMap & GetEventToNameMap() const
Definition FiresDisObserver.hpp:52
Definition WsfDisDetonation.hpp:27
Definition WsfDisFire.hpp:24
Definition WsfDisInterface.hpp:83
Provides the capability to draw shapes into the WSF replay file.
Definition WsfDraw.hpp:35
The WSF Ext is code which is shared between common external interfaces like DIS and HLA.
Definition WsfExtInterface.hpp:183
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Provide a top-level interface for including the fires library's types.
Definition BallisticPath.cpp:34
Copyrights Multiple, All Rights Reserved