Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic blackboard implementation #26

Merged
merged 10 commits into from
Dec 18, 2023

Conversation

kaphula
Copy link
Collaborator

@kaphula kaphula commented Dec 13, 2023

Generalize blackboard.

From user's perspective, in addition to being able to use generic blackboard type, the user must now use tick directly with bt.tick(...) instead of bt.state.tick(...) This change is required so that we can pass a mutable reference of the blackboard to the user's tick callback under the hood.

@Sollimann
Copy link
Owner

Will try to find time to review tomorrow👌

Copy link
Owner

@Sollimann Sollimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a nit comment, other than that it looks good to me :) Great work 👍 Can merge after fixing the nit comment.

Also, another nit comment:

Are you currently able to branch out from this repo? if not, let me know and I will try to fix it in the repo settings. It makes it easier to inspect / collaborate on a PR if I can just git checkout your branch without having to clone the repo from your github.

@@ -1,26 +1,39 @@
use crate::status::Status::*;
use crate::{event::UpdateEvent, ActionArgs, Behavior, State, Status, RUNNING};
use std::fmt::Debug;
pub struct SequenceArgs<'a, A, E, F, B> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I believe this can be private i.e remove the pub keyword

@kaphula
Copy link
Collaborator Author

kaphula commented Dec 17, 2023

Hey, thanks for the review! I pushed the branch to your repository, should be there as generic-blackboard. Is that what you meant?

As for privating the SequenceArgs, I am not sure how this could be done because the struct must be used upon calling sequence function at state.rs. I had to create this struct because pre-commit prevented me from using too many arguments otherwise.

@Sollimann
Copy link
Owner

@kaphula Yea, that's what I meant. Thanks! Sorry, I didn't see that it was used in another file. You can make it pub(crate) instead to make it clear that it is used internally only.

@kaphula
Copy link
Collaborator Author

kaphula commented Dec 17, 2023

Alright, that's done.

@Sollimann Sollimann merged commit ec272b3 into Sollimann:main Dec 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants