-
Notifications
You must be signed in to change notification settings - Fork 4
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
More work for issues #6 and #13 #64
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
They block indefinitely, for now. But it starts up a task for each `[[logic]]` section that's defined.
- Add some comments - Have one method call another
If a logic node fails to initialize, report that it isn't being used and don't add it to the set of background tasks. Before this commit, a failure was causing a panic.
The client request/reply channel now includes a request for a setting channel for a device. The client specifies the device name and it gets an `mpsc::channel` in which to send settings. Logic nodes will need this to send calculated results.
This new enumeration value handles reporting errors due to parsing.
This commit covers several sets of changes: - The parser now takes an "environment", which is a pair of slices of strings. The parser uses then to lookup input and output devices, respectively. - `compile::compile()` was moved to `compile::Program::compile()` - `compile::eval()` takes an environment parameter which is an array of `Option<Value>`. The function uses it to get the latest values of devices when computing the expression. - Expressions support the `Display` trait.
This code needs testing, but I believe -- to first order -- that we can have devices control devices all within DrMem!
These two messages were expanded to include more information about what went wrong.
The `drmem-api` crate re-publishes the modules below `types` and makes `types` private. This makes many of the types have a shorter path (for instance, `drmem_api::device::Value` instead of `drmem_api::types::device::Value`.) In fixing the rest of the codebase to support this change, I also made using these types more consistent. Some files used `Value` from `drmem_api::device` while others used `redis::Value` and still others used it from `toml`. Now at least one level of module name is specified so it is obvious from where the definitions came.
The driver lifetime now consists of three phases instead of two. A new, initial phase was added so the drivers could register devices. The driver lifetime then loops through phases two and three. This commit not only changes the API, but fixes all the drivers to support it.
This feature should be kept up to date to include every driver.
If a driver fails during the call to `.create_instance()`, the managing task will restart it after 5 seconds. If it fails again, the delay is doubled to ten seconds, then doubled, etc. until it maxes out at 10 minutes. If `.create_instance()` ever succeeds, the timeout is reset to 5 seconds.
The two starting phases now have different error log names.
This commit contains a version of the 3-phase startup where all the drivers will complete registering their devices before the logic blocks are started.
The driver manager never returns, so its return type should be `Infallible`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an ongoing pull-request to finish work mentioned in #13, which will allow progress on issue #6.