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
Add support for RemoteBridge update scripts #388
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
timburke
added
iotile-core
Related to iotile-core package
iotile-sensorgraph
Related to iotile-sensorgraph package
type:enhancement
Marks a proposed enhancement request
labels
Mar 7, 2018
Remaining work:
|
This makes the output of format_script repeatable across machines and comparable with just a straight binary comparison rather than checking whether the scripts are functionally identical.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
iotile-core
Related to iotile-core package
iotile-sensorgraph
Related to iotile-sensorgraph package
type:enhancement
Marks a proposed enhancement request
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.
Overview
This is a big PR but it lays the groundwork for working with RemoteBridge update scripts in CoreTools. In particular it adds support for parsing and creating them (without needing a specific
iotile-support-*
package containing old functionality to do so.There is now an
UpdateScript
class iniotile-core
that can parse and create binary.trub
update scripts from a series of action records. Some of these records are implemented iniotile-core
itself and there is a plugin mechanism for other packages to implement their own records.iotile-sensorgraph
takes advantage of this plugin system to implement all of the required actions needed to program a complete.sgf
file into an IOTile device.New User Facing Functionality
iotile-updateinfo
script installed withcoretools
that can take in any binary.trub
script file and print out all of the records that it contains in a human reading way. For example:iotile-sensorgraph
which is-f script
. This triggers the creation of a.trub
script containing all of the records necessary to program the sensorgraph into a device. For example, the above file was generated by a command line:.trub
parser is smart enough to understand that some high level actions like 'Load sensorgraph Node' compile down in a script into just a normalSendRPC
action. The parser is able to perform somewhat deep inspection on the records in a script in order to turn them back into high level actions. This is true even for actions that turn into multiple records likeSetConfigVariable
which turns into a sequence of begin_config, push_config, end_config actions which are themselves justSendRPC
actions.