WSF
WsfDefaultDisseminationImpl.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// The use, dissemination or disclosure of data in this file is subject to
7// limitation or restriction. See accompanying README and LICENSE for details.
8// ****************************************************************************
9/*******************************************************************************
10*
11* File: WsfDefaultDisseminationImpl.hpp
12*
13* Classification: UNCLASSIFIED
14*
15* Details:
16*
17* Contract Number:
18* Contractor Name: Radiance Technologies
19* Address: 350 Wynn Drive
20* Huntsville, AL 35805
21*
22* Abstract: This class provides default implementations in C++ for
23* what could be overridden in script for the Dissemination Manager base class.
24* The intention was to provide the classical implementation of what was originally
25* done in script so default usage of the processor works without supplemental scripting.
26*
27*******************************************************************************/
28
29#ifndef WSF_DEFAULT_DISSEMINATION_IMPL_HPP
30#define WSF_DEFAULT_DISSEMINATION_IMPL_HPP
31
32#include <string>
33#include <vector>
34#include <set>
35#include <utility>
36#include <memory>
37
38#include <UtInput.hpp>
39#include <WsfMessage.hpp>
40
41#include <WsfBMCommon.hpp>
45
46// forward declarations
48class WsfPlatform;
49class WsfAssetManager;
51class WsfWeapon;
52
53class WSF_IADS_C2_LIB_EXPORT WsfDefaultDisseminationImpl
54{
55 public:
57
58 virtual bool ProcessInput(UtInput& aInput);
59 virtual void Initialize(WsfBMDisseminateC2* dc2);
60 virtual void Initialize2(WsfBMDisseminateC2* dc2);
61
62 virtual void on_update(const double sim_time_s, WsfPlatform* this_plat, WsfBMDisseminateC2* dc2);
63 virtual bool on_message(const double sim_time_s, const WsfMessage& message, WsfBMDisseminateC2* dc2);
64
65 protected:
66 void HandleOutgoingAssignments(const double sim_time_s, std::vector<WsfBMAssignmentMessage>& messages, WsfBMDisseminateC2* dc2);
67 void HandleDelayedMessages(const double sim_time_s, WsfPlatform* this_plat, WsfBMDisseminateC2* dc2);
68
69 private:
70 WsfAssetManager* m_am_ref; // we don't own these allow slices
71 std::vector<std::pair<double, std::shared_ptr<WsfMessage>>> m_delayed_messages; // unique_ptr here has bad semantic for exporting an interface
72 std::set <std::string> m_direct_assigned_weapons; // really for testing purposes but will override message destination to go direct if assigned to
73};
74
75#endif
Definition WsfAssetManager.hpp:63
Definition WsfBMDisseminateC2.hpp:53
Definition WsfBattleManager.hpp:61
virtual void Initialize2(WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:171
virtual void on_update(const double sim_time_s, WsfPlatform *this_plat, WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:197
virtual bool ProcessInput(UtInput &aInput)
Definition WsfDefaultDisseminationImpl.cpp:145
void HandleDelayedMessages(const double sim_time_s, WsfPlatform *this_plat, WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:296
void HandleOutgoingAssignments(const double sim_time_s, std::vector< WsfBMAssignmentMessage > &messages, WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:273
virtual void Initialize(WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:166
WsfDefaultDisseminationImpl()
Definition WsfDefaultDisseminationImpl.cpp:141
virtual bool on_message(const double sim_time_s, const WsfMessage &message, WsfBMDisseminateC2 *dc2)
Definition WsfDefaultDisseminationImpl.cpp:238
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfWeapon.hpp:63
Copyrights Multiple, All Rights Reserved