rossvideo / Catena

Other
4 stars 0 forks source link

menu_groups is redundant #97

Closed mejohnnaylor closed 3 months ago

mejohnnaylor commented 4 months ago

in device.proto

  // The device's default editor UI definition and access scope definitions
  MenuGroups menu_groups = 7;

in menu.proto

message MenuGroups {
  map<string, MenuGroup> menu_groups = 1;
}

which means we need this when serialized as JSON - note redundant "menu_groups" inside of "menu_groups"

  "menu_groups": {
    "menu_groups": {
      "status_group": {
        "id": 0,
        "name": { "display_strings": { "en": "Status" } },
        "menus": {
          "status": {
            "id": 0,
            "name": { "display_strings": { "en": "Product" } },
            "param_oids": ["a_number"]
          }
        }
      },
      "config_group": {
        "id": 1,
        "name": { "display_strings": { "en": "Config" } },
        "menus": {
          "config": {
            "id": 1,
            "name": { "display_strings": { "en": "Catena" } },
            "param_oids": ["string_example", "float_example"]
          }
        }
      }
    }
  }

suggested fix

in device.proto...

map<string, MenuGroup> menu_groups = 7;
james-peltzer commented 4 months ago

Fine to remove redundant level of encapsulation here. Also should remove the int32 IDs from menu groups and menus.

mejohnnaylor commented 4 months ago

team meeting 2/23 - agreed to remove the redundant menu_groups and also the id fields in menu_group and menu.

JRN to do on Smpte_handoff branch

mejohnnaylor commented 4 months ago

fix how this broke java SDK