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

[Media] XML sync with spec #33524

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hasty
Copy link
Contributor

@hasty hasty commented May 20, 2024

This PR fixes many areas in which the media cluster ZAP template XML files are out of sync with the spec; it fixes many of the problems in #32669 but ignores min/max errors, as they are not enforced anyway.

These are the changes in commit debbc2e (especially concerning errors in bold):

  • Account Login:

    • GetSetupPINResponse command is marked fabric scoped in the spec
    • LoggedOut event is optional and fabric sensitive, and is only readable by admins in the spec
  • Channel:

    • GetProgramGuide command fields are incorrect:
      • StartTime and EndTime are not optional fields in the spec
      • PageToken and RecordingFlag are nullable in the spec
    • RecordProgram command fields are incorrect:
      • ExternalIDList is optional in the spec
    • CancelRecordProgram command fields are incorrect:
      • ExternalIDList is optional in the spec
    • ProgramStruct struct fields are incorrect:
      • Description, ThumbnailUrl, PosterArtUrl, DvbiUrl need to be long_char_string
      • ExternalIDList is AdditionalInfoStruct in the spec
    • SeriesInfoStruct fields are incorrect:
      • Season and Episode need to be long_char_string
    • ProgramCategoryStruct fields are incorrect:
      • Category and SubCategory need to be long_char_string
    • ProgramCastStruct fields are incorrect:
      • Name and Role need to be long_char_string
    • PageTokenStruct fields are incorrect:
      • After and Before need to be long_char_string
    • RecordingFlagBitmap is bitmap8 in the spec
  • Content App Observer:

    • ContentAppMessage command fields are incorrect:
      • Data is mandatory in the spec, and needs to be long_char_string
      • EncodingHint is optional in the spec
    • ContentAppMessageResponse command field is incorrect:
      • Data needs to be long_char_string
  • Content Control:

    • The ScreenDailyTime and RemainingScreenTime attributes have incorrect maximum values
    • The BlockUnrated attribute has the same preprocessor define as the Enabled attribute
    • The BlockChannelList, BlockApplicationList and BlockContentTimeWindow attributes are missing
    • UpdatePIN command requires timed invoke and manager privileges in the spec
      • The OldPIN field is mandatory in the spec
      • The length values for OldPIN and NewPIN are specified as max values
    • ResetPIN command requires timed invoke and administrator privileges in the spec
    • Enable command requires timed invoke and manager privileges in the spec
    • Disable command requires timed invoke and manager privileges in the spec
    • AddBonusTime command fields are incorrect:
      • BonusTime is mandatory in the spec
    • SetScreenDailyTime command requires manager privileges in the spec
    • BlockUnratedContent command requires manager privileges in the spec
    • UnblockUnratedContent command requires manager privileges in the spec
    • SetOnDemandRatingThreshold command requires manager privileges in the spec
    • SetScheduledContentRatingThreshold command requires manager privileges in the spec
    • AddBlockChannels, RemoveBlockChannels, AddBlockApplications, RemoveBlockApplications, SetBlockContentTimeWindow, and RemoveBlockContentTimeWindow commands are missing
    • EnteringBlockContentTimeWindow event is missing
    • AppInfoStruct, BlockChannelStruct, TimePeriodStruct, and TimeWindowStruct structs are missing
    • DayOfWeekBitmap bitmap is missing
  • Content Launch:

    • AcceptHeader attribute has length of 254, but the spec says 100
    • LaunchURL command fields are incorrect:
      • The PlaybackPreferences field is missing
    • The AdditionalInfoStruct struct has incorrect fields:
      • Name and Value need to be long_char_string
    • The StyleInformationStruct struct has incorrect fields:
      • ImageURL needs to be long_char_string
    • The BrandingInformationStruct struct has incorrect fields:
      • ProviderName needs to be long_char_string
    • The ParameterStruct struct has incorrect fields:
      • Value needs to be long_char_string
    • The PlaybackPreferencesStruct struct has incorrect fields:
      • PlaybackPosition, TextTrack and AudioTracks are all nullable in the spec
    • The TrackPreferenceStruct struct has incorrect fields:
      • Characteristics and AudioOutputIndex are both nullable in the spec
    • The feature bitmap has incorrect values for AdvancedSeek, TextTracks and AudioTracks. This means AdvancedSeek and AudioTracks also mean ContentSearch.
  • Application Basic, Application Launcher, Content App Observer, Keypad Input, Low Power, and Media Input were all missing the revision number attribute, and Content Launch had the wrong revision number.

For some of these errors, it might be worth considering changing the spec instead; e.g. there are many string attributes and fields with a max length of 256, which requires them to be long_char_strings in the spec; were their max lengths 255, they could remain char_strings.

@@ -23,6 +23,7 @@ limitations under the License.
<define>APPLICATION_BASIC_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
Copy link
Contributor

@lazarkov lazarkov May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this global attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the cluster revision.

<arg id="1" name="EndTime" type="epoch_s"/>
<arg id="2" name="ChannelList" type="ChannelInfoStruct" array="true" optional="true" length="255"/>
<arg id="3" name="PageToken" type="PageTokenStruct" optional="true" isNullable="true"/>
<arg id="5" name="RecordingFlag" type="RecordingFlagBitmap" optional="true" isNullable="true" min="0x00" max="0x07"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is min, max, isNullable supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsNullable is definitely supported. I don't think the min/max does anything, but isn't hurting.

@@ -45,14 +45,15 @@ limitations under the License.
<arg name="Node" type="node_id" optional="true"/>
</command>

<command source="server" code="0x01" name="GetSetupPINResponse" optional="false" disableDefaultResponse="true">
<command source="server" code="0x01" name="GetSetupPINResponse" optional="false" disableDefaultResponse="true" isFabricScoped="true">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isFabricScoped supproted now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many other clusters are using it.

<item name="DisplayName" type="CHAR_STRING" isNullable="true" optional="true"/>
<item fieldId="0" name="LanguageCode" type="char_string" length="32"/>
<item fieldId="1" name="Characteristics" type="CharacteristicEnum" isNullable="true" optional="true" array="true"/>
<item fieldId="2" name="DisplayName" type="long_char_string" isNullable="true" optional="true" length="256"/>
<!-- <item name="Characteristics" type="CharacteristicEnum" optional="true" array="true"/> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed now? I think it wasn't able to compile before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not compiling and you don't want it, we should remove it from the spec.

@mergify mergify bot added the conflict label Dec 17, 2024
@mergify mergify bot added conflict and removed conflict labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants