-
Notifications
You must be signed in to change notification settings - Fork 62
Add get set element xml commands #293
Add get set element xml commands #293
Conversation
b140335
to
faa7401
Compare
cbb45ce
to
ed1eb2a
Compare
parameter/ArrayParameter.cpp
Outdated
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.
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 ?
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.
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
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.
👍
👎 |
ed1eb2a
to
bc5f312
Compare
@dawagner please review |
bc5f312
to
cf9fb64
Compare
👍 |
cf9fb64
to
96e951f
Compare
👍 |
96e951f
to
274bf20
Compare
`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>
274bf20
to
40135ec
Compare
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
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:
written along the access keep their new value
parameterAccessContext.getBaseOffset()
. If I forward offset, the regression tests are brocken. @benaware do know have an idea ? I must confess I do not understand all those offset manipulation.Here there's a regression due to interface mismatch between doSetValue and setValue in Array parameter class