Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dynamic addition of transitions and monitored properties #334

Open
AgilatechSystems opened this issue Jan 27, 2017 · 1 comment
Open

Comments

@AgilatechSystems
Copy link

The standard way to define transitions and monitored properties is to hardcode their specification in a device sub-class in init. This is fine if all transitions and properties are known in advance, but creates a hurdle when creating devices dynamically at run time. See https://groups.google.com/forum/#!topic/zetta-discuss/XPVzd0gLnSE for discussion.

Instead of passing the 'config' object to the sub-class, propose the addition of methods which allow appending entries before init() finishes. Something like:

config.whenAppend(state, transitionFunction);
config.monitorAppend(propertyName);
@AdamMagaluk
Copy link
Collaborator

If it is blocking you before we make any decisions and do the work you may want to check out the implementation of the device_config https://github.com/zettajs/zetta-device/blob/master/device_config.js

You can just modify the underlying config.allowed, not ideal i know but it can work.

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

No branches or pull requests

2 participants