AMWA-TV / bcp-004-01

AMWA BCP-004-01 NMOS Receiver Capabilities
https://specs.amwa.tv/bcp-004-01
Apache License 2.0
1 stars 2 forks source link

Clarify meaning when constraint_sets array is empty #14

Closed garethsb closed 4 years ago

garethsb commented 4 years ago

Clarify meaning when constraint_sets array is empty, or all constraint sets are marked meta:enabled: false.

garethsb commented 4 years ago

Three cases to consider:

  1. No constraint_sets
{
  "caps": {
    "media_types": ["video/raw"]
  }
  ...
}
  1. Empty constraint_sets

This is currently prohibited by the schemas. ('minItems' in constraint_sets.json)

{
  "caps": {
    "media_types": ["video/raw"],
    "constraint_sets": [
    ],
    "version": "3:1415927"
  }
  ...
}
  1. All constraint sets disabled
{
  "caps": {
    "media_types": ["video/raw"],
    "constraint_sets": [
      {
        "urn:x-nmos:cap:meta:enabled": false,
        "urn:x-nmos:cap:format:media_type": {
          "enum": ["video/raw"]
        }
      }
    ],
    "version": "3:1415927"
  }
  ...
}

Note, enum array is also prohibited from being empty by the schema.

garethsb commented 4 years ago

As @jmailhot pointed out in #15, we should also ask "is there a way to correctly signal that a receiver is simply unavailable right now (short of un-registering it entirely)"?

garethsb commented 4 years ago

If we were to allow empty constraint_sets array, I think that should evaluate to 'unsatisfied' (false) because it's defined as satisfied when any of its Constraint Sets are satisfied (an OR operation).

This is the opposite of an empty Constraint Set object, which I think should evaluate to 'satisfied' (true) because it's defined to be satisfied when all of its Parameter Constraints are satisfied (an AND operation).

I think that meta:enabled being false means the Constraint Set is 'unsatisfiable', i.e. evaluates to false or equivalently is considered removed from the constraint_sets list entirely. Thus if all Constraint Sets are disabled, the constraint_sets as a whole are unsatisfiable/unsatisfied.

Allowing empty "constraint_sets": [] would also answer John's last question of how to indicate that the Receiver as a whole is unusable.

jmailhot commented 4 years ago

PR #17 covers this matter nicely.