VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtDroneTaskLogic Class Reference

Detailed Description

This component manages loiter task menu attributes and loiter task command dispatch independently of deployable lifecycle management.

#include <droneTaskLogic.h>

Inheritance diagram for makVre::DtDroneTaskLogic:
[legend]

Public Member Functions

 DtDroneTaskLogic ()
 
virtual ~DtDroneTaskLogic () override
 
virtual bool initialize (DtPlayerStation *player, DtInitTable &config) override
 
virtual void tick (double dt) override
 
virtual const char * type () const override
 
virtual void setDroneAutopilotMode (const std::string &mode)
 
virtual void toggleDroneAutopilotMode ()
 
virtual void cycleDroneLoiterMode ()
 
virtual void cycleDroneLoiterOrbitDirection ()
 
virtual void toggleDroneLoiter ()
 
virtual void setDroneLoiterRelativeAltitudeFromDisplay (const std::string &value)
 
virtual void setDroneLoiterRelativeHorizontalDistanceFromDisplay (const std::string &value)
 
virtual void setDroneLoiterRelativeBearingFromDisplay (const std::string &value)
 
virtual void startDroneLoiter (const DtRwLocationReference &targetLocationReference)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
virtual bool postInitialize ()
 
virtual void shutdown ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Private Types

enum  TargetMode { OwnshipTarget , DeployableTarget }
 

Private Member Functions

DtEntityIdentifier resolveTargetEntity ()
 
void stopDroneLoiter (const DtEntityIdentifier &targetId)
 
void syncWithBackendAutopilotMode ()
 
void restartDroneLoiterIfActive ()
 
void updateDroneLoiterModeAttributes ()
 
void updateLoiterDisplayAttributes ()
 

Private Attributes

TargetMode myTargetMode
 
bool myDroneLoiterUseCurrentRelativeAltitudeFeet
 
double myDroneLoiterRelativeAltitudeFeet
 
bool myDroneLoiterUseCurrentRelativeHorizontalDistanceMeters
 
double myDroneLoiterRelativeHorizontalDistanceMeters
 
bool myDroneLoiterUseCurrentRelativeBearingDeg
 
double myDroneLoiterRelativeBearingDeg
 
bool myDroneLoiterOrbitClockwise
 
int myDroneLoiterModeIndex
 
DtRwLocationReference myDroneLoiterTargetRef
 
std::string myLastBackendAutopilotMode
 
DtAttributeHandleType< DtEntityIdentifier > myDroneEntityIdAttr
 
DtAttributeHandleType< DtEntityIdentifier > myForwardControlsToAttr
 
DtAttributeHandleType< bool > myDroneManualControlAttr
 
DtAttributeHandleType< std::string > myDroneLoiterModeNameAttr
 
DtAttributeHandleType< bool > myDroneLoiterModeIsOrbitAttr
 
DtAttributeHandleType< std::string > myDroneLoiterRelativeAltitudeDisplayAttr
 
DtAttributeHandleType< std::string > myDroneLoiterRelativeHorizontalDistanceDisplayAttr
 
DtAttributeHandleType< std::string > myDroneLoiterRelativeBearingDisplayAttr
 
DtAttributeHandleType< std::string > myDroneLoiterOrbitDirectionNameAttr
 
DtAttributeHandleType< bool > myDroneLoiteringAttr
 

Additional Inherited Members

- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

Member Enumeration Documentation

◆ TargetMode

Enumerator
OwnshipTarget 
DeployableTarget 

Constructor & Destructor Documentation

◆ DtDroneTaskLogic()

makVre::DtDroneTaskLogic::DtDroneTaskLogic ( )

◆ ~DtDroneTaskLogic()

virtual makVre::DtDroneTaskLogic::~DtDroneTaskLogic ( )
overridevirtual

Member Function Documentation

◆ initialize()

virtual bool makVre::DtDroneTaskLogic::initialize ( DtPlayerStation * player,
DtInitTable & config )
overridevirtual

Initializes the component.

Parameters
playerPointer to the player station that owns this component
configConfiguration table with component settings
Returns
True if initialization was successful, false otherwise

Called when the component is first created during player station initialization. This method performs initial setup and calls initializeStateAttributes(). Components should override this method to perform type-specific initialization, but must call the base class implementation first.

Reimplemented from makVre::DtPlayerComponent.

References makVre::DtPlayerComponent::player().

◆ tick()

virtual void makVre::DtDroneTaskLogic::tick ( double dt)
overridevirtual

Updates the component.

Parameters
dtTime in seconds since the last tick

Called once per frame to update the component's state. All concrete component classes must implement this method.

Implements makVre::DtPlayerComponent.

◆ type()

virtual const char * makVre::DtDroneTaskLogic::type ( ) const
overridevirtual

Gets the component type identifier.

Returns
Reference to the component type string

Returns the unique type identifier for this component class. The type string is used by the component system to identify and instantiate components based on role configuration. Each component class should return a consistent, descriptive type name (e.g., "DtDriverControlLogic", "DtObserverUpdater").

Note
This is a pure virtual method that must be implemented by all derived classes.

Implements makVre::DtPlayerComponent.

◆ setDroneAutopilotMode()

virtual void makVre::DtDroneTaskLogic::setDroneAutopilotMode ( const std::string & mode)
virtual

◆ toggleDroneAutopilotMode()

virtual void makVre::DtDroneTaskLogic::toggleDroneAutopilotMode ( )
virtual

◆ cycleDroneLoiterMode()

virtual void makVre::DtDroneTaskLogic::cycleDroneLoiterMode ( )
virtual

◆ cycleDroneLoiterOrbitDirection()

virtual void makVre::DtDroneTaskLogic::cycleDroneLoiterOrbitDirection ( )
virtual

◆ toggleDroneLoiter()

virtual void makVre::DtDroneTaskLogic::toggleDroneLoiter ( )
virtual

◆ setDroneLoiterRelativeAltitudeFromDisplay()

virtual void makVre::DtDroneTaskLogic::setDroneLoiterRelativeAltitudeFromDisplay ( const std::string & value)
virtual

◆ setDroneLoiterRelativeHorizontalDistanceFromDisplay()

virtual void makVre::DtDroneTaskLogic::setDroneLoiterRelativeHorizontalDistanceFromDisplay ( const std::string & value)
virtual

◆ setDroneLoiterRelativeBearingFromDisplay()

virtual void makVre::DtDroneTaskLogic::setDroneLoiterRelativeBearingFromDisplay ( const std::string & value)
virtual

◆ startDroneLoiter()

virtual void makVre::DtDroneTaskLogic::startDroneLoiter ( const DtRwLocationReference & targetLocationReference)
virtual

◆ resolveTargetEntity()

DtEntityIdentifier makVre::DtDroneTaskLogic::resolveTargetEntity ( )
private

◆ stopDroneLoiter()

void makVre::DtDroneTaskLogic::stopDroneLoiter ( const DtEntityIdentifier & targetId)
private

◆ syncWithBackendAutopilotMode()

void makVre::DtDroneTaskLogic::syncWithBackendAutopilotMode ( )
private

◆ restartDroneLoiterIfActive()

void makVre::DtDroneTaskLogic::restartDroneLoiterIfActive ( )
private

◆ updateDroneLoiterModeAttributes()

void makVre::DtDroneTaskLogic::updateDroneLoiterModeAttributes ( )
private

◆ updateLoiterDisplayAttributes()

void makVre::DtDroneTaskLogic::updateLoiterDisplayAttributes ( )
private

Member Data Documentation

◆ myTargetMode

TargetMode makVre::DtDroneTaskLogic::myTargetMode
private

◆ myDroneLoiterUseCurrentRelativeAltitudeFeet

bool makVre::DtDroneTaskLogic::myDroneLoiterUseCurrentRelativeAltitudeFeet
private

◆ myDroneLoiterRelativeAltitudeFeet

double makVre::DtDroneTaskLogic::myDroneLoiterRelativeAltitudeFeet
private

◆ myDroneLoiterUseCurrentRelativeHorizontalDistanceMeters

bool makVre::DtDroneTaskLogic::myDroneLoiterUseCurrentRelativeHorizontalDistanceMeters
private

◆ myDroneLoiterRelativeHorizontalDistanceMeters

double makVre::DtDroneTaskLogic::myDroneLoiterRelativeHorizontalDistanceMeters
private

◆ myDroneLoiterUseCurrentRelativeBearingDeg

bool makVre::DtDroneTaskLogic::myDroneLoiterUseCurrentRelativeBearingDeg
private

◆ myDroneLoiterRelativeBearingDeg

double makVre::DtDroneTaskLogic::myDroneLoiterRelativeBearingDeg
private

◆ myDroneLoiterOrbitClockwise

bool makVre::DtDroneTaskLogic::myDroneLoiterOrbitClockwise
private

◆ myDroneLoiterModeIndex

int makVre::DtDroneTaskLogic::myDroneLoiterModeIndex
private

◆ myDroneLoiterTargetRef

DtRwLocationReference makVre::DtDroneTaskLogic::myDroneLoiterTargetRef
private

◆ myLastBackendAutopilotMode

std::string makVre::DtDroneTaskLogic::myLastBackendAutopilotMode
private

◆ myDroneEntityIdAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtDroneTaskLogic::myDroneEntityIdAttr
private

◆ myForwardControlsToAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtDroneTaskLogic::myForwardControlsToAttr
private

◆ myDroneManualControlAttr

DtAttributeHandleType<bool> makVre::DtDroneTaskLogic::myDroneManualControlAttr
private

◆ myDroneLoiterModeNameAttr

DtAttributeHandleType<std::string> makVre::DtDroneTaskLogic::myDroneLoiterModeNameAttr
private

◆ myDroneLoiterModeIsOrbitAttr

DtAttributeHandleType<bool> makVre::DtDroneTaskLogic::myDroneLoiterModeIsOrbitAttr
private

◆ myDroneLoiterRelativeAltitudeDisplayAttr

DtAttributeHandleType<std::string> makVre::DtDroneTaskLogic::myDroneLoiterRelativeAltitudeDisplayAttr
private

◆ myDroneLoiterRelativeHorizontalDistanceDisplayAttr

DtAttributeHandleType<std::string> makVre::DtDroneTaskLogic::myDroneLoiterRelativeHorizontalDistanceDisplayAttr
private

◆ myDroneLoiterRelativeBearingDisplayAttr

DtAttributeHandleType<std::string> makVre::DtDroneTaskLogic::myDroneLoiterRelativeBearingDisplayAttr
private

◆ myDroneLoiterOrbitDirectionNameAttr

DtAttributeHandleType<std::string> makVre::DtDroneTaskLogic::myDroneLoiterOrbitDirectionNameAttr
private

◆ myDroneLoiteringAttr

DtAttributeHandleType<bool> makVre::DtDroneTaskLogic::myDroneLoiteringAttr
private

The documentation for this class was generated from the following file: