This repository was archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Element handle #300
Merged
Merged
Element handle #300
Conversation
This file contains hidden or 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
👎 review done. |
👎 reviews done |
CConfigurableElement::isRogue() method was only suitable for parameters, not for elements. If an element did not belong to any domain, but one of its descendent did, this method would have mistakenly returned true. This error was not detected up to now for this method was only used with parameters (leaf elements in parameter tree). Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com> Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Handles have non const method, thus their reference on PF elements should not be const. It used to work because the only method called `access` was const even when setting a value. Give a non const value to ParameterHandle constructor. It will be used in a future Handle that will call non const methods. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
mayFailCall is a function that takes a method and arguments and calls the method, transforming the error code in exception. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
240f360
to
15b8c01
Compare
c3e0b3f
to
0963b08
Compare
1 task
👎 review done |
Add a static_assert to detect incorrect method usage. Without it, an error would still occur but might be harder to debug. Use a human readable error message instead. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Extract a `getSettingsAsBytes` and `setSettingsAsBytes` method from the corresponding remote command handling. This permits to access elements a bytes from a c++ interface without duplicating the code. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
This patch pulls the mapping functionality up by one class: it is now available as part of CConfigurableElement interface. CConfigurableElementWithMapping is no more necessary so it's been removed. This patchs allows accessing he mapping functionalities from a configurable element without the need to know its actual nature (instance configurable element or subsystem). Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com> Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
CElementHandle can be used by applications to directly control an element part of the parameter tree. CElementHandle objects can be created by calling the platform connector class new createElementHandle() functionality. Element handle objects are owned by the application so it's its responsibility to destroy them through a "delete" operation. The following functionalities are available in CElementHandle class: - getting element's name - getting element's path in parameter hierarchy tree - getting element's memory size in bytes - determining if element is rogue - getting the structure of the element (expanded version of the structure) - getting/setting the element's settings in XML format - getting/setting the element's settings in binary format Notes: - setting the element's settings in binary shall be done cautiously: no check is made as to the data integrity, meaning the operation could result in inconsistent parameter states where some parameter values are out of range or invalid wrt their type - setting the element's settings will fail if the element is not rogue (belong to a domain or one of its descendent does) - if a tuning application has set the auto sync mode to off, the changes applied through CElementHandle will be forward-synchronized when the auto sync mode is set back to on or when the "sync" remote command is executed. - when the tuning mode is on, calls to setAsXML() and setAsBytes() will fail silently (do nothing but return true meaning success) Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com> Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
0963b08
to
43d7301
Compare
main change is: krocard@0f29ce1 |
|
dawagner
added a commit
that referenced
this pull request
Nov 3, 2015
Element handle CElementHandle can be used by applications to directly control an element part of the parameter tree. CElementHandle objects can be created by calling the platform connector class new createElementHandle() functionality.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
CElementHandle can be used by applications to directly control an element part of the parameter tree. CElementHandle objects can be created by calling the platform connector class new createElementHandle() functionality.
Element handle objects are owned by the application so it's its responsibility to destroy them through a "delete" operation.
The following functionalities are available in CElementHandle class:
Notes: