Skip to content

Commit

Permalink
[RetryNode] add is_retrying and n_th_retry
Browse files Browse the repository at this point in the history
  • Loading branch information
umhan35 committed Nov 2, 2020
1 parent 9e39bfc commit 2a7e30a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/behaviortree_cpp_v3/decorators/retry_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ class RetryNode : public DecoratorNode

virtual void halt() override;

bool is_retrying() const {
return try_index_ > 0;
}

int n_th_retry() const {
return try_index_;
}

private:
int max_attempts_;
int try_index_;
Expand Down

0 comments on commit 2a7e30a

Please sign in to comment.