12#ifndef WSFADVANCEDBEHAVIORTREENODE_HPP
13#define WSFADVANCEDBEHAVIORTREENODE_HPP
15#include "wsf_export.h"
21#include "WsfEventPipeClasses.hpp"
101 UtScriptContext*
GetContext(
void* aObjectPtr)
override;
148 virtual void AddChild(std::shared_ptr<WsfAdvancedBehaviorTreeNode> aNodePtr) {}
153 virtual void AddTree(ut::CloneablePtr<WsfAdvancedBehaviorTree>& aTreePtr) {}
156 virtual std::vector<std::shared_ptr<WsfAdvancedBehaviorTreeNode>>&
GetChildren()
158 throw std::logic_error(
"This node doesn't have children!");
162 virtual std::map<size_t, ut::CloneablePtr<WsfAdvancedBehaviorTree>>&
GetTrees()
164 throw std::logic_error(
"This node doesn't have children trees!");
194 void SetNodeName(
const std::string& aName);
211 const char* GetScriptClassName()
const override;
234 virtual void Halt(
const std::string& aReason) {}
240 virtual void HaltChildren(
unsigned int aIndex,
const std::string& aReason) {}
249 const unsigned int&
Id()
const {
return mId; }
261 virtual bool Initialize(
double aSimTime,
WsfScriptContext* aParentContextPtr);
276 const bool PreconditionsMet()
const;
287 bool ProcessInput(UtInput& aInput)
override;
293 virtual bool ProcessMessage(
double aSimTime,
const WsfMessage& aMessage);
301 static void Reset() { mNextUniqueId = 0; }
311 void SetFilePath(
const std::string& aPath);
316 void SetHasParent(
const bool aValue);
327 void SetTooltip(
const std::string& aText,
const bool aSendEvent =
false);
333 void SetPreconditionTooltip(
const std::string& aText,
const bool aSendEvent =
false);
339 void SetExecuteTooltip(
const std::string& aText,
const bool aSendEvent =
false);
371 void FindLastExecuted(std::vector<WsfAdvancedBehaviorTreeNode*>& aLastExecuted);
389 void SetInitScript(UtScript* aScriptPtr);
396 bool RegisterExternVariable(
const std::string& aVariableType,
const std::string& aVariableName);
399 UtScriptContext* GetScriptAccessibleContext()
const override;
405 void SetFileInfo(
const std::string& aPath,
const time_t& aModTime);
517 static unsigned int mNextUniqueId;
528 LoadResult
LoadType(UtInput& aInput)
override;
547 void Halt(
const std::string& aReason)
override;
553 const double PreconditionValue()
const override;
558 bool ProcessInput(UtInput& aInput)
override;
563 void RegisterInput(UtInput& aInput)
override;
566 void TurnOff()
override;
569 void TurnOn()
override;
574 void ResetPreconditionVars()
override;
595 void Halt(
const std::string& aReason)
override;
618 void Halt(
const std::string& aReason)
override;
638 void AddChild(std::shared_ptr<WsfAdvancedBehaviorTreeNode> aChildPtr)
override;
643 void AddTree(ut::CloneablePtr<WsfAdvancedBehaviorTree>& aTreePtr)
override;
649 std::map<size_t, ut::CloneablePtr<WsfAdvancedBehaviorTree>>&
GetTrees()
override {
return mTrees; }
652 void OutputTreeStructures(
const double aSimTime)
override;
655 void OutputTreeStates(
const double aSimTime)
override;
658 const int GetDepth()
const override;
663 void Halt(
const std::string& aReason)
override;
672 bool Initialize(
double aSimTime,
WsfScriptContext* aParentContextPtr)
override;
678 const double PreconditionValue()
const override;
686 void TurnOff()
override;
689 void TurnOn()
override;
695 void ResetPreconditionVars()
override;
699 const bool AreChildrenRunning()
const;
702 const unsigned int GetLastEnabledChild()
const;
705 const unsigned int GetNumEnabledChildren()
const;
711 void HaltChildren(
unsigned int aIndex,
const std::string& aReason)
override;
716 void HaltRunning(
const std::string& aReason);
719 std::vector<std::shared_ptr<WsfAdvancedBehaviorTreeNode>>
mChildren;
722 std::map<size_t, ut::CloneablePtr<WsfAdvancedBehaviorTree>>
mTrees;
734 void AddChild(std::shared_ptr<WsfAdvancedBehaviorTreeNode> aChildPtr)
override;
739 void AddTree(ut::CloneablePtr<WsfAdvancedBehaviorTree>& aTreePtr)
override;
837 void SetRepeats(
const int aRepeatCount);
842 void SetRunType(
const RunType aRunType);
870 const unsigned int aThreshold = 0);
879 void Halt(
const std::string& aReason)
override;
900 const unsigned int& GetThreshold()
const {
return mThreshold; }
910 void SetThreshold(
const unsigned int aThreshold);
913 unsigned int mNumChildrenFailure = 0;
916 unsigned int mNumChildrenSuccess = 0;
922 unsigned int mThreshold = 1;
959 void Halt(
const std::string& aReason)
override;
972 unsigned int mCurrentChildIndex;
1006 void Halt(
const std::string& aReason)
override;
1013 unsigned int mCurrentChildIndex;
1049 mutable WsfAdvancedBehaviorTreeNode* mCurrentSelectionPtr;
1074 const std::pair<double, WsfAdvancedBehaviorTreeNode*> GetRandomNode()
const;
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
BT::ReturnStatus Tick() override
Ticks the node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1321
WsfAdvancedBehaviorTreeActionNode & operator=(const WsfAdvancedBehaviorTreeActionNode &aRhs)=delete
WsfAdvancedBehaviorTreeActionNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1300
void Halt(const std::string &aReason) override
Halt this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1310
void SetTree(WsfAdvancedBehaviorTree *aTreePtr) override
Set the owning tree for this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1315
Definition WsfAdvancedBehaviorTreeNode.hpp:625
~WsfAdvancedBehaviorTreeCompositeNode() override=default
void AddTree(ut::CloneablePtr< WsfAdvancedBehaviorTree > &aTreePtr) override
Add a tree child to this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1481
std::map< size_t, ut::CloneablePtr< WsfAdvancedBehaviorTree > > & GetTrees() override
Return a list of current children trees held by this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:649
std::vector< std::shared_ptr< WsfAdvancedBehaviorTreeNode > > mChildren
Definition WsfAdvancedBehaviorTreeNode.hpp:719
void AddChild(std::shared_ptr< WsfAdvancedBehaviorTreeNode > aChildPtr) override
Add a child to this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1470
std::map< size_t, ut::CloneablePtr< WsfAdvancedBehaviorTree > > mTrees
Definition WsfAdvancedBehaviorTreeNode.hpp:722
WsfAdvancedBehaviorTreeCompositeNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1437
const bool HasChildrenContainer() const override
Get if this node can have children.
Definition WsfAdvancedBehaviorTreeNode.hpp:666
std::vector< std::shared_ptr< WsfAdvancedBehaviorTreeNode > > & GetChildren() override
Return a list of current children held by this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:646
WsfAdvancedBehaviorTreeCompositeNode & operator=(const WsfAdvancedBehaviorTreeCompositeNode &)=delete
void Halt(const std::string &aReason) override
Halt this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1406
WsfAdvancedBehaviorTreeConditionNode & operator=(const WsfAdvancedBehaviorTreeConditionNode &aRhs)=delete
WsfAdvancedBehaviorTreeConditionNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1396
BT::ReturnStatus Tick() override
Tick this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1411
void OutputTreeStates(const double aSimTime) override
Output this nodes tree states to the event pipe if they are outputting.
Definition WsfAdvancedBehaviorTreeNode.cpp:1725
WsfAdvancedBehaviorTreeDecoratorNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1690
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node and its child.
Definition WsfAdvancedBehaviorTreeNode.cpp:1743
void AddChild(std::shared_ptr< WsfAdvancedBehaviorTreeNode > aChildPtr) override
Add a child to this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1695
void OutputTreeStructures(const double aSimTime) override
Output this nodes children trees structures to the event pipe.
Definition WsfAdvancedBehaviorTreeNode.cpp:1712
WsfAdvancedBehaviorTreeDecoratorNode & operator=(const WsfAdvancedBehaviorTreeDecoratorNode &aRhs)=delete
void AddTree(ut::CloneablePtr< WsfAdvancedBehaviorTree > &aTreePtr) override
Add a tree child to this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:1706
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node and its child.
Definition WsfAdvancedBehaviorTreeNode.cpp:1791
WsfAdvancedBehaviorTreeInverterNode & operator=(const WsfAdvancedBehaviorTreeInverterNode &aRhs)=delete
WsfAdvancedBehaviorTreeInverterNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1763
WsfAdvancedBehaviorTreeLeafNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1163
const int GetDepth() const override
Return the depth of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:542
WsfAdvancedBehaviorTreeLeafNode & operator=(const WsfAdvancedBehaviorTreeLeafNode &aRhs)=delete
WsfAdvancedBehaviorTreeNegatorNode & operator=(const WsfAdvancedBehaviorTreeNegatorNode &aRhs)=delete
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.hpp:798
WsfAdvancedBehaviorTreeNegatorNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1847
LoadResult LoadType(UtInput &aInput) override
Load a new type object from an input stream.
Definition WsfAdvancedBehaviorTreeNode.cpp:559
WsfAdvancedBehaviorTreeNodeTypes(WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:549
Definition WsfAdvancedBehaviorTreeNode.hpp:138
virtual void TurnOn()
Turns this node on.
Definition WsfAdvancedBehaviorTreeNode.hpp:358
WsfAdvancedBehaviorTreeNode & operator=(const WsfAdvancedBehaviorTreeNode &)=delete
std::string mFullPathFileName
Definition WsfAdvancedBehaviorTreeNode.hpp:474
UtScript * mPreconditionScriptPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:504
UtScript * GetExecuteScript()
Return a pointer to the execute script for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:387
bool mInPrecondition
Definition WsfAdvancedBehaviorTreeNode.hpp:461
UtColor mColor
Definition WsfAdvancedBehaviorTreeNode.hpp:510
const WsfScenario & GetScenario() const
Return the current scenario.
Definition WsfAdvancedBehaviorTreeNode.hpp:208
const std::string & GetFilePath() const
Return the file path to the script this node was declared in.
Definition WsfAdvancedBehaviorTreeNode.hpp:183
time_t mFileLastModTime
Definition WsfAdvancedBehaviorTreeNode.hpp:440
virtual void SetTree(WsfAdvancedBehaviorTree *aTreePtr)
Set the owning tree for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:344
bool mHasParent
Definition WsfAdvancedBehaviorTreeNode.hpp:455
bool mHasDefinedColor
Definition WsfAdvancedBehaviorTreeNode.hpp:513
virtual void OutputTreeStructures(const double aSimTime)
Output this nodes children trees structures to the event pipe.
Definition WsfAdvancedBehaviorTreeNode.hpp:168
WsfAdvancedBehaviorTreeNode * mParentPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:428
UtScript * mNewFailScriptPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:501
bool mIsTreeRootNode
Definition WsfAdvancedBehaviorTreeNode.hpp:452
const std::string & GetPreconditionTooltip() const
Return the current precondition tooltip text for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:220
std::string mExecuteTooltip
Definition WsfAdvancedBehaviorTreeNode.hpp:486
virtual void AddChild(std::shared_ptr< WsfAdvancedBehaviorTreeNode > aNodePtr)
Add a child to this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:148
const bool & GetTurnedOn() const
Returns if this node is on.
Definition WsfAdvancedBehaviorTreeNode.hpp:226
bool mPreconditionRan
Definition WsfAdvancedBehaviorTreeNode.hpp:464
bool mInitialized
Definition WsfAdvancedBehaviorTreeNode.hpp:446
bool GetIsTreeRootNode() const
Get if this tree is a root node for a tree.
Definition WsfAdvancedBehaviorTreeNode.hpp:379
bool ExecutedLastTick() const
Definition WsfAdvancedBehaviorTreeNode.hpp:360
std::shared_ptr< WsfAttributeContainer > GetBlackboard()
Return a pointer to the blackboard for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:186
virtual void TurnOff()
Turns this node off.
Definition WsfAdvancedBehaviorTreeNode.hpp:355
virtual const bool HasChildrenContainer() const
Get if this node can have children.
Definition WsfAdvancedBehaviorTreeNode.hpp:243
WsfAdvancedBehaviorTreeNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:640
const bool & HasParent() const
Get if this node has a parent.
Definition WsfAdvancedBehaviorTreeNode.hpp:246
virtual void ResetPreconditionVars()
Reset the precondition ran and met var to false at the beginning of the tree tick.
Definition WsfAdvancedBehaviorTreeNode.hpp:306
void SetDescription(const std::string &aDesc)
Set the description of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:202
void SetIsTreeRootNode(const bool aState)
Set if this node is the root node for a tree.
Definition WsfAdvancedBehaviorTreeNode.hpp:376
std::shared_ptr< WsfAttributeContainer > mBlackboard
Definition WsfAdvancedBehaviorTreeNode.hpp:419
virtual std::map< size_t, ut::CloneablePtr< WsfAdvancedBehaviorTree > > & GetTrees()
Return a list of current children trees held by this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:162
UtScript * mExecuteScriptPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:507
static unsigned int GetUniqueNodeId()
Get a unique int id for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:229
WsfScriptContext * mContextPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:422
WsfScriptStateMachine * ChildStateMachine()
Definition WsfAdvancedBehaviorTreeNode.hpp:381
virtual void Halt(const std::string &aReason)
Halt the execution of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:234
const unsigned int & Id() const
Return the unique id for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:249
bool HasDefinedColor() const
Return the string representation of this node's color.
Definition WsfAdvancedBehaviorTreeNode.hpp:255
const time_t & GetFileLastModTime() const
Return the last time the script this node was declared in was modified.
Definition WsfAdvancedBehaviorTreeNode.hpp:180
double mExecuteTooltipTimestamp
Definition WsfAdvancedBehaviorTreeNode.hpp:492
WsfAdvancedBehaviorTree * mParentTreePtr
Definition WsfAdvancedBehaviorTreeNode.hpp:431
WsfAdvancedBehaviorTreeNode * GetParent() const
Returns a pointer to the current parent of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:273
const std::string & GetExecuteTooltip() const
Return the current execute tooltip text for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:223
const std::string & GetDescription() const
Get the description of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:197
const WsfScriptContext & GetScriptContext() const
Returns a reference to the script context for this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:214
WsfAdvancedBehaviorTreeNode * Clone() const override=0
Clone this node.
virtual BT::ReturnStatus TickFunction()
This is the functionality ran by each node, e.g how the node handles its tick.
Definition WsfAdvancedBehaviorTreeNode.hpp:352
virtual std::vector< std::shared_ptr< WsfAdvancedBehaviorTreeNode > > & GetChildren()
Return a list of current children held by this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:156
static void Reset()
Reset the unique int counter.
Definition WsfAdvancedBehaviorTreeNode.hpp:301
void SetParent(WsfAdvancedBehaviorTreeNode *aNodePtr)
Set the parent of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:321
virtual const int GetDepth() const
Get the depth of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:177
bool mPreconditionMet
Definition WsfAdvancedBehaviorTreeNode.hpp:468
virtual void HaltChildren(unsigned int aIndex, const std::string &aReason)
Halt the execution of this node's children starting at an index.
Definition WsfAdvancedBehaviorTreeNode.hpp:240
int mStateIndex
Definition WsfAdvancedBehaviorTreeNode.hpp:437
WsfScriptStateMachine * mFiniteStateMachinePtr
Definition WsfAdvancedBehaviorTreeNode.hpp:434
WsfScriptMessageHandler * mMessageHandlerPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:425
BT::ReturnStatus mReturnStatus
Definition WsfAdvancedBehaviorTreeNode.hpp:471
virtual void RegisterInput(UtInput &aInput)
Register a file path and last modified time from an input.
Definition WsfAdvancedBehaviorTreeNode.hpp:298
const std::string & GetNodeName() const
Get the name of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:189
UtScript * mOnInitScriptPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:495
UtScript * mNewExecuteScriptPtr
Definition WsfAdvancedBehaviorTreeNode.hpp:498
double mPreconditionTooltipTimestamp
Definition WsfAdvancedBehaviorTreeNode.hpp:489
std::string mName
Definition WsfAdvancedBehaviorTreeNode.hpp:477
std::string mDescription
Definition WsfAdvancedBehaviorTreeNode.hpp:480
virtual const double PreconditionValue() const
Returns a fitness value representing how well the precondition ran.
Definition WsfAdvancedBehaviorTreeNode.hpp:282
const UtColor & GetColor() const
Return this node's color.
Definition WsfAdvancedBehaviorTreeNode.hpp:252
bool mExecutedLastTick
Definition WsfAdvancedBehaviorTreeNode.hpp:458
const BT::ReturnStatus & GetNodeStatus() const
Get the ReturnStatus of this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:205
virtual void AddTree(ut::CloneablePtr< WsfAdvancedBehaviorTree > &aTreePtr)
Add a tree child to this node.
Definition WsfAdvancedBehaviorTreeNode.hpp:153
unsigned int mId
Definition WsfAdvancedBehaviorTreeNode.hpp:413
virtual void OutputTreeStates(const double aSimTime)
Output this nodes tree states to the event pipe if they are outputting.
Definition WsfAdvancedBehaviorTreeNode.hpp:171
bool mDebug
Definition WsfAdvancedBehaviorTreeNode.hpp:443
bool mTurnedOn
Definition WsfAdvancedBehaviorTreeNode.hpp:449
std::string mPreconditionTooltip
Definition WsfAdvancedBehaviorTreeNode.hpp:483
const WsfScenario & mScenario
Definition WsfAdvancedBehaviorTreeNode.hpp:416
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2127
WsfAdvancedBehaviorTreeParallelNode & operator=(const WsfAdvancedBehaviorTreeParallelNode &aRhs)=delete
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.cpp:2065
void Halt(const std::string &aReason) override
Halt the execution of this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:2056
WsfAdvancedBehaviorTreeParallelNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:2033
bool ProcessInput(UtInput &aInput) override
Process input from a script.
Definition WsfAdvancedBehaviorTreeNode.cpp:2091
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2651
WsfAdvancedBehaviorTreePrioritySelectorNode & operator=(const WsfAdvancedBehaviorTreePrioritySelectorNode &aRhs)=delete
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.cpp:2633
WsfAdvancedBehaviorTreePrioritySelectorNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:2611
Definition WsfAdvancedBehaviorTreeNode.hpp:805
int mRepeats
Definition WsfAdvancedBehaviorTreeNode.hpp:849
RunType & GetRunType()
Get the run type for this repeater node.
Definition WsfAdvancedBehaviorTreeNode.hpp:832
RunType mRunType
Definition WsfAdvancedBehaviorTreeNode.hpp:861
RunType
Run Type of the node.
Definition WsfAdvancedBehaviorTreeNode.hpp:813
@ UntilDone
Definition WsfAdvancedBehaviorTreeNode.hpp:816
@ Repeat
Definition WsfAdvancedBehaviorTreeNode.hpp:814
@ ForTime
Definition WsfAdvancedBehaviorTreeNode.hpp:815
WsfAdvancedBehaviorTreeRepeaterNode & operator=(const WsfAdvancedBehaviorTreeRepeaterNode &aRhs)=delete
double & GetRunDuration()
Returns a reference to the run duration.
Definition WsfAdvancedBehaviorTreeNode.hpp:829
double mRunStartTime
Definition WsfAdvancedBehaviorTreeNode.hpp:858
double mRunDuration
Definition WsfAdvancedBehaviorTreeNode.hpp:855
int & GetRepeats()
Returns a reference to the number of repeats.
Definition WsfAdvancedBehaviorTreeNode.hpp:826
int mRepeatsLeft
Definition WsfAdvancedBehaviorTreeNode.hpp:852
WsfAdvancedBehaviorTreeRepeaterNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1880
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2383
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.cpp:2369
WsfAdvancedBehaviorTreeSelectorNodeWithMemory(const WsfScenario &aScenario, BT::ResetPolicy aResetPolicy)
Definition WsfAdvancedBehaviorTreeNode.cpp:2335
WsfAdvancedBehaviorTreeSelectorNodeWithMemory & operator=(const WsfAdvancedBehaviorTreeSelectorNodeWithMemory &aRhs)=delete
void Halt(const std::string &aReason) override
Halt the execution of this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:2361
WsfAdvancedBehaviorTreeSelectorNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:2252
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.cpp:2271
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2285
WsfAdvancedBehaviorTreeSelectorNode & operator=(const WsfAdvancedBehaviorTreeSelectorNode &aRhs)=delete
WsfAdvancedBehaviorTreeSequenceNodeWithMemory(const WsfScenario &aScenario, BT::ResetPolicy aResetPolicy)
Definition WsfAdvancedBehaviorTreeNode.cpp:2515
void Halt(const std::string &aReason) override
Halt the execution of this node.
Definition WsfAdvancedBehaviorTreeNode.cpp:2541
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and it's children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2549
WsfAdvancedBehaviorTreeSequenceNodeWithMemory & operator=(const WsfAdvancedBehaviorTreeSequenceNodeWithMemory &aRhs)=delete
WsfAdvancedBehaviorTreeSequenceNode & operator=(const WsfAdvancedBehaviorTreeSequenceNode &aRhs)=delete
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2465
WsfAdvancedBehaviorTreeSequenceNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:2446
WsfAdvancedBehaviorTreeSucceederNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:1814
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its child.
Definition WsfAdvancedBehaviorTreeNode.cpp:1827
WsfAdvancedBehaviorTreeSucceederNode & operator=(const WsfAdvancedBehaviorTreeSucceederNode &aRhs)=delete
WsfAdvancedBehaviorTreeWeightedRandomNode & operator=(const WsfAdvancedBehaviorTreeWeightedRandomNode &aRhs)=delete
BT::ReturnStatus TickFunction() override
Tick forward and update the execution of this node, and its children.
Definition WsfAdvancedBehaviorTreeNode.cpp:2831
WsfAdvancedBehaviorTreeWeightedRandomNode(const WsfScenario &aScenario)
Definition WsfAdvancedBehaviorTreeNode.cpp:2761
const double PreconditionValue() const override
Returns a fitness value representing how important this node is.
Definition WsfAdvancedBehaviorTreeNode.cpp:2822
Definition WsfAdvancedBehaviorTree.hpp:54
Definition WsfAttributeContainer.hpp:24
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
WsfObjectTypeList(WsfScenario &aScenario, unsigned int aFlags, const std::string &aBlockName)
Definition WsfObjectTypeList.hpp:76
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
UtScriptContext * GetContext(void *aObjectPtr) override
Return a pointer to the script context for an object.
Definition WsfAdvancedBehaviorTreeNode.cpp:84
UT_DECLARE_SCRIPT_METHOD(SetSharedBlackboardVar)
UT_DECLARE_SCRIPT_METHOD(Failure_2)
UT_DECLARE_SCRIPT_METHOD(DeleteSharedBlackboardVar)
UT_DECLARE_SCRIPT_METHOD(SetSharedBlackboardPlatformVar)
UT_DECLARE_SCRIPT_METHOD(Tree)
UT_DECLARE_SCRIPT_METHOD(CreateSharedBlackboard)
UT_DECLARE_SCRIPT_METHOD(SharedBlackboardVarExists)
UT_DECLARE_SCRIPT_METHOD(SetBlackboardVar)
UT_DECLARE_SCRIPT_METHOD(ShareBlackboard)
UT_DECLARE_SCRIPT_METHOD(SetSharedBlackboardTrackVar)
UT_DECLARE_SCRIPT_METHOD(TurnOn)
UT_DECLARE_SCRIPT_METHOD(DeleteBlackboardVar)
UT_DECLARE_SCRIPT_METHOD(GetBlackboardVar)
UT_DECLARE_SCRIPT_METHOD(State)
UT_DECLARE_SCRIPT_METHOD(Running_2)
UT_DECLARE_SCRIPT_METHOD(Id)
UT_DECLARE_SCRIPT_METHOD(ShareBlackboardWithName)
UT_DECLARE_SCRIPT_METHOD(GetSharedBlackboardVar)
WsfScriptAdvancedBehaviorTreeNodeClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfAdvancedBehaviorTreeNode.cpp:40
UT_DECLARE_SCRIPT_METHOD(Success_1)
UT_DECLARE_SCRIPT_METHOD(Type)
UT_DECLARE_SCRIPT_METHOD(Success_2)
UT_DECLARE_SCRIPT_METHOD(Failure_1)
UT_DECLARE_SCRIPT_METHOD(SetBlackboardPlatformVar)
UT_DECLARE_SCRIPT_METHOD(SetBlackboardTrackVar)
UT_DECLARE_SCRIPT_METHOD(TurnOff)
UT_DECLARE_SCRIPT_METHOD(SharedBlackboardExists)
UT_DECLARE_SCRIPT_METHOD(BlackboardVarExists)
UT_DECLARE_SCRIPT_METHOD(Running_1)
Definition WsfScriptContext.hpp:71
Definition WsfScriptMessageHandler.hpp:42
void * Clone(void *aObjectPtr) override
Definition WsfScriptObjectClass.cpp:50
WsfScriptObjectClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfScriptObjectClass.cpp:24
Definition WsfScriptProcessor.hpp:43
Definition WsfScriptStateMachine.hpp:47
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfAdvancedBehaviorTreeNode.hpp:39
ReturnStatus
The return status of a node at a given time step (tick).
Definition WsfAdvancedBehaviorTreeNode.hpp:49
@ cFAILURE
Definition WsfAdvancedBehaviorTreeNode.hpp:52
@ cHALTED
Definition WsfAdvancedBehaviorTreeNode.hpp:54
@ cDISABLED
Definition WsfAdvancedBehaviorTreeNode.hpp:55
@ cSUCCESS
Definition WsfAdvancedBehaviorTreeNode.hpp:51
@ cIDLE
Definition WsfAdvancedBehaviorTreeNode.hpp:53
@ cRUNNING
Definition WsfAdvancedBehaviorTreeNode.hpp:50
FailurePolicy
Failure policy for a Parallel composite node.
Definition WsfAdvancedBehaviorTreeNode.hpp:75
@ cFAIL_ON_ONE
Definition WsfAdvancedBehaviorTreeNode.hpp:76
@ cFAIL_ON_ALL
Definition WsfAdvancedBehaviorTreeNode.hpp:77
SuccessPolicy
Success policy for a Parallel composite node.
Definition WsfAdvancedBehaviorTreeNode.hpp:64
@ cSUCCEED_ON_ONE
Definition WsfAdvancedBehaviorTreeNode.hpp:65
@ cTHRESHOLD
Definition WsfAdvancedBehaviorTreeNode.hpp:67
@ cSUCCEED_ON_ALL
Definition WsfAdvancedBehaviorTreeNode.hpp:66
ResetPolicy
Reset policy for nodes with memory.
Definition WsfAdvancedBehaviorTreeNode.hpp:86
@ cON_SUCCESS_OR_FAILURE
Definition WsfAdvancedBehaviorTreeNode.hpp:87
@ cON_SUCCESS
Definition WsfAdvancedBehaviorTreeNode.hpp:88
@ cON_FAILURE
Definition WsfAdvancedBehaviorTreeNode.hpp:89