OnPropertyChangeRequest()

HouseBot Plugin Development Discussions.
Post Reply
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

OnPropertyChangeRequest()

Post 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
ScottBot
Site Admin
Posts: 2786
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: OnPropertyChangeRequest()

Post 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.
Scott
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: OnPropertyChangeRequest()

Post 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
Post Reply