Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Consider connect/disconnect semantics for translators #80

Open
tjaffri opened this issue Aug 25, 2016 · 0 comments
Open

Consider connect/disconnect semantics for translators #80

tjaffri opened this issue Aug 25, 2016 · 0 comments

Comments

@tjaffri
Copy link
Contributor

tjaffri commented Aug 25, 2016

We are using the constructor to init devices in the new translator format currently being built in the dev branch. We don't have a destructor (not supported in es6 JavaScript?) or any explicit disconnect/destroy button.

This is an issue for some translators, e.g. the Bluetooth LE based TI SensorTag temperature sensor. That needs an explicit connect and disconnect (both async).

For now we are working around this by create non-schema connect and disconnect methods in only the TI SensorTag temperature sensor. These methods are called explicitly in the unit tests.

Ideally connect/disconnect should be called automatically as part of translator lifecycle... for devices that need this, but we need to figure that out.

This could be something that is only important for non-hub translators. Since we are focused right now on hub based translators, this is something we can mull over.

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

1 participant