Closed garethsb closed 4 years ago
Three cases to consider:
constraint_sets
{
"caps": {
"media_types": ["video/raw"]
}
...
}
constraint_sets
This is currently prohibited by the schemas. ('minItems' in constraint_sets.json)
{
"caps": {
"media_types": ["video/raw"],
"constraint_sets": [
],
"version": "3:1415927"
}
...
}
{
"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.
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)"?
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.
PR #17 covers this matter nicely.
Clarify meaning when constraint_sets array is empty, or all constraint sets are marked
meta:enabled: false
.