<< Click to Display Table of Contents >> Navigation: »No topics above this level« Segment and Command Value Inheritance Rules |
Values in Segments and Commands "inherit down" their values from the default values listed in SegmentGroup and RangeScripts. Meaning, if a value is listed in in RangeScripts.DefaultSegment or .DefaultCommand, it's value is overridden with the values, in included, in a SegmentGroup.DefaultSegment or DefaultCommand. These values are in turn overridden by the values, if included, in Segment or Command.
For example, consider the following definition for Command.GreenLight. Please note, all other attributes have purposefully been left out for the sake of clarity.
{
"RangeScripts" : {
"DefaultCommand" : { "GreenLight" : "OFF" },
"SegmentGroup" : {
"DefaultSegment" : {},
"Segments" : [
{ "SegmentName" : "Pre-Competition" }
]
},
"SegmentGroup" : {
"DefaultSegment" : { "GreenLight" : "ON" },
"Segments" : [
{ "SegmentName" : "Sighters" }
]
},,
"SegmentGroup" : {
"DefaultSegment" : {},
"Segments" : [
{ "SegmentName" : "Competition", "GreenLight" : "ON" }
]
}
"SegmentGroup" : {
"DefaultSegment" : { "GreenLight" : "ON" },
"Segments" : [
{ "SegmentName" : "Post-Competition", "GreenLight" : "OFF" }
]
}
}
The value of GreenLight for each command would then be calculated as.
Segment Name |
GreenLight |
Explanation |
Pre-Competition |
"OFF" |
GreenLight takes it's value from the RangeScript's DefaultCommand, since neither the SegmentGroup's DefaultCommand or the Command includes a value. |
Sighters |
"ON" |
GreenLight takes it's value from the SegmentGroup's DefaultCommand, since the Command does not include a value. |
Competition |
"ON" |
GreenLight take's it's value from the Command directly. |
Post-Competition |
"OFF" |
GreenLight take's it's value from the Command directly. |