WSF
ScriptedPart.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#ifndef L16_SCRIPTEDPART_HPP
12#define L16_SCRIPTEDPART_HPP
13
14#include <map>
15
16#include "ComputerPart.hpp"
17class UtScript;
18class WsfScenario;
19
20namespace WsfL16
21{
23{
24public:
25 ScriptedPart(WsfScenario& aScenario);
26 ScriptedPart(const ScriptedPart& aSrc);
27 ~ScriptedPart() override;
28 ComputerPart* Clone() const override;
29
30 bool Initialize(double aSimTime, ComputerProcessor& aComputer) override;
31
32 bool ProcessInput(UtInput& aInput) override;
33
35 void HandleReceive(double aSimTime, const Messages::InitialBase& aMessage) override;
36
38 void HandleSend(double aSimTime) override;
39
40private:
41 bool DecodeLabel(const std::string& aLabelStr, int& aLabel, int& aSubLabel);
42
43 typedef std::pair<int, int> MessageLabel;
44
45 UtScript* mOnSendScript;
46
47 std::map<MessageLabel, UtScript*> mReceiveScripts;
48};
49} // namespace WsfL16
50
51#endif
ComputerPart(WsfScenario &aScenario, const std::string &aClassName="WsfProcessor")
Definition ComputerPart.cpp:41
Sends and receives link16 messages.
Definition ComputerProcessor.hpp:50
void HandleReceive(double aSimTime, const Messages::InitialBase &aMessage) override
Handle an incoming message.
Definition ScriptedPart.cpp:124
~ScriptedPart() override
Definition ScriptedPart.cpp:47
ComputerPart * Clone() const override
Definition ScriptedPart.cpp:50
bool ProcessInput(UtInput &aInput) override
Definition ScriptedPart.cpp:108
void HandleSend(double aSimTime) override
This method is called when the a slot is open.
Definition ScriptedPart.cpp:142
bool Initialize(double aSimTime, ComputerProcessor &aComputer) override
Definition ScriptedPart.cpp:56
ScriptedPart(WsfScenario &aScenario)
Definition ScriptedPart.cpp:35
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
This file should be included prior to defining a message. Currently there is a limit of 32 fields per...
Definition AllMessages.hpp:55
Copyrights Multiple, All Rights Reserved