vapor-ware / synse-emulator-plugin

Emulator plugin for Synse
GNU General Public License v3.0
3 stars 3 forks source link

rename to lock.state #65

Closed yowayb closed 11 months ago

yowayb commented 5 years ago

I think this should be renamed to lock.state because "status" is usually read-only while "state" can be set. Also, lock.yaml in synse-server uses lock.state and the vanilla install doesn't run immediately: https://github.com/vapor-ware/synse-emulator-plugin/blob/8f151a5f0c07663ac6b7eaaefe4f836df7abe886/pkg/outputs/outputs.go#L68

edaniszewski commented 5 years ago

@yowayb thanks for opening these issues! I just opened a PR in synse-server to fix the emulator install, part of which is updating to 'lock.status' to be in line with the current emulator config.

I don't disagree that it makes sense to update the name to state (which I believe it was at some point in the past), however this would cause a little bit of churn to update different projects/expectations. Its doable, but with a major version release of Synse (v3) on the horizon, much of that work would be deleted as the v3 synse-server does not have a built-in emulator, and some expectations on plugin configuration/definition have changed to make it more flexible.

In the end, the emulator is just meant to emulate readings and to be an example for how a plugin could be written, so even though I agree that lock.state makes more sense, I believe its harmless enough as lock.status to leave it until the v3 work lands.