PepperDash / epi-videoCodec-ciscoExtended

Port and extension of the Essentials-Included CiscoSparkCodec EssentialsDevice
MIT License
0 stars 1 forks source link

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

Open cdenig opened 1 year ago

cdenig commented 1 year ago

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
TrevorPayne commented 1 year ago

@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.

Rodney-Driscoll commented 1 year ago

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 commented 1 year ago

I already pushed up something to account for this, I believe.

I'll check in the morning.

On Dec 11, 2022 9:20 PM, Rodney Driscoll @.***> wrote:

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;
        }
        ...

— Reply to this email directly, view it on GitHubhttps://github.com/PepperDash/epi-videoCodec-ciscoExtended/issues/7#issuecomment-1345775054, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKQSYORLPUF7QCM6ABI5PC3WM2DWBANCNFSM6AAAAAASXFA4VQ. You are receiving this because you commented.Message ID: @.***>