updateSwitcherInputOutput(..) bug
PhreaK
Senior Member
I'm not sure whether this is just sleep deprivation getting to me but the updateSwitcherInputOutput(..) method at line 678 of SwitcherComponentImpl.java (in devicesdk.jar) seems to be dodgy.
The first thing it does is remove any inputOutputData from alInputOutput with a matching input to the that the method is updating. If you're just using a single switch level (eg. SwitchLevel.ALL) this is all fine however if you implement breakaway switching it causes issues as it doesn't allow a single input to feed discrete outputs across switch levels.
Am I missing something or is this a 'feature' others have had to work around?
The first thing it does is remove any inputOutputData from alInputOutput with a matching input to the that the method is updating. If you're just using a single switch level (eg. SwitchLevel.ALL) this is all fine however if you implement breakaway switching it causes issues as it doesn't allow a single input to feed discrete outputs across switch levels.
Am I missing something or is this a 'feature' others have had to work around?
Comments
-
Just had a chance to grill one of the AMX guys about this - answer was along the lines of "oh yeah, don't use those base classes". Hmmmmm...
-
Yes!
You are right, i had to write my own to override that method... The super implemenation seems to assume that an input can only go to single output versus multiple outputs.// this does not seem to work correctly in the super, so did it myself. /* (non-Javadoc) * @see com.amx.duet.devicesdk.Switcher#updateSwitcherInputOutput(com.amx.duet.devicesdk.type.SwitchLevel, int, int[]) */ protected void updateSwitcherInputOutput(SwitchLevel sl, int input, int[] output) { for (int index = 0; index < output.length; index++) { int out = output[index]; if (out > 0 && out <= MAX_RENDERERS) { if (outputStatus[out - 1] != input) { outputStatus[out - 1] = input; try { SwitcherComponentEvent event = (SwitcherComponentEvent) m_SwitcherComponentEventObjectPool.borrowObject(this, sl, input, new int[]{out}, 1); this.processSwitchEvent(event); m_SwitcherComponentEventObjectPool.returnObject(event); } catch (Exception e) { } } } } }
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums