Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[FEATURE]-add interfaces on IRoutingSources/Dests for "default" input/output

Open ngenovese11 opened this issue 5 years ago • 3 comments

Is your feature request related to a problem? Please describe. One of the more difficult aspects of building TieLine configs is knowing the keys of routing inputs.

Describe the solution you'd like I'd propose that we introduce an interface on a source/display that defines a "default" input/output; something like IAnyInput and IAnyOutput. Then if the RoutingPort key isn't found (or is some default key), the mechanism building tie lines would attempt cast the device to IAnyInput or IAnyOutput and link that routing port.

Describe alternatives you've considered If the port key isn't found perhaps we could just link to the first port in the RoutingPortCollection; though this seems like a bad solution.

Additional context This solution obviously doesn't encompass a situation where multiple sources are connected to a RoutingSink. This is only meant to be a solution to define a "reasonable default".

ngenovese11 avatar Oct 08 '20 16:10 ngenovese11

I think a lot of this can be addressed through the documentation effort that has started and will be ongoing. The goal will be to have things like supported input and output names be listed on the documentation website. That will go a long way to making it easier to build tieline configurations, as you can look up the device on the website. The supported inputs/outputs will also be shown in the tool, based on metadata entered into the database.

To me, something like this introduces unexpected behavior when using Essentials Routing. It's not straightforward and apparent that a display would default to some arbitrary input that the person coding the device class decides on.

That being said, there might be some benefit in adding something like this that can be configured via the configuration file. There might still be an issue of knowing what inputs/outputs need to be set. To address that, we could add a console command that prints out the routing collections for a given device key. That would at least give you a way when developing a config to run Essentials with the devices you're looking to route and see what inputs and outputs are available.

andrew-welker avatar Oct 08 '20 18:10 andrew-welker

The documentation effort makes sense; the problem I see is as plugins are developed, there being a time delay between making to the database and consequently any other "tools" we might be using to generate configs. If we had some generic "io" that could be in the tie line config, we could quickly edit plugins to still work without waiting for the updates on the back end. Does that make sense?

ngenovese11 avatar Oct 08 '20 18:10 ngenovese11

I would suggest that two things might improve this.

  1. Plugins that implement IRouting should document available port names in their README
  2. We should add console command to print the routing port names for a device so that at runtime, we can retrieve the port names without having to look at the source code in the plugin.

ndorin avatar Feb 18 '21 22:02 ndorin