Page 1 of 1

OnPropertyChangeRequest()

Posted: Fri Feb 12, 2010 4:12 pm
by Osler
Scott:

Is there anyway to prevent the property change from occuring within the device. With the TCP Client I posted, I use a boolean property to signal the device to clear its internal buffer. However, If I intercept this property change within OnPropertyChangeRequest(), act on it, and then set the boolean property back to false, the property change done within that sub to reset the value never gets propagated. I see the request to change the property to "0" show up subsequently in the sub via debugging, but the property value remains set to "1". Any hints or suggestions?

Osler

Re: OnPropertyChangeRequest()

Posted: Sun Feb 14, 2010 11:17 pm
by ScottBot
If you are using the C++ Device sdk, there is a ChangeRequestAbandoned() that you can call within the device. However, this is typically used for a change request that comes from the UI and is being processed by the device that is responsible for changing the property. It would either call ChangeRequestCompleted() (if it wants to accept the change request), ChangeRequestFailed() (if it wants to signal the request as failed), or ChangeRequestAbandoned() if it just wants to ignore it.

I'm not complete sure I understand the situation. However, another solution may be to use two different properties. One for your internal signaling, and the other final one that is used for Tasks.

Re: OnPropertyChangeRequest()

Posted: Mon Feb 15, 2010 5:44 pm
by Osler
Scott:

Yes, via HBDotNet, that is exposed as HBModule.ChangeRequestAbandoned(). It appears to want a pointer back to the property as an argument, which I presume would be provided to me via hbProperty.Handle. I will play around with it some. Thanks for the pointer in the right direction.

Osler