vranki / ExtPlane

Plugin for X-Plane flight simulator which allows reading and writing simulation properties
138 stars 44 forks source link

Why 'get' unsubscribes from a dataref? #77

Open cosmolabs-ru opened 3 years ago

cosmolabs-ru commented 3 years ago

Thanks a lot for adding 'get' command, it's very useful. But why does it unsubcribe from a dateref? What's the purpose of such behavior? Can I safely use 'sub' repeatedly to periodically fetch values of already subscribed datarefs? Is there any other way to fetch a value by an incoming TCP request?

vranki commented 3 years ago

Idea of get is that you can get the value once without subscribing to the dataref. There are some corner cases you might want to do that. If you want repeated updates, you subscribe to the dataref normally. I don't understand any problem with this.