GEMakers / gea-sdk

The GE Appliances Software Development Kit
GNU General Public License v2.0
51 stars 10 forks source link

Added ERD command handlers. Made discovery a function. #6

Closed rbultman closed 8 years ago

rbultman commented 8 years ago

This makes discovery functionality something that must be started. Adds other ERD functionality needed when using the SDK as an appliance.

johnnysako commented 8 years ago

I am not, by any means, even a novice JS user, but it looks reasonable and consistent to me compared to other code in the module.

bakerface commented 8 years ago

If the discovery no longer starts by default I'm afraid we will break discovery for existing users of this package. Ideally we would jump the major version of this package, but the green-bean package references this repo via a git URL rather than a version. I will need to do some work to clean up the dependencies before we merge this.

rbultman commented 8 years ago

How about I change it so that the discovery starts automatically, but I add functions to start and stop it manually as well? I'm thinking I pass in an optional parameter on creation that, if not present, causes discovery to start. If the parameter is present, it will start or not start discovery based on the value of the parameter.

bakerface commented 8 years ago

Either option is great. If you do an optional argument could you make it an object so we can add other options later?

rbultman commented 8 years ago

Will do.

rbultman commented 8 years ago

Added two functions, startDiscovery and stopDiscovery. This allows for the obvious. The start-up state is with discovery starting so legacy users won't get hosed.