WSF
WsfXIO_Component.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_COMPONENT_HPP
13#define WSFXIO_COMPONENT_HPP
14
15class UtCallbackHolder;
16class PakProcessor;
17class WsfEM_Rcvr;
18class WsfEM_Xmtr;
19class WsfObject;
20class WsfPlatform;
21class WsfPlatformPart;
23class WsfSimulation;
25class WsfTaskResource;
26class WsfTrack;
36
38class WSF_EXPORT WsfXIO_Component : public WsfSimpleComponentParentT<WsfXIO_Simulation>
39{
40public:
41 WsfXIO_Component(int aRole, const std::string& aName);
42
44 bool Initialize() { return true; }
45
47
48 virtual void EM_RcvrInfo_Load(WsfXIO_EM_RcvrInfo& aInfo, const WsfEM_Rcvr& aRcvr) {}
49 virtual void EM_XmtrInfo_Load(WsfXIO_EM_XmtrInfo& aInfo, const WsfEM_Xmtr& aXmtr) {}
50
55
57
58 virtual void RegisterSimulationObservers(WsfSimulation& aSimulation, UtCallbackHolder& aCallbacks) {}
59
60 virtual bool FillPartState(const WsfPlatformPart& aPart, WsfXIO_PartStateChangePkt& aPkt) { return false; }
61
62 virtual WsfObject* FindPartType(int aPartType, WsfStringId aPartTypeName) { return nullptr; }
63
64 virtual WsfObject* FindPart(const WsfPlatform& aPlatform, int aPartType, WsfStringId aPartName) { return nullptr; }
66
68
69 virtual bool HandleStateChangeRequest(double aSimTime,
71 WsfPlatform* aPlatformPtr,
72 WsfEM_Xmtr*& aXmtrPtr,
73 WsfEM_Rcvr*& aRcvrPtr)
74 {
75 return false;
76 }
77
78
80
81 virtual bool HandleTaskCommand(double aSimTime,
83 WsfTaskProcessor* aProcA_Ptr,
84 WsfTaskProcessor* aProcB_Ptr,
85 WsfTrack* aTrackPtr,
86 WsfTaskResource* aResourcePtr)
87 {
88 return false;
89 }
90
91};
92
93#endif
WsfSimpleComponentT< WsfComponentT< PARENT_TYPE > > WsfSimpleComponentParentT
Definition WsfSimpleComponent.hpp:122
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfEM_Rcvr.hpp:68
Definition WsfEM_Xmtr.hpp:55
Definition WsfObject.hpp:40
Definition WsfPlatformPart.hpp:61
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfTaskProcessor.hpp:29
Attributes of a task-able resource.
Definition WsfTaskResource.hpp:30
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
virtual WsfXIO_PlatformPartInfo * CreatePlatformPartInfo(WsfPlatformPart &aPart)
Definition WsfXIO_Component.hpp:53
WsfXIO_Component(int aRole, const std::string &aName)
Definition WsfXIO_Component.cpp:14
virtual WsfObject * FindPart(const WsfPlatform &aPlatform, int aPartType, WsfStringId aPartName)
Definition WsfXIO_Component.hpp:64
virtual void EM_RcvrInfo_Load(WsfXIO_EM_RcvrInfo &aInfo, const WsfEM_Rcvr &aRcvr)
Definition WsfXIO_Component.hpp:48
virtual WsfObject * FindPartType(int aPartType, WsfStringId aPartTypeName)
Definition WsfXIO_Component.hpp:62
virtual void RegisterSimulationObservers(WsfSimulation &aSimulation, UtCallbackHolder &aCallbacks)
Definition WsfXIO_Component.hpp:58
virtual bool FillPartState(const WsfPlatformPart &aPart, WsfXIO_PartStateChangePkt &aPkt)
Definition WsfXIO_Component.hpp:60
virtual bool HandleTaskCommand(double aSimTime, WsfXIO_TaskCommandPkt &aPkt, WsfTaskProcessor *aProcA_Ptr, WsfTaskProcessor *aProcB_Ptr, WsfTrack *aTrackPtr, WsfTaskResource *aResourcePtr)
Definition WsfXIO_Component.hpp:81
virtual bool HandleStateChangeRequest(double aSimTime, WsfXIO_PartStateChangeRequestPkt &aPkt, WsfPlatform *aPlatformPtr, WsfEM_Xmtr *&aXmtrPtr, WsfEM_Rcvr *&aRcvrPtr)
Definition WsfXIO_Component.hpp:69
bool Initialize()
Called by WsfXIO_Interface to allow initialization of the component.
Definition WsfXIO_Component.hpp:44
virtual void EM_XmtrInfo_Load(WsfXIO_EM_XmtrInfo &aInfo, const WsfEM_Xmtr &aXmtr)
Definition WsfXIO_Component.hpp:49
XIO representation of a WsfEM_Rcvr.
Definition WsfXIO_ObjectInfo.hpp:138
XIO representation of a WsfEM_Xmtr.
Definition WsfXIO_ObjectInfo.hpp:158
Definition WsfXIO_Interface.hpp:54
Inform other applications about a platform part state change.
Definition WsfXIO_PacketRegistry.hpp:460
Requests that an application changes either state or mode of a platform part.
Definition WsfXIO_PacketRegistry.hpp:487
Definition WsfXIO_ObjectInfo.hpp:249
Definition WsfXIO_Simulation.hpp:49
Requests a task manager processor to create or modify a task.
Definition WsfXIO_PacketRegistry.hpp:727
Definition WsfXIO_TaskService.hpp:31
Copyrights Multiple, All Rights Reserved