-
Notifications
You must be signed in to change notification settings - Fork 7
Add updated events manager model from ramtares_main #120
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -64,14 +64,18 @@ class WatchValuesBaseCore : public SubscriptionBase { | |||||||||
| std::string name; /* (--) | ||||||||||
| Name, primarily for debugging purposes. May be left blank.*/ | ||||||||||
| bool locked{false}; /* (--) | ||||||||||
| Boolean used to lock at each cycle, so each WatchValuesBase cannot be | ||||||||||
| tested more than once per cycle, leading to unintended behavior.*/ | ||||||||||
| Boolean used to lock at each cycle, so each WatchValuesBase cannot be | ||||||||||
| tested more than once per cycle. Elaborate extension of WatchValuesBaseCore | ||||||||||
| -- such as EventTrigger -- caan create false negatives if evaluated | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling.
Suggested change
|
||||||||||
| multiple times with the same value of the watch-variable. */ | ||||||||||
| bool externally_managed{false}; /* (--) | ||||||||||
| Boolean setting that bool "locked" is set to once trigger is evaluated | ||||||||||
| true: lock after evaluation | ||||||||||
| (commonly set in CompoundEventsManager::create_trigger()) | ||||||||||
| (commonly set when an WatchValue is added to the CompoundEventsManager's | ||||||||||
| managed_triggers listi, such as when using create)trigger(...)) | ||||||||||
|
Comment on lines
+74
to
+75
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grammar.
Suggested change
|
||||||||||
| false: do not lock after evaluation, can be evaluated multiple times per | ||||||||||
| logging cycle (default, but overriden by create_trigger()) */ | ||||||||||
| logging cycle (default, but overriden by | ||||||||||
| CompoundEventssManager::add_trigger(...)) */ | ||||||||||
|
|
||||||||||
|
|
||||||||||
| protected: | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,13 @@ WatchValuesSet::initialize( std::list<WatchValuesBaseCore *> * active_watch_in) | |
| return; | ||
| } | ||
| for (WatchValuesBaseCore * trigger : triggers) { | ||
| // if (require_all) { | ||
| // // force multi_shot for all triggers when the set requires all triggers | ||
| // // to be fulfilled for the set to be fulfilled. This fixes a discrepancy | ||
| // // with DataCollect's behavior without requiring the logging user to be | ||
| // // careful with the multi_shot optimization. | ||
| // trigger->multi_shot = true; | ||
| // } | ||
|
Comment on lines
+50
to
+56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commented-out code isn't allowed unless there's some additional metadata included: https://nasa.github.io/cml/contributing/coding-standards.html#cml-mcs-general-5-commented-out-code-shall-only-be-allowed-when-accompanied-by-an-associated-project-issue-point-of-contact-email-address-and-current-date. Why is this commented out? What additional changes are necessary before uncommenting it? If this comment remains in, it needs to be specific about what "DataCollect" refers to. No such type or function exists in CML, Trick, or JEOD. |
||
| trigger->add_self_to_manager_active_list = false; | ||
| trigger->SubscriptionBase::initialize(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the standard library.