| | |
| | | borderopacity="1.0" |
| | | inkscape:pageopacity="0.0" |
| | | inkscape:pageshadow="2" |
| | | inkscape:zoom="15.839192" |
| | | inkscape:cx="-12.823288" |
| | | inkscape:cy="13.478538" |
| | | inkscape:zoom="5.6" |
| | | inkscape:cx="-39.351516" |
| | | inkscape:cy="45.026974" |
| | | inkscape:document-units="mm" |
| | | inkscape:current-layer="svg1894" |
| | | showgrid="false" |
| | |
| | | |
| | | public void timer() |
| | | { |
| | | status(); |
| | | } |
| | | |
| | | public void status() |
| | |
| | | flashOn = java.util.Calendar.getInstance().get(java.util.Calendar.SECOND) % 2 == 0; |
| | | |
| | | Device device = getDevice(); |
| | | art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerInformation information = (art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerInformation) device.getDeviceInformation(); |
| | | art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerStatus status = (art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerStatus) device.getDeviceStatus(); |
| | | |
| | | art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General statusGeneral = status.rtz32.general; |
| | |
| | | SVGElement background = getElement("Background"); |
| | | SVGElement border = getElement("Border"); |
| | | |
| | | setAttribute(border, "display", "none",999); |
| | | setAttribute(background, "display", "none", 999); |
| | | setAttribute(border, "display", "inline",999); |
| | | setAttribute(background, "display", "inline", 999); |
| | | |
| | | SVGElement controlMode = null; |
| | | |
| | | if (status.status == art.library.model.devices.DeviceStatus.STATUS_UNKNOWN || status.status == art.library.model.devices.DeviceStatus.STATUS_OFFLINE) |
| | | if (information.mode == art.library.model.devices.colors.controller.RTZ32.RTZ32_ControllerInformation.MODE_NON_CENTRALIZED) |
| | | { |
| | | setAttribute(background, "fill", "#00FF00", 999); |
| | | setAttribute(background, "display", flashOn || status.status == art.library.model.devices.DeviceStatus.STATUS_OFFLINE ? "inline" : "none", 999); |
| | | } |
| | | else if (statusGeneral.state == art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General.STATE_FLASHING) |
| | | { |
| | | setAttribute(border, "fill", "#FFFFFF",999); |
| | | setAttribute(background, "fill", "#FFFFFF", 999); |
| | | setAttribute(background, "display", flashOn ? "inline" : "none", 999); |
| | | } |
| | | else |
| | | { |
| | | controlMode = statusGeneral.semiactuated ? border : background; |
| | | if (status.rtz32.centralized.centralized == false) |
| | | { |
| | | setAttribute(border, "fill", "#808080", 999); |
| | | setAttribute(background, "fill", "#808080", 999); |
| | | } |
| | | else |
| | | { |
| | | boolean semiactuated = status.rtz32.general.semiactuated ; |
| | | boolean offline = false; |
| | | |
| | | if (device.getAlarm("alarm_controller_offline") > 0 || device.getAlarm("alarm_offline") > 0) |
| | | { |
| | | offline = true; |
| | | setAttribute(border, "display", flashOn ? "inline" : "none", 999); |
| | | setAttribute(background, "display", flashOn ? "inline" : "none", 999); |
| | | } |
| | | |
| | | if (controlMode != null) |
| | | if (status.rtz32.general.control == art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General.CONTROL_COMPUTER) |
| | | { |
| | | if (statusGeneral.control == art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General.CONTROL_LOCAL) |
| | | setAttribute(border, "fill", "#00FF00", 999); |
| | | setAttribute(background, "fill", "#00FF00", 999); |
| | | |
| | | if(offline == true) |
| | | { |
| | | setAttribute(controlMode, "fill", "#FF0000", 999); |
| | | setAttribute(background, "display", flashOn || semiactuated ? "none" : "inline", 999); |
| | | setAttribute(border, "display", flashOn ? "none" : "inline", 999); |
| | | } |
| | | else if (statusGeneral.control == art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General.CONTROL_COMPUTER) |
| | | { |
| | | setAttribute(controlMode, "fill", "#00FF00", 999); |
| | | |
| | | if(semiactuated) |
| | | setAttribute(background, "display", flashOn || semiactuated ? "none" : "inline", 999); |
| | | } |
| | | setAttribute(controlMode, "display", "inline", 999); |
| | | else if (status.rtz32.general.control == art.library.model.devices.colors.controller.RTZ32.status.RTZ32_Status_General.CONTROL_LOCAL) |
| | | { |
| | | setAttribute(border, "fill", "#FF0000", 999); |
| | | setAttribute(background, "fill", "#FF0000", 999); |
| | | |
| | | if (offline == true) |
| | | { |
| | | setAttribute(background, "display", flashOn || semiactuated ? "none" : "inline", 999); |
| | | setAttribute(border, "display", flashOn ? "none" : "inline", 999); |
| | | } |
| | | |
| | | if(semiactuated) |
| | | setAttribute(background, "display", flashOn || semiactuated ? "none" : "inline", 999); |
| | | } |
| | | |
| | | if (device.getAlarm("alarm_controller_offline") <= 0 && device.getAlarm("alarm_offline") <= 0) |
| | | { |
| | | if (art.library.model.devices.colors.controller.RTZ32.RTZ32_Controller.class.cast(device).getDeviceAlarms().rtz32.flashing.getServerityAlarm() > 0) |
| | | { |
| | | setAttribute(border, "fill", "#FFFF00", 999); |
| | | setAttribute(background, "fill", "#FFFF00", 999); |
| | | setAttribute(border, "display", flashOn ? "inline" : "none", 999); |
| | | setAttribute(background, "display", flashOn ? "inline" : "none", 999); |
| | | |
| | | if(semiactuated) |
| | | setAttribute(background, "display","none", 999); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | catch (Exception ex){} |
| | | } |
| | | "> |
| | | }"> |
| | | <rdf:RDF> |
| | | <cc:Work |
| | | rdf:about=""> |