12#ifndef WSFPLATFORMPART_HPP
13#define WSFPLATFORMPART_HPP
15#include "wsf_export.h"
91 mPlatformPtr = aPlatformPtr;
100 virtual void Update(
double aSimTime);
119 virtual void PlatformAdded(
double aSimTime,
WsfPlatform* aPlatformPtr);
121 virtual void PlatformDeleted(
WsfPlatform* aPlatformPtr);
136 return (!mIsOperational) && (mDamageFactor < 1.0) && (!mIsExternallyControlled);
143 bool CanBeTurnedOn()
const {
return mIsOperational && (!mIsTurnedOn) && (!mIsExternallyControlled); }
146 bool CanBeTurnedOff()
const {
return mIsTurnedOn && (!mIsExternallyControlled); }
158 virtual void TurnOff(
double aSimTime);
160 virtual void TurnOn(
double aSimTime);
162 virtual void SetOperational(
double aSimTime);
164 virtual void SetNonOperational(
double aSimTime);
166 virtual void PartBroken(
double aSimTime);
168 virtual void Restore(
double aSimTime);
180 bool SetOperational(
double aSimTime,
bool aMakeOperational);
188 bool SetDamageFactor(
double aSimTime,
double aDamageFactor);
197 virtual void OnPlatformBrokenEvent(
double aSimTime);
201 bool IsBroken()
const {
return (mDamageFactor == 1.0) && (!mIsRestorable); }
213 virtual bool ProcessMessage(
double aSimTime,
const WsfMessage& aMessage);
215 virtual bool ReceiveMessage(
double aSimTime,
const WsfMessage& aMessage);
218 virtual void SendMessage(
double aSimTime,
const WsfMessage& aMessage);
227 virtual void SendQueuedMessages(
double aSimTime);
249 void JoinGroup(
WsfGroup* aGroupPtr);
250 void LeaveGroup(
WsfGroup* aGroupPtr);
298 virtual void SetExternallyControlled(
double aSimTime,
bool aIsExternallyControlled);
331 double mLastStatusChangeTime;
334 double mAutomaticRecoveryTime;
337 double mDamageFactor;
346 bool mInitiallyTurnedOn;
359 bool mIsExternallyControlled;
362 bool mUpdateEventActive;
365 unsigned int mDebugMask;
369 unsigned int mUpdateEventEpoch;
372 InternalMessageQueue mInternalMessageQueue;
375 RecipientMessageQueue mRecipientMessageQueue;
377 std::recursive_mutex mMutex;
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
WsfComponentT< WsfPlatform > WsfPlatformComponent
A convenient typedef for a platform component.
Definition WsfComponent.hpp:171
aObjectPtr Update(simTime)
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
WsfAuxDataEnabled()=default
Contains the 'categories' to which an object belongs.
Definition WsfCategoryList.hpp:34
virtual const int * GetComponentRoles() const =0
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
virtual bool Initialize2(double aSimTime)
Definition WsfComponent.cpp:63
virtual void * QueryInterface(int aRole)=0
Contains the 'groups' to which platform or platform part belongs.
Definition WsfGroupList.hpp:30
A class to support the concept of 'groups' and 'group membership'.
Definition WsfGroup.hpp:30
Definition WsfInternalLinks.hpp:30
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
WsfStringId GetNameId() const
Definition WsfObject.hpp:66
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
const char * GetScriptClassName() const override
Definition WsfObject.cpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
WsfUniqueId()
Construtor initializes the unique identifier to 0.
Definition WsfUniqueId.hpp:38