{ "custom": {}, "params": { "boxColor": "var(--olGray)", "inputPower_E": 1, "inputPower_N": 0, "objectName": "ATS", "outputPower": 1, "tagPath": "[Ignition_Common_IO_Gtwy]MPR1247/SATB1_MPR1247_M8_ATS", "textColor": "var(--olGray)", "textHandler": { "ATS1": "N", "ATS2": "E", "ATS3": "L" } }, "propConfig": { "params.boxColor": { "paramDirection": "input", "persistent": true }, "params.inputPower_E": { "paramDirection": "input", "persistent": true }, "params.inputPower_N": { "paramDirection": "input", "persistent": true }, "params.objectName": { "paramDirection": "input", "persistent": true }, "params.outputPower": { "binding": { "config": { "struct": { "S1": "{/root/SWBD_ATS.custom.ATSOnS1}", "S2": "{/root/SWBD_ATS.custom.ATSOnS2}", "inPowerE": "{view.params.inputPower_E}", "inPowerN": "{view.params.inputPower_N}" }, "waitOnAll": true }, "transforms": [ { "code": "\t#if value[\u0027inPowerN\u0027] or value[\u0027inPowerE\u0027] or value[\u0027S1\u0027] or (value[\u0027S2\u0027] is None):\n\t#\treturn 0\n\tif (value[\u0027inPowerN\u0027]\u003d\u003d1) and (value[\u0027S1\u0027]\u003d\u003dTrue):\n\t\treturn 1\n\telif (value[\u0027inPowerE\u0027]\u003d\u003d1) and (value[\u0027S2\u0027]\u003d\u003dTrue):\n\t\treturn 1\n\telse:\n\t\treturn 0", "type": "script" } ], "type": "expr-struct" }, "paramDirection": "output", "persistent": true }, "params.tagPath": { "paramDirection": "input", "persistent": true }, "params.textColor": { "paramDirection": "input", "persistent": true }, "params.textHandler": { "paramDirection": "input", "persistent": true } }, "props": { "defaultSize": { "height": 50, "width": 65 } }, "root": { "children": [ { "custom": { "colorHandler": {} }, "meta": { "name": "SWBD_ATS" }, "position": { "height": 50, "width": 65 }, "propConfig": { "custom.ATSOnS1": { "binding": { "config": { "fallbackDelay": 2.5, "mode": "indirect", "references": { "tagPath": "{view.params.tagPath}" }, "tagPath": "{tagPath}/On Source 1" }, "transforms": [ { "fallback": false, "inputType": "scalar", "mappings": [ { "input": true, "output": true } ], "outputType": "scalar", "type": "map" } ], "type": "tag" } }, "custom.ATSOnS2": { "binding": { "config": { "expression": "tag({view.params.tagPath}+\u0027/On Source 2\u0027) \u0026\u0026 !tag({view.params.tagPath}+\u0027/On Source 1\u0027)" }, "transforms": [ { "fallback": false, "inputType": "scalar", "mappings": [ { "input": true, "output": true } ], "outputType": "scalar", "type": "map" } ], "type": "expr" } }, "custom.colorHandler.ATSOut": { "binding": { "config": { "expression": "concat(\u0027var(\u0027,\r\nif({view.params.inputPower_N} \u0026\u0026 {this.custom.ATSOnS1},\u0027--olRed\u0027,\r\nif({view.params.inputPower_E} \u0026\u0026 {this.custom.ATSOnS2},\u0027--olRed\u0027,\u0027--olGreen\u0027))\r\n,\u0027)\u0027)" }, "type": "expr" } }, "custom.colorHandler.emergencyIn": { "binding": { "config": { "expression": "{view.params.inputPower_E}" }, "transforms": [ { "fallback": "var(--olGray)", "inputType": "scalar", "mappings": [ { "input": 1, "output": "var(--elec-on)" }, { "input": 0, "output": "var(--elec-off)" } ], "outputType": "scalar", "type": "map" } ], "type": "expr" } }, "custom.colorHandler.normalIn": { "binding": { "config": { "expression": "{view.params.inputPower_N}" }, "transforms": [ { "fallback": "var(--olGray)", "inputType": "scalar", "mappings": [ { "input": 1, "output": "var(--elec-on)" }, { "input": 0, "output": "var(--elec-off)" } ], "outputType": "scalar", "type": "map" } ], "type": "expr" } }, "props.elements[0].elements[0].stroke.paint": { "binding": { "config": { "path": "this.custom.colorHandler.normalIn" }, "type": "property" } }, "props.elements[0].elements[0].visibility": { "binding": { "config": { "struct": { "S1": "{this.custom.ATSOnS1}", "S2": "{this.custom.ATSOnS2}" }, "waitOnAll": true }, "transforms": [ { "code": "\tif (value[\u0027S1\u0027] or value[\u0027S2\u0027]) is None:\n\t\treturn \u0027hidden\u0027\n\tif value[\u0027S1\u0027] and not value[\u0027S2\u0027]:\n\t\treturn \u0027visible\u0027\n\treturn \u0027hidden\u0027", "type": "script" } ], "type": "expr-struct" } }, "props.elements[0].elements[1].stroke.paint": { "binding": { "config": { "path": "this.custom.colorHandler.emergencyIn" }, "type": "property" } }, "props.elements[0].elements[1].visibility": { "binding": { "config": { "struct": { "S1": "{this.custom.ATSOnS1}", "S2": "{this.custom.ATSOnS2}" }, "waitOnAll": true }, "transforms": [ { "code": "\tif (value[\u0027S1\u0027] or value[\u0027S2\u0027]) is None:\n\t\treturn \u0027hidden\u0027\n\tif value[\u0027S2\u0027] and not value[\u0027S1\u0027]:\n\t\treturn \u0027visible\u0027\n\treturn \u0027hidden\u0027", "type": "script" } ], "type": "expr-struct" } }, "props.elements[0].elements[2].fill": { "binding": { "config": { "path": "this.custom.colorHandler.normalIn" }, "type": "property" } }, "props.elements[0].elements[3].fill": { "binding": { "config": { "path": "this.custom.colorHandler.normalIn" }, "type": "property" } }, "props.elements[0].elements[4].fill": { "binding": { "config": { "path": "this.custom.colorHandler.emergencyIn" }, "type": "property" } }, "props.elements[0].elements[5].fill": { "binding": { "config": { "path": "this.custom.colorHandler.emergencyIn" }, "type": "property" } }, "props.elements[0].elements[6].fill": { "binding": { "config": { "path": "this.custom.colorHandler.ATSOut" }, "transforms": [ { "code": "\tif value is None:\n\t\treturn \u0027purple\u0027\n\treturn value", "type": "script" } ], "type": "property" } }, "props.elements[0].elements[7].fill": { "binding": { "config": { "path": "this.custom.colorHandler.ATSOut" }, "transforms": [ { "code": "\tif value is None:\n\t\treturn \u0027purple\u0027\n\treturn value", "type": "script" } ], "type": "property" } }, "props.elements[0].elements[8].elements[1].text": { "binding": { "config": { "path": "view.params.textHandler.ATS3" }, "type": "property" } }, "props.elements[0].elements[8].elements[3].text": { "binding": { "config": { "path": "view.params.textHandler.ATS1" }, "type": "property" } }, "props.elements[0].elements[8].elements[5].text": { "binding": { "config": { "path": "view.params.textHandler.ATS2" }, "type": "property" } }, "props.elements[0].elements[8].fill": { "binding": { "config": { "path": "view.params.textColor" }, "type": "property" } }, "props.elements[1].elements[0].fill": { "binding": { "config": { "path": "this.custom.colorHandler.ATSOut" }, "transforms": [ { "code": "\tif value is None:\n\t\treturn \u0027purple\u0027\n\treturn value", "type": "script" } ], "type": "property" } }, "props.elements[1].elements[1].fill": { "binding": { "config": { "path": "this.custom.colorHandler.ATSOut" }, "transforms": [ { "code": "\tif value is None:\n\t\treturn \u0027purple\u0027\n\treturn value", "type": "script" } ], "type": "property" } }, "props.elements[1].elements[2].stroke.paint": { "binding": { "config": { "path": "this.custom.colorHandler.ATSOut" }, "transforms": [ { "code": "\tif value is None:\n\t\treturn \u0027purple\u0027\n\treturn value", "type": "script" } ], "type": "property" } }, "props.elements[2].elements[1].fill.paint": { "binding": { "config": { "expression": "case(\r\n\t{/root.custom.alarmSeverity},\r\n\t1, \"var(--coolpurple)\",\r\n\t2, \"var(--goldenyellow)\",\r\n\t3, \"var(--sunsetorange)\",\r\n\t4, \"var(--alarmred)\",\r\n\t\"transparent\"\r\n)\t" }, "type": "expr" } }, "props.elements[2].elements[2].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d3,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } }, "props.elements[2].elements[3].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d3,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } }, "props.elements[2].elements[4].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d2,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } }, "props.elements[2].elements[5].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d1,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } }, "props.elements[2].elements[6].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d4,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } }, "props.elements[2].elements[7].visibility": { "binding": { "config": { "expression": "if({/root.custom.alarmSeverity}!\u003d4,\u0027hidden\u0027,\u0027visible\u0027)\r\n\r\n\t" }, "type": "expr" } } }, "props": { "elements": [ { "elements": [ { "d": "M13.845,26.153l-7.91,-12.202", "fill": { "paint": "transparent" }, "id": "SRC01", "name": "SRC01", "stroke": { "width": "0.75px" }, "type": "path" }, { "d": "M13.845,26.153l7.694,-12.278", "fill": { "paint": "transparent" }, "id": "SRC02", "name": "SRC02", "stroke": { "width": "0.75px" }, "type": "path" }, { "cx": "4.875", "cy": "15", "id": "T1", "name": "T1", "r": "1.125", "type": "circle" }, { "d": "M4.875,13.875c0.621,0 1.125,0.504 1.125,1.125c-0,0.621 -0.504,1.125 -1.125,1.125c-0.621,0 -1.125,-0.504 -1.125,-1.125c-0,-0.621 0.504,-1.125 1.125,-1.125Zm-0,0.75c-0.207,0 -0.375,0.168 -0.375,0.375c-0,0.207 0.168,0.375 0.375,0.375c0.207,0 0.375,-0.168 0.375,-0.375c-0,-0.207 -0.168,-0.375 -0.375,-0.375Z", "name": "path", "type": "path" }, { "cx": "22.5", "cy": "15", "id": "T2", "name": "T2", "r": "1.125", "type": "circle" }, { "d": "M22.5,13.875c0.621,0 1.125,0.504 1.125,1.125c-0,0.621 -0.504,1.125 -1.125,1.125c-0.621,0 -1.125,-0.504 -1.125,-1.125c-0,-0.621 0.504,-1.125 1.125,-1.125Zm-0,0.75c-0.207,0 -0.375,0.168 -0.375,0.375c-0,0.207 0.168,0.375 0.375,0.375c0.207,0 0.375,-0.168 0.375,-0.375c-0,-0.207 -0.168,-0.375 -0.375,-0.375Z", "name": "path", "type": "path" }, { "cx": "13.845", "cy": "26.153", "id": "T3", "name": "T3", "r": "1.125", "type": "circle" }, { "d": "M13.845,25.028c0.621,-0 1.125,0.504 1.125,1.125c0,0.621 -0.504,1.125 -1.125,1.125c-0.621,-0 -1.125,-0.504 -1.125,-1.125c0,-0.621 0.504,-1.125 1.125,-1.125Zm0,0.75c-0.207,-0 -0.375,0.168 -0.375,0.375c0,0.207 0.168,0.375 0.375,0.375c0.207,-0 0.375,-0.168 0.375,-0.375c0,-0.207 -0.168,-0.375 -0.375,-0.375Z", "name": "path", "type": "path" }, { "elements": [ { "name": "group", "transform": "matrix(4.16667,0,0,4.16667,17.3646,28.4814)", "type": "group" }, { "name": "text", "style": { "fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027", "fontSize": "4.167px" }, "type": "text", "x": "15.047px", "y": "28.481px" }, { "name": "group", "transform": "matrix(4.16667,0,0,4.16667,9.86509,14.5291)", "type": "group" }, { "name": "text", "style": { "fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027", "fontSize": "4.167px" }, "type": "text", "x": "6.856px", "y": "14.529px" }, { "name": "group", "transform": "matrix(4.16667,0,0,4.16667,26.9647,14.5291)", "type": "group" }, { "name": "text", "style": { "fontFamily": "\u0027ArialMT\u0027, \u0027Arial\u0027", "fontSize": "4.167px" }, "type": "text", "x": "24.186px", "y": "14.529px" } ], "id": "Text", "name": "Text", "type": "group" } ], "id": "ATS", "name": "ATS", "type": "group" }, { "elements": [ { "cx": "35.977", "cy": "15", "id": "T11", "name": "T11", "r": "1.125", "type": "circle" }, { "d": "M35.977,13.875c0.621,0 1.125,0.504 1.125,1.125c-0,0.621 -0.504,1.125 -1.125,1.125c-0.621,0 -1.125,-0.504 -1.125,-1.125c-0,-0.621 0.504,-1.125 1.125,-1.125Zm-0,0.75c-0.207,0 -0.375,0.168 -0.375,0.375c-0,0.207 0.168,0.375 0.375,0.375c0.207,0 0.375,-0.168 0.375,-0.375c-0,-0.207 -0.168,-0.375 -0.375,-0.375Z", "name": "path", "type": "path" }, { "d": "M35.977,15l-0,19.716l-22.132,0l0,-8.563", "fill": { "paint": "transparent" }, "id": "Bar", "name": "Bar", "stroke": { "linecap": "butt", "linejoin": "bevel", "miterlimit": "1.5", "width": "0.75px" }, "type": "path" } ], "id": "Bus", "name": "Bus", "type": "group" }, { "elements": [ { "fill": { "opacity": "0", "paint": "#ebebeb" }, "height": "30", "id": "AlarmBorder", "name": "AlarmBorder", "type": "rect", "width": "41.25", "x": "0", "y": "7.5" }, { "d": "M41.25,7.5l-0,30l-41.25,0l0,-30l41.25,0Zm-0.75,0.75l-39.75,0l-0,28.5l39.75,-0l0,-28.5Z", "fill": {}, "name": "path", "type": "path" }, { "d": "M41.608,0.648l6.489,6.489c0.199,0.199 0.199,0.522 0,0.721l-6.489,6.489c-0.199,0.199 -0.522,0.199 -0.721,0l-6.489,-6.489c-0.199,-0.199 -0.199,-0.522 -0,-0.721l6.489,-6.489c0.199,-0.199 0.522,-0.199 0.721,-0Z", "fill": { "paint": "#de7c33" }, "name": "path", "stroke": { "linejoin": "round", "miterlimit": "1.5", "paint": "#000", "width": "0.48px" }, "type": "path" }, { "elements": [ { "elements": [ { "d": "M40.913,8.96l-0.351,-4.735l1.371,0l-0.34,4.735l-0.68,-0Zm-0.318,1.81l0,-1.105l1.305,0l0,1.105l-1.305,0Z", "fill": { "paint": "#fff", "rule": "nonzero" }, "name": "path", "type": "path" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" }, { "elements": [ { "d": "M40.605,1.849c0.134,-0.227 0.378,-0.367 0.643,-0.367c0.264,-0 0.508,0.14 0.642,0.367c1.411,2.401 4.768,8.113 6.195,10.541c0.136,0.231 0.137,0.516 0.005,0.748c-0.133,0.232 -0.38,0.375 -0.647,0.375l-12.39,0c-0.268,0 -0.515,-0.143 -0.647,-0.375c-0.133,-0.232 -0.131,-0.517 0.004,-0.748c1.427,-2.428 4.784,-8.14 6.195,-10.541Z", "fill": { "paint": "#f4b834" }, "name": "path", "stroke": { "linejoin": "round", "miterlimit": "1.5", "paint": "#000", "width": "0.48px" }, "type": "path" }, { "elements": [ { "elements": [ { "d": "M40.876,9.942l-0.389,-4.988l1.521,0l-0.377,4.988l-0.755,-0Zm-0.353,1.907l0,-1.164l1.449,0l-0,1.164l-1.449,-0Z", "fill": { "paint": "#fff", "rule": "nonzero" }, "name": "path", "type": "path" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" }, { "elements": [ { "d": "M46.057,1.181l-0,12.633c-0,0.265 -0.216,0.481 -0.481,0.481l-8.657,-0c-0.265,-0 -0.48,-0.216 -0.48,-0.481l-0,-12.633c-0,-0.265 0.215,-0.48 0.48,-0.48l8.657,-0c0.265,-0 0.481,0.215 0.481,0.48Z", "fill": { "paint": "#7166b7" }, "name": "path", "stroke": { "linejoin": "round", "miterlimit": "1.5", "paint": "#000", "width": "0.48px" }, "type": "path" }, { "elements": [ { "elements": [ { "d": "M40.876,9.042l-0.389,-5.001l1.521,-0l-0.377,5.001l-0.755,0Zm-0.353,1.912l0,-1.167l1.449,0l-0,1.167l-1.449,0Z", "fill": { "paint": "#fff", "rule": "nonzero" }, "name": "path", "type": "path" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" }, { "cx": "41.248", "cy": "7.498", "fill": { "paint": "#e22028" }, "name": "circle", "r": "7.198", "stroke": { "linejoin": "round", "miterlimit": "1.5", "paint": "#000", "width": "0.48px" }, "type": "circle" }, { "elements": [ { "elements": [ { "d": "M39.462,9.232l-0.389,-5.617l1.521,-0l-0.377,5.617l-0.755,0Zm-0.353,2.148l0,-1.31l1.449,-0l-0,1.31l-1.449,0Z", "fill": { "paint": "#fff", "rule": "nonzero" }, "name": "path", "type": "path" } ], "name": "group", "type": "group" }, { "elements": [ { "d": "M42.347,9.232l-0.389,-5.617l1.521,-0l-0.377,5.617l-0.755,0Zm-0.353,2.148l0,-1.31l1.449,-0l-0,1.31l-1.449,0Z", "fill": { "paint": "#fff", "rule": "nonzero" }, "name": "path", "type": "path" } ], "name": "group", "type": "group" } ], "name": "group", "type": "group" } ], "id": "AlarmItems", "name": "AlarmItems", "type": "group" } ], "fill": { "rule": "evenodd" }, "preserveAspectRatio": "none", "stroke": { "linecap": "round", "miterlimit": "1" }, "style": { "clipRule": "evenodd" }, "viewBox": "0 0 49 38" }, "type": "ia.shapes.svg" } ], "events": { "dom": { "onClick": { "config": { "script": "\ttagPath \u003d self.view.params.tagPath\n\tobjectName \u003d self.view.params.objectName\n\tutils.nav.openEQPopup(objectName, tagPath)\n" }, "scope": "G", "type": "script" } } }, "meta": { "name": "root" }, "propConfig": { "custom.alarmSeverity": { "binding": { "config": { "fallbackDelay": 2.5, "mode": "indirect", "references": { "tagPath": "{view.params.tagPath}" }, "tagPath": "{tagPath}/AlarmSummary/ActiveAlarms" }, "transforms": [ { "code": "\treturn alarm.summary.calcMaxPriority(self.view.params.tagPath)", "type": "script" } ], "type": "tag" } } }, "props": { "style": { "classes": "containers/HoverOver" } }, "type": "ia.container.coord" } }