Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

krocard
Copy link
Contributor

@krocard krocard commented Oct 22, 2015

Get command returns current element values (from main blackboard)
in XML format.

Set command allows assigning a configurable element's settings directly in XML.
Notes:

  

@krocard krocard changed the title Add get set element xml commands [WIP]Add get set element xml commands Oct 22, 2015
@krocard krocard force-pushed the add-get-set-elementXML-commands branch 2 times, most recently from b140335 to faa7401 Compare October 22, 2015 07:37
@krocard krocard changed the title [WIP]Add get set element xml commands [Review] Add get set element xml commands Oct 22, 2015
@krocard krocard force-pushed the add-get-set-elementXML-commands branch 2 times, most recently from cbb45ce to ed1eb2a Compare October 22, 2015 07:52
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea why offset is not used instead of parameterAccessContext.getBaseOffset(). If I forward offset as such:

return setValues(0, offset, value, parameterAccessContext);

the regression tests are broken. @benaware do have an idea ?

I must confess I do not understand all those offset manipulations. Sometime getOffset() alone is used, other time it's getOffset() - getBaseOffset() and in this case it's getBaseOffset()... I am lost.
Note: could this offset manipulation not be centralize in one class (accessContext ?) instead of leaking all over the place ?

Copy link
Contributor

Choose a reason for hiding this comment

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

The base offset has been introduced to allow reusing access methods for both main and configuration blackboard.
Here there's a regression due to interface mismatch between doSetValue and setValue in Array parameter class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@krocard
Copy link
Contributor Author

krocard commented Oct 22, 2015

👍 @dawagner @tcahuzax please review

@tcahuzax
Copy link
Contributor

👎

@krocard krocard mentioned this pull request Oct 22, 2015
2 tasks
@krocard krocard added this to the Version 3.1 milestone Oct 22, 2015
@krocard krocard force-pushed the add-get-set-elementXML-commands branch from ed1eb2a to bc5f312 Compare October 23, 2015 10:06
@krocard
Copy link
Contributor Author

krocard commented Oct 23, 2015

@dawagner please review

@krocard krocard force-pushed the add-get-set-elementXML-commands branch from bc5f312 to cf9fb64 Compare October 23, 2015 12:46
@tcahuzax
Copy link
Contributor

👍

@krocard krocard force-pushed the add-get-set-elementXML-commands branch from cf9fb64 to 96e951f Compare October 23, 2015 15:58
@tcahuzax
Copy link
Contributor

👍

@krocard krocard force-pushed the add-get-set-elementXML-commands branch from 96e951f to 274bf20 Compare October 23, 2015 16:35
krocard and others added 6 commits October 23, 2015 18:44
`ConfigurableElements` can be imported/exported in two view:
the structure and settings view.
In order to make this more obvious. Do not use a generic name (`fromXml`)
for one and a specific name (`getSettingsAsXML`) for the other.

Rename the structure export from `fromXml` to `structureFromXml`.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
`setValue` and `getValues` were taking a base offset parameter
whereas `doSetValue` and `doGetValue` were taking an offset.

Homogenize both function and make it possible to forward
the offset from one function to the other by changing
`[sg]etValues` to take an offset.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Calling base implementation of serializeXmlSettings() method from
ArrayParameter was causing the update of the XML node by Base parameter,
that is, the scalar implementation.
This patch ensures only the array implementation of the
serializeXmlSettings() is solicited.
This is achieved by a proper overloading of the doGetValue() and
doSetValue() virtual methods called from the base implementation in
BaseParameter.
Note: this issue was first introduced by the attempt of reusing base code
during XML export to take advantage of Name attribute handling. See patch
"Make XML export settings reusable for any configurable element".

Change-Id: If535ca4c4b608cf7a85ab2a90121e2ea64d00820
Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
In order to serialize and deserialize parameters,
values need to be formated.
To do that an CParameterAccessContext is used by the parameters.

During a serialization, a CParameterAccessContext was constructed
from XmlParameterSerializerContext.
As a result, CParameterAccessContext members were duplicated in
XmlParameterSerializerContext.

To avoid that, XmlParameterSerializerContext now contain a
CParameterAccessContext.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
Get command returns current element values (from main blackboard)
in XML format.

Set command Allows assigning a configurable element's settings directly in XML.
Notes:
  - Tuning mode must be on
  - In case of failure, all the subelements that have been successfully
    written along the access keep their new value

Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
In order to help debuging test-platform unexpected stops,
add its return code in the error message on such event.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
@krocard krocard force-pushed the add-get-set-elementXML-commands branch from 274bf20 to 40135ec Compare October 23, 2015 16:50
@krocard krocard changed the title [Review] Add get set element xml commands Add get set element xml commands Oct 23, 2015
krocard added a commit that referenced this pull request Oct 23, 2015
Add get and set element xml commands

Get command returns current element values (from main blackboard)
in XML format.

Set command allows assigning a configurable element's settings directly in XML.
Notes:
  - Tuning mode must be on
  - In case of failure, all the subelements that have been successfully
    written along the access keep their new value
@krocard krocard merged commit bedf6aa into intel:serialization_api Oct 23, 2015
@krocard krocard deleted the add-get-set-elementXML-commands branch October 23, 2015 17:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants