Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

autoupdate #1194

Closed
maggu2810 opened this issue Mar 15, 2016 · 4 comments
Closed

autoupdate #1194

maggu2810 opened this issue Mar 15, 2016 · 4 comments

Comments

@maggu2810
Copy link
Contributor

I am a little bit indecisive about the autoupdate bundle.

If I understand it correctly it updates the state of an item if a command is received (and it is assignable).
If the bundle is activated all items are updated (default = true).
Someone could implement an AutoUpdateBindingConfigProvider to prevent that for special items.

If I use an UI and send a command to an item, the thing handler for the thing that channels are linked to that item receive that command.
Now it is up to the binding to execute the command (perhaps delegate something to the device) and if a channel is updated, the binding calls updateState.
The framework will update all linked items.

Is that correct?

If e.g. the command is dropped by the binding and so no state is updated, the item that is linked to the channel does not contain the correct state.

What is the use case of the autoupdate bundle? For demos and items that are not linked to channels?
But in this case I would prefer a default of false and someone could activate that for some bundles.

  • autoupdate = inactive, no provider needs to prevent an item update
  • autoupdate = active, you need a provider that deactivates its for all but some items

Perhaps someone could give me some more informations about that bundle.

@kaikreuzer
Copy link
Contributor

Yes, your summary is more or less correct.
Having it default=true makes sense, because otherwise your unbound items would not work (i.e. a switch in the UI would never show the right state).
It also makes sense for uni-directional bindings, which cannot provide any feedback on state changes.

Note #595 - in this context, we can discuss that by default the auto-update should be set to off for a channel and that a binding can decide for certain channels that it should be turned on. Does that make sense to you?

P.S.: Isn't the forum a better place for such questions?

@maggu2810
Copy link
Contributor Author

P.S.: Isn't the forum a better place for such questions?

Will add a topic there this evening.

@kaikreuzer
Copy link
Contributor

Does this mean I didn't answer your question in total?

@maggu2810
Copy link
Contributor Author

I don't know, perhaps.
Depends on if I understand your answer correctly 😉
Topic continues here: https://www.eclipse.org/forums/index.php/t/1075677/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants