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

[BUG]-UserInterface Extensions Switch Changed Event not supported #7

Open
cdenig opened this issue Dec 7, 2022 · 3 comments
Open
Labels
bug Something isn't working

Comments

@cdenig
Copy link

cdenig commented Dec 7, 2022

Describe the bug
Switch Widgets produce Extension 'Changed' Events and the ParseStatus function in UIExtensionsHandler.cs is not processing 'Changed' Action Types.

Stacktrace
List of Available UserInterface Extensions Events

*es Event UserInterface Extensions Event Changed Signal
*es Event UserInterface Extensions Event Clicked Signal
*es Event UserInterface Extensions Event PageClosed PageId
*es Event UserInterface Extensions Event PageOpened PageId
*es Event UserInterface Extensions Event Pressed Signal
*es Event UserInterface Extensions Event Released Signal
*es Event UserInterface Extensions Page Action PageId
*es Event UserInterface Extensions Page Action Type
*es Event UserInterface Extensions Panel Clicked PanelId
*es Event UserInterface Extensions Panel Close
*es Event UserInterface Extensions Panel Open PageId
*es Event UserInterface Extensions Panel Open PanelId
*es Event UserInterface Extensions Web Action Origin
*es Event UserInterface Extensions Web Action Value
*es Event UserInterface Extensions Widget Action Type
*es Event UserInterface Extensions Widget Action Value
*es Event UserInterface Extensions Widget Action WidgetId
*es Event UserInterface Extensions Widget LayoutUpdated

To Reproduce
Steps to reproduce the behavior:

  1. Open Debugger to SIMPL program connected to EFS program running this EPI
  2. Using Touch 10 panel, toggle Switch widget back and forth
  3. See that events for the widget changes are not passing on the bridge to SIMPL
  4. Verify with another SSH instance (Putty) connected to codec with Events and Widgets registered

Expected behavior
Expect to see event strings sent to SIMPL when Switch events changes occur.

Screenshots
N/A, but below are Text Console and SSH Console snippets showing events produced

Example 1. Widget Actions and Events registered feedback for Switch toggle on and off events

*e UserInterface Extensions Event Changed Signal: "tech~mic2~mute:on"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~mic2~mute"
*e UserInterface Extensions Widget Action Value: "on"
*e UserInterface Extensions Widget Action Type: "changed"
** end
*e UserInterface Extensions Event Changed Signal: "tech~mic2~mute:off"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~mic2~mute"
*e UserInterface Extensions Widget Action Value: "off"
*e UserInterface Extensions Widget Action Type: "changed"
** end

Example 2. Widget Actions and Events registered feedback for Button press event

*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~pause"
*e UserInterface Extensions Widget Action Value: ""
*e UserInterface Extensions Widget Action Type: "pressed"
** end
*e UserInterface Extensions Event Released Signal: "tech~iptv~pause"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~pause"
*e UserInterface Extensions Widget Action Value: ""
*e UserInterface Extensions Widget Action Type: "released"
** end
*e UserInterface Extensions Event Clicked Signal: "tech~iptv~pause"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~pause"
*e UserInterface Extensions Widget Action Value: ""
*e UserInterface Extensions Widget Action Type: "clicked"
** end

Example 3. Widget Actions and Events registered feedback for Group Button press event

*e UserInterface Extensions Event Pressed Signal: "tech~iptv~chan:up"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~chan"
*e UserInterface Extensions Widget Action Value: "up"
*e UserInterface Extensions Widget Action Type: "pressed"
** end
*e UserInterface Extensions Event Released Signal: "tech~iptv~chan:up"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~chan"
*e UserInterface Extensions Widget Action Value: "up"
*e UserInterface Extensions Widget Action Type: "released"
** end

Example 4. Widget Actions and Events registered feedback for Direction Pad press event

*e UserInterface Extensions Event Pressed Signal: "tech~iptv~dpad:center"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~dpad"
*e UserInterface Extensions Widget Action Value: "center"
*e UserInterface Extensions Widget Action Type: "pressed"
** end
*e UserInterface Extensions Event Released Signal: "tech~iptv~dpad:center"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~dpad"
*e UserInterface Extensions Widget Action Value: "center"
*e UserInterface Extensions Widget Action Type: "released"
** end
*e UserInterface Extensions Event Clicked Signal: "tech~iptv~dpad:center"
** end
*e UserInterface Extensions Widget Action WidgetId: "tech~iptv~dpad"
*e UserInterface Extensions Widget Action Value: "center"
*e UserInterface Extensions Widget Action Type: "clicked"
** end
@cdenig cdenig added the bug Something isn't working label Dec 7, 2022
@TrevorPayne
Copy link
Contributor

@cdenig - is there any way I could convince you to gather those same examples with JSON terminal type turned on, since we're using that for control in this instance? Sometimes the responses are different enough that we can't directly infer the data.

TrevorPayne pushed a commit that referenced this issue Dec 9, 2022
feat: add bool and ushort bridge outputs for ui events

Resolves: #7
@Rodney-Driscoll
Copy link
Contributor

There is a branch working on this so to avoid git conflicts here is what would be needed to add a change event:
in xEvent.cs update UiEvent:

        public class UiEvent // /Event/UserInterface/Extensions/Event
        {      
            ...
            [JsonProperty("Changed")]
            public UiEventType Changed { get; set; }
            ...
        }

in UI_ExtensionsHandler.cs update ParseStatus:


        public void ParseStatus(CiscoCodecEvents.UiEvent val)
        {
            ...
            else if (val.Changed != null)
            {
                action_.Type = "Changed";
                action_.Value = val.Changed.Signal.Value;
            }
            ...

@TrevorPayne
Copy link
Contributor

TrevorPayne commented Dec 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants