7 files added
2 files modified
| New file |
| | |
| | | [ |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "Neurallabs", |
| | | "Model": "Neurallabs", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": false, |
| | | "Zoom": false, |
| | | "Focus": false, |
| | | "Presets": false, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": false, |
| | | "Absolute movement": false |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "DAHUA", |
| | | "Model": "DAHUA", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": true, |
| | | "Zoom": true, |
| | | "Focus": false, |
| | | "Presets": true, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": true, |
| | | "Absolute movement": true |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "DAHUA", |
| | | "Model": "DH-IPC-HFW5241EP-Z12E", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": false, |
| | | "Zoom": false, |
| | | "Focus": false, |
| | | "Presets": false, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": false, |
| | | "Absolute movement": false |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "HIKVISION", |
| | | "Model": "HIKVISION", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": true, |
| | | "Zoom": true, |
| | | "Focus": false, |
| | | "Presets": true, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": true, |
| | | "Absolute movement": true |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "HIKVISION", |
| | | "Model": "DS-2DE7A232IW-AEB", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": true, |
| | | "Zoom": true, |
| | | "Focus": false, |
| | | "Presets": true, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": true, |
| | | "Absolute movement": true |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "Camera information": |
| | | { |
| | | "Manufacturer": "AXIS", |
| | | "Model": "AXIS", |
| | | "Protocol": "ONVIF", |
| | | |
| | | "PTZ features": |
| | | { |
| | | "Movement": true, |
| | | "Zoom": true, |
| | | "Focus": false, |
| | | "Presets": true, |
| | | "Home": false, |
| | | "Rotate 180": false, |
| | | "Variable speed": true, |
| | | "Absolute movement": true |
| | | } |
| | | |
| | | } |
| | | } |
| | | ] |
| New file |
| | |
| | | { |
| | | |
| | | "Cleaner": |
| | | { |
| | | "Trigger": 86400 |
| | | }, |
| | | |
| | | "Protocols": |
| | | [ |
| | | "Onvif", |
| | | "Pelco" |
| | | ], |
| | | |
| | | |
| | | "Seconds for offline" : 0 |
| | | } |
| New file |
| | |
| | | |
| | | { |
| | | "General": |
| | | { |
| | | "Language": "en-GB", |
| | | "Executable name": "cameraserver64.exe", |
| | | "Window title" : "ALUVISA CAMERA SERVER", |
| | | "Window icon": "data/art.servers.cameraserver/icons/24x24/security-camera.png", |
| | | "Window x": 0, |
| | | "Window y": 0, |
| | | "Window w": 1024, |
| | | "Window h": 768, |
| | | "Properties": |
| | | { |
| | | "com.sun.management.jmxremote.port": "6002", |
| | | "com.sun.management.jmxremote.authenticate": "false", |
| | | "com.sun.management.jmxremote.ssl": "false", |
| | | "file.encoding": "UTF-8" |
| | | } |
| | | }, |
| | | "Application": |
| | | { |
| | | "Application information": |
| | | { |
| | | "Identifier" : "server.cameraserver.corunya.1", |
| | | "Group" : "A CORUÑA", |
| | | "Name" : "Server cameras", |
| | | "Server service name": "camera", |
| | | "Location": "", |
| | | "Description": "", |
| | | "Road": "", |
| | | "Kilometric Point": "", |
| | | "Latitude" : 0.0, |
| | | "Longitude" : 0.0, |
| | | "Owner" : "", |
| | | "Maintainer" : "", |
| | | "Heartbeat" : 900000, |
| | | "Threshold threads warning" : 5000, |
| | | "Threshold threads error" : 10000, |
| | | "Threshold memory warning" : 100000000, |
| | | "Threshold memory error" : 200000000, |
| | | "Threshold process cpu load warning" : 100, |
| | | "Threshold process cpu load error" : 100, |
| | | "Threshold system cpu load warning" : 100, |
| | | "Threshold system cpu load error" : 100 |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | "Listener" : |
| | | { |
| | | "Address" : "172.17.0.167", |
| | | "Port" : 5002, |
| | | "Timeout" : 0, |
| | | "Connections" : 250 |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | "Listener http" : |
| | | { |
| | | "Port" : 7002, |
| | | "Timeout" : 0 |
| | | }, |
| | | |
| | | |
| | | "Listener https": { |
| | | "Port": 8002, |
| | | "Timeout": 0, |
| | | "Keystore location": "c:/aluvisa/artic/servers/art.keystore", |
| | | "Keystore password": "2owbmTQbaQMrZICiTmN1EQ==" |
| | | }, |
| | | |
| | | |
| | | "Listener debug" : |
| | | { |
| | | "Port" : 9002, |
| | | "Maximum connections": 3, |
| | | "Allowed connections": [] |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | "Database": |
| | | [{ |
| | | "Name": "timeless", |
| | | "Area": "timeless", |
| | | "Type": "postgresql", |
| | | "Driver": "org.postgresql.Driver", |
| | | "Connection string": "jdbc:postgresql://172.17.0.161:6001/ARTIC", |
| | | "User": "A/zYtigVU7uJN/pJjR1y0A==", |
| | | "Password": "XkTk/lXBBmtDivSxv5OvPQ==", |
| | | "Connections": 1, |
| | | "Pending folder": "database/pending/timeless", |
| | | "Pending days": 7, |
| | | "Pending timer": 60 |
| | | }, { |
| | | "Name": "historical", |
| | | "Area": "historical", |
| | | "Type": "postgresql", |
| | | "Driver": "org.postgresql.Driver", |
| | | "Connection string": "jdbc:postgresql://172.17.0.161:6002/ARTICHISTORICAL", |
| | | "User": "A/zYtigVU7uJN/pJjR1y0A==", |
| | | "Password": "XkTk/lXBBmtDivSxv5OvPQ==", |
| | | "Connections": 1, |
| | | "Pending folder": "database/pending/historical", |
| | | "Pending days": 30, |
| | | "Pending timer": 60 |
| | | } |
| | | ], |
| | | |
| | | |
| | | "Symbols": |
| | | [ |
| | | "Fixed camera", |
| | | "Dome camera" |
| | | ], |
| | | |
| | | |
| | | "Messages": |
| | | { |
| | | "en-GB": |
| | | { |
| | | "Messages": {} |
| | | } |
| | | } |
| | | } |
| | |
| | | import Meteo.Mockers.MeteoMockerMap; |
| | | import Mocker.IDeviceMocker; |
| | | import ParkingEquinsa.mockers.ParkingEquinsaMockerMap; |
| | | import ParkingUrbiotica.mockers.ParkingUrbioticaMockerMap; |
| | | import Pvv.mockers.PvvMockerAspectCommands; |
| | | import Pvv.mockers.PvvMockerAspectStatus; |
| | | import Pvv.mockers.PvvMockerMap; |
| | |
| | | public class SvgDeviceStatusTest |
| | | { |
| | | |
| | | private static final SvgMocker SELECTED_MOCKER = SvgMocker.RTZMapComplex; |
| | | private static final SvgMocker SELECTED_MOCKER = SvgMocker.ParkingUrbiotica; |
| | | |
| | | public static String mapPath; |
| | | |
| | |
| | | LightStudsStatus(LightStudsMockerAspectStatus.class), |
| | | LightStudsMap(LightStudsMockerMap.class), |
| | | ParkingEquinsa(ParkingEquinsaMockerMap.class), |
| | | ParkingUrbiotica(ParkingUrbioticaMockerMap.class), |
| | | RedEnforcement(RedEnforcementMockerMap.class), |
| | | RotapanelStatus(RotapanelAspectMocker.class), |
| | | RotapanelCommands(RotapanelActionMocker.class), |
| | |
| | | package ParkingEquinsa.mockers; |
| | | |
| | | import Mocker.IDeviceMocker; |
| | | import ParkingEquinsa.ParkingEquinsaMap; |
| | | import ParkingUrbiotica.ParkingUrbioticaMap; |
| | | import art.library.interop.serialization.Serialization; |
| | | import art.library.interop.serialization.SerializationException; |
| | | import art.library.model.devices.Device; |
| | |
| | | @Override |
| | | public Class getScriptClass() |
| | | { |
| | | return ParkingEquinsaMap.class; |
| | | return ParkingUrbioticaMap.class; |
| | | } |
| | | } |
| New file |
| | |
| | | package ParkingUrbiotica; |
| | | |
| | | |
| | | import art.library.model.devices.Device; |
| | | import art.library.model.devices.DeviceGraphicsRuntime; |
| | | import art.library.model.devices.DeviceStatus; |
| | | import com.kitfox.svg.SVGDiagram; |
| | | |
| | | public class ParkingUrbioticaMap extends DeviceGraphicsRuntime |
| | | { |
| | | |
| | | public ParkingUrbioticaMap(art.library.model.devices.Device device, SVGDiagram diagram) |
| | | { |
| | | super(device, diagram); |
| | | } |
| | | |
| | | public void status() |
| | | { |
| | | setAttribute("Icon", "display", "none"); |
| | | |
| | | Device device = getDevice(); |
| | | |
| | | art.library.model.devices.parking.ParkingInformation information = (art.library.model.devices.parking.ParkingInformation) device.getDeviceInformation(); |
| | | art.library.model.devices.parking.ParkingStatus status = (art.library.model.devices.parking.ParkingStatus) device.getDeviceStatus(); |
| | | art.library.model.devices.parking.ParkingAlarms alarm = (art.library.model.devices.parking.ParkingAlarms) device.getDeviceAlarms(); |
| | | |
| | | String color1 = "#000000"; |
| | | String color2 = "#000000"; |
| | | |
| | | switch (status.status) |
| | | { |
| | | case DeviceStatus.STATUS_ONLINE: |
| | | case DeviceStatus.STATUS_WARNING: |
| | | case DeviceStatus.STATUS_ALARM: |
| | | color1 = "#00FF00"; |
| | | color2 = "#008000"; |
| | | if (alarm.alarm_complete > 0) |
| | | { |
| | | color1 = "#FF0000"; |
| | | color2 = "#800000"; |
| | | } |
| | | else if (alarm.alarm_almost_complete > 0) |
| | | { |
| | | color1 = "#FFFF00"; |
| | | color2 = "#808000"; |
| | | } |
| | | break; |
| | | case DeviceStatus.STATUS_INVALID: |
| | | color1 = "#B97A57"; |
| | | color2 = "#5A3B2A"; |
| | | break; |
| | | case DeviceStatus.STATUS_DISABLE: |
| | | color1 = "#808080"; |
| | | color2 = "#3E3E3E"; |
| | | break; |
| | | case DeviceStatus.STATUS_SIMULATION: |
| | | color1 = "#0000FF"; |
| | | color2 = "#000080"; |
| | | break; |
| | | case DeviceStatus.STATUS_OFFLINE: |
| | | color1 = "#FF00FF"; |
| | | color2 = "#800080"; |
| | | break; |
| | | case DeviceStatus.STATUS_UNKNOWN: |
| | | color1 = "#FF00FF"; |
| | | color2 = "#800080"; |
| | | break; |
| | | } |
| | | if ((status.status != DeviceStatus.STATUS_UNKNOWN) && (status.status != DeviceStatus.STATUS_OFFLINE) && (status.status != DeviceStatus.STATUS_INVALID)) |
| | | { |
| | | try |
| | | { |
| | | setAttribute("Status text", "font-size", "5"); |
| | | |
| | | setText("Status text", "" + status.urbiotica.freeSpots); |
| | | setAttribute("Status text", "fill", "#008000"); |
| | | |
| | | } catch (Exception e) |
| | | { |
| | | setText("Status text", "?"); |
| | | setAttribute("Status text", "fill", "#800080"); |
| | | } |
| | | } else |
| | | { |
| | | setText("Status text", "?"); |
| | | setAttribute("Status text", "fill", "#800080"); |
| | | } |
| | | setAttribute("Status text", "display", "inline"); |
| | | setAttribute("Background", "fill", color1); |
| | | setAttribute("Border", "stroke", color2); |
| | | } |
| | | |
| | | public void commands() |
| | | { |
| | | setAttribute("Background", "fill", "#0000FF"); |
| | | setAttribute("Border", "stroke", "#0000FF"); |
| | | setAttribute("Icon", "display", "inline"); |
| | | setAttribute("Status text", "display", "none"); |
| | | } |
| | | } |
| New file |
| | |
| | | package ParkingUrbiotica.mockers; |
| | | |
| | | import Mocker.IDeviceMocker; |
| | | import ParkingUrbiotica.ParkingUrbioticaMap; |
| | | import art.library.interop.serialization.Serialization; |
| | | import art.library.interop.serialization.SerializationException; |
| | | import art.library.model.devices.Device; |
| | | import art.library.model.devices.parking.Parking; |
| | | import svgdevicestest.mock.*; |
| | | |
| | | public class ParkingUrbioticaMockerMap extends DeviceMocker implements IDeviceMocker |
| | | { |
| | | |
| | | private static final String parking = "{\n" + |
| | | " \"Parking\" : {\n" + |
| | | " \"Last timestamp update\" : \"2024-10-14T11:55:33.875Z\",\n" + |
| | | " \"Last timestamp information update\" : \"2024-10-14T10:25:22.215Z\",\n" + |
| | | " \"Last timestamp status update\" : \"2024-10-14T11:55:33.875Z\",\n" + |
| | | " \"Last timestamp alarms update\" : \"2024-10-14T11:55:33.875Z\",\n" + |
| | | " \"Last timestamp configuration update\" : \"2024-10-14T10:25:22.215Z\",\n" + |
| | | " \"Device information\" : {\n" + |
| | | " \"Parking information\" : {\n" + |
| | | " \"Type\" : 5,\n" + |
| | | " \"Polling\" : 5,\n" + |
| | | " \"Alarms\" : [ ],\n" + |
| | | " \"Creation date\" : \"2024-10-14T10:25:22.214Z\",\n" + |
| | | " \"Description\" : \"\",\n" + |
| | | " \"Group\" : \"A Coruña\",\n" + |
| | | " \"Identifier\" : \"urbiotica-001\",\n" + |
| | | " \"Latitude\" : 43.36684604,\n" + |
| | | " \"Latitude offset\" : 0.0,\n" + |
| | | " \"Location\" : \"A Coruña\",\n" + |
| | | " \"Longitude\" : -8.409831,\n" + |
| | | " \"Longitude offset\" : 0.0,\n" + |
| | | " \"Municipality\" : \"A Coruña\",\n" + |
| | | " \"Name\" : \"S-001\",\n" + |
| | | " \"Number\" : 1,\n" + |
| | | " \"Server address\" : \"172.17.0.167\",\n" + |
| | | " \"Server port\" : 5023,\n" + |
| | | " \"Server port external\" : 0,\n" + |
| | | " \"Server service name\" : \"parking\",\n" + |
| | | " \"Symbol\" : \"Parking\",\n" + |
| | | " \"Urbiotica\" : {\n" + |
| | | " \"POM\" : 108253,\n" + |
| | | " \"Name\" : \"S-001\",\n" + |
| | | " \"Type\" : \"uspot_visio\",\n" + |
| | | " \"Camera\" : \"\",\n" + |
| | | " \"Preset\" : \"\"\n" + |
| | | " }\n" + |
| | | " }\n" + |
| | | " },\n" + |
| | | " \"Device configuration\" : {\n" + |
| | | " \"Parking configuration\" : { }\n" + |
| | | " },\n" + |
| | | " \"Device status\" : {\n" + |
| | | " \"Parking status\" : {\n" + |
| | | " \"Etd customs lpr\" : {\n" + |
| | | " \"State\" : 0,\n" + |
| | | " \"Signal state\" : 0,\n" + |
| | | " \"Car spaces\" : 0,\n" + |
| | | " \"Truck spaces\" : 0,\n" + |
| | | " \"Occupied car spaces\" : 0,\n" + |
| | | " \"Occupied truck spaces\" : 0,\n" + |
| | | " \"Input lprs\" : [ ],\n" + |
| | | " \"Output lprs\" : [ ],\n" + |
| | | " \"Input etds\" : [ ],\n" + |
| | | " \"Output etds\" : [ ]\n" + |
| | | " },\n" + |
| | | " \"Urbiotica\" : {\n" + |
| | | " \"Parking state\" : 1,\n" + |
| | | " \"Last change vehicle\" : 1728906555838,\n" + |
| | | " \"Free spots\" : 1,\n" + |
| | | " \"Undefined spots\" : 0,\n" + |
| | | " \"Occupied spots\" : 0,\n" + |
| | | " \"Max capacity\" : 1\n" + |
| | | " },\n" + |
| | | " \"Measurements timestamp\" : \"1970-01-01T00:00:00.000Z\",\n" + |
| | | " \"Status\" : 1\n" + |
| | | " }\n" + |
| | | " },\n" + |
| | | " \"Device alarms\" : {\n" + |
| | | " \"Parking alarms\" : {\n" + |
| | | " \"Alarm complete\" : 0,\n" + |
| | | " \"Alarm almost complete\" : 0,\n" + |
| | | " \"Alarm expiration time\" : 0,\n" + |
| | | " \"Alarm signal\" : 0,\n" + |
| | | " \"Alarm disabled\" : 0,\n" + |
| | | " \"Alarm invalid\" : 0,\n" + |
| | | " \"Alarm offline\" : 0,\n" + |
| | | " \"Alarm simulated\" : 0,\n" + |
| | | " \"Alarms configuration\" : [ ],\n" + |
| | | " \"Alarms implemented\" : [\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_offline\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_invalid\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_disabled\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_simulated\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_complete\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_almost_complete\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_expiration_time\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | " \"Name\" : \"alarm_signal\",\n" + |
| | | " \"Severity\" : 0,\n" + |
| | | " \"Timestamp\" : 0\n" + |
| | | " }\n" + |
| | | " ],\n" + |
| | | " \"Severity\" : 0\n" + |
| | | " }\n" + |
| | | " }\n" + |
| | | " }\n" + |
| | | "}"; |
| | | |
| | | public ParkingUrbioticaMockerMap() |
| | | { |
| | | super(getParking()); |
| | | } |
| | | |
| | | public ParkingUrbioticaMockerMap getMocker() |
| | | { |
| | | return this; |
| | | } |
| | | |
| | | @Override |
| | | public void updateDevice(boolean active) |
| | | { |
| | | Parking parking = (Parking) device; |
| | | |
| | | } |
| | | |
| | | private static Parking getParking() |
| | | { |
| | | Parking parkingMock; |
| | | try |
| | | { |
| | | parkingMock = (Parking)Serialization.deserialize(Device.class, parking); |
| | | |
| | | return parkingMock; |
| | | } |
| | | catch (SerializationException ex) |
| | | { |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public String getFilePath() |
| | | { |
| | | return "D:\\LocalBackup\\servers\\parkingserver\\data\\art.servers.parkingserver\\symbols\\20\\Parking.svg"; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isStatusMode() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public Class getScriptClass() |
| | | { |
| | | return ParkingUrbioticaMap.class; |
| | | } |
| | | } |