Hi,
I'm using rtt 2.0.1 for a simple component using the Property feature.
The component reads a property from an XML file and acts (prints a
message) the moment the property value is changed (e.g. from true to
false for a bool). However, starting the component in the deployer and
changing the Property value does not give me any message at all. When
I adjust my code in order not to represent a Property but an
Attribute, all goes well, that is, it doesn't read it from the XML
(it's an attribute), but when I change the value in the deployer, my
message gets printed.
It looks like the Property interface does not pass changes to the C++
variables underneath?
I can provide a minimal example to illustrate, if necessary.
Steven
Property value not updated
Hi Steven,
On Monday 20 September 2010 15:27:36 Steven Bellens wrote:
> Hi,
>
> I'm using rtt 2.0.1 for a simple component using the Property feature.
> The component reads a property from an XML file and acts (prints a
> message) the moment the property value is changed (e.g. from true to
> false for a bool). However, starting the component in the deployer and
> changing the Property value does not give me any message at all. When
> I adjust my code in order not to represent a Property but an
> Attribute, all goes well, that is, it doesn't read it from the XML
> (it's an attribute), but when I change the value in the deployer, my
> message gets printed.
>
> It looks like the Property interface does not pass changes to the C++
> variables underneath?
> I can provide a minimal example to illustrate, if necessary.
I confirmed and fixed this issue on the toolchain-2.0 branch (gitorious).
Peter
Property value not updated
On Mon, Sep 20, 2010 at 3:27 PM, Steven Bellens
<steven [dot] bellens [..] ...> wrote:
> Hi,
>
> I'm using rtt 2.0.1 for a simple component using the Property feature.
> The component reads a property from an XML file and acts (prints a
> message) the moment the property value is changed (e.g. from true to
> false for a bool). However, starting the component in the deployer and
> changing the Property value does not give me any message at all. When
> I adjust my code in order not to represent a Property but an
> Attribute, all goes well, that is, it doesn't read it from the XML
> (it's an attribute), but when I change the value in the deployer, my
> message gets printed.
>
> It looks like the Property interface does not pass changes to the C++
> variables underneath?
> I can provide a minimal example to illustrate, if necessary.
So the part that doesn't work is XML file -> C++ property ? But when
you change the property in the taskbrowser, it does get picked up by
the C++ code (like with the attribute ?) What is the data type ?
Peter
Property value not updated
2010/9/20 Peter Soetens <peter [..] ...>:
> On Mon, Sep 20, 2010 at 3:27 PM, Steven Bellens
> <steven [dot] bellens [..] ...> wrote:
>> Hi,
>>
>> I'm using rtt 2.0.1 for a simple component using the Property feature.
>> The component reads a property from an XML file and acts (prints a
>> message) the moment the property value is changed (e.g. from true to
>> false for a bool). However, starting the component in the deployer and
>> changing the Property value does not give me any message at all. When
>> I adjust my code in order not to represent a Property but an
>> Attribute, all goes well, that is, it doesn't read it from the XML
>> (it's an attribute), but when I change the value in the deployer, my
>> message gets printed.
>>
>> It looks like the Property interface does not pass changes to the C++
>> variables underneath?
>> I can provide a minimal example to illustrate, if necessary.
>
> So the part that doesn't work is XML file -> C++ property ? But when
> you change the property in the taskbrowser, it does get picked up by
> the C++ code (like with the attribute ?) What is the data type ?
No, the other way around :).
The XML file -> C++ Property goes fine, but when I change it in the
taskbrowser, it does _not_ get picked up in the C++ code (and it does
get picked up when I use an Attribute). I'm working with a boolean.
Steven
>
> Peter
>
Property value not updated
On Mon, Sep 20, 2010 at 9:46 PM, Steven Bellens
<steven [dot] bellens [..] ...> wrote:
> 2010/9/20 Peter Soetens <peter [..] ...>:
>> On Mon, Sep 20, 2010 at 3:27 PM, Steven Bellens
>> <steven [dot] bellens [..] ...> wrote:
>>> Hi,
>>>
>>> I'm using rtt 2.0.1 for a simple component using the Property feature.
>>> The component reads a property from an XML file and acts (prints a
>>> message) the moment the property value is changed (e.g. from true to
>>> false for a bool). However, starting the component in the deployer and
>>> changing the Property value does not give me any message at all. When
>>> I adjust my code in order not to represent a Property but an
>>> Attribute, all goes well, that is, it doesn't read it from the XML
>>> (it's an attribute), but when I change the value in the deployer, my
>>> message gets printed.
>>>
>>> It looks like the Property interface does not pass changes to the C++
>>> variables underneath?
>>> I can provide a minimal example to illustrate, if necessary.
>>
>> So the part that doesn't work is XML file -> C++ property ? But when
>> you change the property in the taskbrowser, it does get picked up by
>> the C++ code (like with the attribute ?) What is the data type ?
>
> No, the other way around :).
> The XML file -> C++ Property goes fine, but when I change it in the
> taskbrowser, it does _not_ get picked up in the C++ code (and it does
> get picked up when I use an Attribute). I'm working with a boolean.
I'll write a unit test for it and try to fix it tomorrow.
Peter