-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor validation to consolidate validation function (#1034)
- Loading branch information
Showing
21 changed files
with
381 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
common/src/main/java/com/google/daq/mqtt/util/ExceptionList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.google.daq.mqtt.util; | ||
|
||
import static java.lang.String.format; | ||
|
||
import java.util.List; | ||
|
||
public class ExceptionList extends RuntimeException { | ||
|
||
private final List<Exception> list; | ||
|
||
public ExceptionList(List<Exception> list) { | ||
super(format("List of %d exceptions", list.size())); | ||
this.list = list; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
{ | ||
"timestamp": "2024-11-21T12:10:46Z", | ||
"version": "1.5.1", | ||
"generation": "2024-11-21T12:09:30Z", | ||
"scan_family": "bacnet", | ||
"scan_addr": "10117", | ||
"event_no": 9, | ||
"families": { | ||
"ipv4": { | ||
"addr": "192.168.1.131" | ||
} | ||
}, | ||
"refs": { | ||
"AI:1": { | ||
"name": "FCU_1180 Room Temp", | ||
"possible_values": [], | ||
"units": "degreesCelsius", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 20.488115310668945 | ||
} | ||
}, | ||
"AI:2": { | ||
"name": "FCU_1180 Supply Air Temp", | ||
"possible_values": [], | ||
"units": "degreesCelsius", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 20.14183235168457 | ||
} | ||
}, | ||
"AO:1": { | ||
"name": "FCU_1180 Heating Valve", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 0.0 | ||
} | ||
}, | ||
"AO:2": { | ||
"name": "FCU_1180 Cooling Valve", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 0.0 | ||
} | ||
}, | ||
"AO:3": { | ||
"name": "FCU_1180 Fan Speed", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 70.0 | ||
} | ||
}, | ||
"AV:1": { | ||
"name": "FCU_1180 Setpoint", | ||
"possible_values": [], | ||
"units": "degreesCelsius", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 20.0 | ||
} | ||
}, | ||
"AV:2": { | ||
"name": "FCU_1180 Min Fan Speed", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 20.0 | ||
} | ||
}, | ||
"AV:3": { | ||
"name": "FCU_1180 Max Fan Speed", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 100.0 | ||
} | ||
}, | ||
"AV:4": { | ||
"name": "FCU_1180 Design Fan Speed", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 70.0 | ||
} | ||
}, | ||
"AV:5": { | ||
"name": "FCU_1180 Design Heating Valve Position", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 75.0 | ||
} | ||
}, | ||
"AV:6": { | ||
"name": "FCU_1180 Design Cooling Valve Position", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 67.0 | ||
} | ||
}, | ||
"AV:7": { | ||
"name": "FCU_1180 Mode_Mimic", | ||
"possible_values": [], | ||
"units": "noUnits", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 1.0 | ||
} | ||
}, | ||
"AV:9991": { | ||
"name": "FCU_1180 Comfort KPI Score (Live)", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 69.89265441894531 | ||
} | ||
}, | ||
"AV:9992": { | ||
"name": "FCU_1180 Comfort KPI Score (Yesterday)", | ||
"possible_values": [], | ||
"units": "percent", | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 69.99639129638672 | ||
} | ||
}, | ||
"BI:3": { | ||
"name": "FCU_1180 Fan Status", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"BI:4": { | ||
"name": "FCU_1180 Occupancy", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"BO:4": { | ||
"name": "FCU_1180 Enable", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"BV:1": { | ||
"name": "FCU_1180 BMS Remote", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"BV:2": { | ||
"name": "FCU_1180 FCU Run Status", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"BV:9991": { | ||
"name": "FCU_1180 Within Bounds", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "active" | ||
} | ||
}, | ||
"MSV:1": { | ||
"name": "FCU_1180 Mode", | ||
"possible_values": [ | ||
"Auto_", | ||
"On_", | ||
"Off_", | ||
"Flushing_", | ||
"Commissioning_" | ||
], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 1 | ||
} | ||
}, | ||
"LP:1": { | ||
"name": "FCU_101 Valve Control Loop", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 50.0 | ||
} | ||
}, | ||
"LP:2": { | ||
"name": "FCU_101 Fan Control Loop", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": 50.0 | ||
} | ||
}, | ||
"CSV:1": { | ||
"name": "Google Cloud IoT Gateway Configuration", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "{\n \"hostName\": \"mqtt.bos.goog\",\n \"tcpPort\": 8883,\n \"location\": \"us-central1\",\n \"project\": \"bos-platform-testing\",\n \"registry\": \"UK-LON-GLAB\",\n \"device\": \"DDC-17\"\n}" | ||
} | ||
}, | ||
"CSV:1000001": { | ||
"name": "BLE PIN", | ||
"possible_values": [], | ||
"description": "", | ||
"ancillary": { | ||
"present_value": "800700" | ||
} | ||
} | ||
}, | ||
"system": { | ||
"serial_no": "141557/0009", | ||
"ancillary": { | ||
"name": "DDC-17" | ||
}, | ||
"hardware": { | ||
"make": "Delta Controls Inc.", | ||
"model": "Red5-PLUS-1180" | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
1 schema violations found | ||
/system: object instance has properties which are not allowed by the schema: ["software"] | ||
/system: object instance has properties which are not allowed by the schema: ["software"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.