diff --git a/.gencode_hash.txt b/.gencode_hash.txt index 34335b4f07..46cf30c485 100644 --- a/.gencode_hash.txt +++ b/.gencode_hash.txt @@ -7,13 +7,13 @@ c70a7137ee1a30b35c9e19ca9bb54916247f9eb2e50eab37591cd2ca10b5eddb gencode/docs/c 3bc5d62ea07f817fc5cf84859724176fc3bff019e6e81ecfab0c35c39486fa5f gencode/docs/configuration_pod.html 156ba6bf85ad5a097a7eb7c36331717641184504f3f43db0bdc90d1abee28572 gencode/docs/configuration_pubber.html f24d15e549f1b143b50d6011f2f7fd03286e1cd128a3e25591195b25f8efc472 gencode/docs/data_template.html -cf81ddb4ed910159a9825cf4b6b68042421fdb9e1b49afa4ea4eced40d9cfc53 gencode/docs/events.html -dee267d04e54ddaa1b20a22cc09576a783534f33f773ac99ed61f7e818709e6a gencode/docs/events_discovery.html +0c6efea81a5f6c2b4fa2b2b7c42c1bc8cbcaf56d90005d7944ab18a9ce31dfa6 gencode/docs/events.html +402b4282634bbd48d940adf804eb26b507140cc0d8d6ee2a715f01ecece680b2 gencode/docs/events_discovery.html 65858e981eaad27e41fd7f64aae7d6a82d4519e798145eb10898e59cead517c3 gencode/docs/events_mapping.html c3bae844432d172033bc416e623fecee7608efd01d916b7eaee96252932c552a gencode/docs/events_pointset.html eed6ae125d94cf1986de96c210b0937b9c7b199724839f43fce3b357b057f8be gencode/docs/events_system.html e3683cb4561b6dda5703cb659fd6a8f12242725de389709a12eb45f146cbb295 gencode/docs/events_validation.html -ecafb56114c92e873329f184471ae39c002a12f1495bd75b24df22846ebb35a3 gencode/docs/metadata.html +c2f9b2c3ec0bf68698d1c7f18b4fe53c38bac1da01a3b88365e82a0e209e0d6c gencode/docs/metadata.html b110edfb73182782c7539adef417a970959432c92d4c9f4a0bf7e328c0e8427d gencode/docs/monitoring.html 86b62cb8e66ffb97d717fb8f1bf6a4f7d0a759cd15a8d040d5cc3451666f7c72 gencode/docs/persistent_device.html 5d039d607af9ec75ee552dfe36b16c702687ea16f5663f41fc49b4533b86e00d gencode/docs/properties.html @@ -42,12 +42,12 @@ fcbed49f1af8b791d8c52bcbe18f65521a79d9ac3eb33ec3afd9b342ab2bfc56 gencode/java/u 0c133f64013d5f2c4be203708def7ae11be631e90d5992222d6b4c97eef2573e gencode/java/udmi/schema/CapabilityValidationState.java ec164962f2f00924ecb41ae07c2e01d6bf027951ccc605e0210988370b987973 gencode/java/udmi/schema/Category.java a010037f8ad570060c6a03e5aa13bc6d5261a61bf70eb71e0d00e124036decea gencode/java/udmi/schema/CloudConfigModel.java -325bf22814870bd4eb0c0b9d39418d9351e50c7d6452304f5d27c2e9be39269b gencode/java/udmi/schema/CloudModel.java +65328b8a88d357ad3205e3fa8eef6fe9148a86b955790022be3c7804cab145fb gencode/java/udmi/schema/CloudModel.java 06c8c3131f111e49e0d3e518603a3f66349d5dee1aee64a98659cb8703a8baa6 gencode/java/udmi/schema/CloudQuery.java 992fb7d6bb8ce9eaf7fdfe69af575e442214bb62f82f846987eee473e952e980 gencode/java/udmi/schema/Common.java 377eb78de936317676faaf7ec5a32ad17f2c2c54a3280df87f5fcc2d36c7014d gencode/java/udmi/schema/Config.java cf9762392e02b5d04c6498963222cc0c00f7be6c3cd82bde3d063a5eceba2b65 gencode/java/udmi/schema/Connections.java -bce2fb657360d2c4e07816edb643cbf91c372f547226a6bf9f9e90af0a5e25b5 gencode/java/udmi/schema/Coordinates.java +a16d97089e851c59f3aa1e7818df1f71b317c30d46f92f80f63d318e100c88d0 gencode/java/udmi/schema/Coordinates.java 8164e93ccc76d78548d456890e064df8427a09bbcd50686b37a10d3ff5ad429f gencode/java/udmi/schema/Credential.java f8e26ca82202194ba41c4e3d6b3792022c3b38e24af6dfbb6cfea692fc593da8 gencode/java/udmi/schema/Depths.java 10d67bf2080403fd196f63097e4ce2151edaafe3cf4ac77598ef83e06f94cb05 gencode/java/udmi/schema/DeviceMappingConfig.java @@ -82,14 +82,14 @@ b539bc4304e1e604e9c6aa0242fb1344de9b18a8c88e12fb5c6f0a2530419501 gencode/java/u f02320b5b493d2475df0ef60cd18e86e4bf91244ebfec6f7ab45a792e0d44f15 gencode/java/udmi/schema/LocalnetConfig.java f33492dcb3570d5073113376e306156f0cbdf22a18d7fe12cb43b87b13819b50 gencode/java/udmi/schema/LocalnetModel.java 5fa1983db1022beebf978f217a3eb1f0ddf86bc6d9573d4cd151f4c0adbc9d13 gencode/java/udmi/schema/LocalnetState.java -e43c83b3d43d75cc71252343b29865e10317cf9610851ab022197a6b6bbd37c2 gencode/java/udmi/schema/Location.java +7e39a99438de0260f2cad5938a0f03492bfb01b5ce52a84fd3768bff6e50b93f gencode/java/udmi/schema/Location.java 7f71faa644ac86f3dcaf832d39a0deecfe443fc6a3bff912c0a66c09243c4cd9 gencode/java/udmi/schema/MappingCommand.java 0f6f85a4aaffb90735acc2565e8e4afa349d3ded5781cb1dce1ebbaa237feaa7 gencode/java/udmi/schema/MappingConfig.java 2786ae25faad6bd0d9f20985e3576ffbe15c1b98c16033f7459a00df3573c44b gencode/java/udmi/schema/MappingEventEntity.java 9ba718b4f74dd3c2022ca57ca4d1527a2c69c8358f02356392bfb9a0a4e9619d gencode/java/udmi/schema/MappingEvents.java 84fc81b687d42c689b6b9794716e34bdfd06daf3ab3640a5cf47baf74c185cee gencode/java/udmi/schema/MappingState.java 73c28ed2d7b7f8ee9abdab9fcb9ac7b261fc2c4f03e37cb5122c535e31d38fdd gencode/java/udmi/schema/MessageTemplateData.java -1a8d432677de0d8803954eff42ae46d4cac7a9f1fe028332d84e66dfd3f7c60b gencode/java/udmi/schema/Metadata.java +46f885e5cc860d0f81e32fded88bcb6aefe5c514f1011df37a3be2237e46a748 gencode/java/udmi/schema/Metadata.java df64e4ddbf543ac70e7c2af9d3fbc20ffe3dff68c6718aa9ceadab7f64d3d171 gencode/java/udmi/schema/Metrics.java 14722df90406cdcd29c7c946e5fcdf6a3e513eb879a7fbb493801fc0d9093504 gencode/java/udmi/schema/Monitoring.java 31dab2c11cfcfdd346b1fe83e92a86abc652de05d85634a22a2c5c3f17c741aa gencode/java/udmi/schema/MonitoringMetric.java @@ -99,7 +99,7 @@ df64e4ddbf543ac70e7c2af9d3fbc20ffe3dff68c6718aa9ceadab7f64d3d171 gencode/java/u 6346d4ff373e01c1f2df420ae5ef970e6af2f347db82ee3574eb3ccb8b7ba648 gencode/java/udmi/schema/PointDiscovery.java 468c2c95e9dcbaf4ff706fad7f168c14321eaa35b7fb190848ea8bfd86d981d7 gencode/java/udmi/schema/PointPointsetConfig.java 0d8c1078c554b36546e6267fb356250b44b585a28b9e383df7c1b2e731289634 gencode/java/udmi/schema/PointPointsetEvents.java -65337109653a93d873dae40eb517857149bae1b20c7b479f41b35c0822d94ba0 gencode/java/udmi/schema/PointPointsetModel.java +bb5688b14a19e24dc49d65550043c7fb395a64c6aa1229d15bf227551d08e389 gencode/java/udmi/schema/PointPointsetModel.java eb4b94f5f0324e74e10efd6b8b9652e1d612531a6d77c941d7967672f99e90af gencode/java/udmi/schema/PointPointsetState.java 1ba0fbfeedddc1a4e39efdff85cf5905c91fb7a4b5ff7d87ed9359ee61f060cc gencode/java/udmi/schema/PointsetConfig.java b457b31c3e535c798287bb04129b4d7dbf34507bfe8a8ff9664bc04025650e19 gencode/java/udmi/schema/PointsetEvents.java @@ -179,8 +179,8 @@ e0f14e21c3a56768981eaf561431d52933c629c16b865df2b99585d6d6082462 gencode/python a61368a737743f63365d1ec4c49ddc84c0e9a09452c6d73d4a4cd013e4bd015f gencode/python/udmi/schema/events_system.py 8f4ec5b4d717a0c497e914a2e15c72d96bfd3bbb119fa3b1e21ac96243c195bd gencode/python/udmi/schema/events_validation.py 3707a9a5a07b7cf80e4ce6b0ca81584de74a9d5fe361214a4d3b6f22dd30cad8 gencode/python/udmi/schema/events_validation_device.py -0936dcf3fdd01ef7e7a4d9938dae46acc109e3894acdbe0f4fb700bdbae78405 gencode/python/udmi/schema/metadata.py -1c1607cd38b9c57568d3226b833c88d6c156e7a6ff5d0ddf65818667dbfac067 gencode/python/udmi/schema/model_cloud.py +63530c153724e76351bf0e85fcaa75d87b6ded24e6f131e4485e40becbab0081 gencode/python/udmi/schema/metadata.py +547e0cbdb212fec4e2daac9d5c5bcbe86f6657a2e9ad967c4354107eef691514 gencode/python/udmi/schema/model_cloud.py 2ec91522178789a3d5ec27ad8ed13a94b8619139359dc3dcad9601b9adc1582d gencode/python/udmi/schema/model_cloud_config.py 387e3f68dad9ddd6211a4e10d25c35026a4c0083b606819fdb4e338be9e135ca gencode/python/udmi/schema/model_discovery.py cead43bbefcc2d957bf8316560edf849d74df9270f9473d87c2a3bdf61f08332 gencode/python/udmi/schema/model_discovery_family.py @@ -189,8 +189,8 @@ bef91798566798ec70b2fe10ae52c909090de9095b92e2567da3cbdcec29cd2c gencode/python ae6a7bc93b520cdc90cd158f876a58e98a3e000402ebb1ca632f01ee492d408a gencode/python/udmi/schema/model_localnet.py 083afb4579592a702876e579bdc3986d85b803f6e0b3da70729ef928502ccad8 gencode/python/udmi/schema/model_localnet_family.py cd4be21b66fb3e28dff96cfd39a878791ae8543f2fe67269b66c2c360d3f2513 gencode/python/udmi/schema/model_pointset.py -1ad65c005d865b9259bfa239b2dc4cd1cde13d312ecbc7843bb61cc31d6cabde gencode/python/udmi/schema/model_pointset_point.py -94c4ab60f73d260638bb48a1397820900c069fb4e5316a6eda406cf192671d4c gencode/python/udmi/schema/model_system.py +1378f80c1b968d13d546fc7b2125df772f97573a703955e6eb55950dd621d9e7 gencode/python/udmi/schema/model_pointset_point.py +514a179ccdcb418a3e1004df49d4a42bc4b971ff16bdaadf4ad1ede6e26094f9 gencode/python/udmi/schema/model_system.py 15b349141ebae651c6c3c5c313b197d49c8b2b44e8ff1b0639848ad42e5c4e63 gencode/python/udmi/schema/model_system_hardware.py b48ae013d203eb31cc388a084c0cc6f93d4d5534336d4da2ecbccd84a085ea2b gencode/python/udmi/schema/model_testing.py 5c50847e136a033ea511209238bb570499b43fbee6189dae06603132dcb9f01f gencode/python/udmi/schema/model_testing_target.py diff --git a/.wordlist.txt b/.wordlist.txt index 25165cb153..edb8efcf61 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -19,6 +19,7 @@ buildingsiot centric CLA CLI +Clearblade CloudRun CoAP comms @@ -106,6 +107,7 @@ postfix prem Prem prepend +prepended programmatically provisioner proxied diff --git a/bin/validator b/bin/validator index 1afd3189b8..231b145de1 100755 --- a/bin/validator +++ b/bin/validator @@ -12,7 +12,7 @@ echo $(date --utc +%Y%m%d-%H%M%S) $0 $@ >> $OUT_DIR/cmd_history.log site_path=$(realpath $1) shift -if [[ -n $1 ]]; then +if [[ -n ${1:-} ]]; then project_id=$1 shift fi diff --git a/docs/tools/registrar.md b/docs/tools/registrar.md index 3940ab360a..718829d561 100644 --- a/docs/tools/registrar.md +++ b/docs/tools/registrar.md @@ -36,14 +36,35 @@ The registrar tool can be run locally to just validate the metadata, or with an `project_id` to specify a target GCP project. Additional command-line arguments can be used to specific specific device(s) to register (rather than all). -Usage: `bin/registrar site_path [project_id] [options] [devices...]` +``` +Usage: +bin/registrar site_path [project_id] [options] [devices...] + +bin/registrar config_file +``` + +* `config_file`: Path to a configuration file which contains configuration options; * `site_path`: The _directory_ containing the site model, or a model-with-project _file_ directly. -* `project_id`: The (optional) GCP project ID that contains the target registry. This information - can also be included in the specified site model. -* `options`: Various options to impact behavior. Typically `-u` for _update_ and `-d` for _delete_. +* `project_id`: The project ID that contains the target registry. The project ID can be prepended with iot_provider: + * `//clearblade/PROJECT_ID` for a public Clearblade project. + * `//gbos/PROJECT_ID` for a Google operated Clearblade project. +* `options`: Various options to impact behavior: + * `-u` Update. + * `-d` Delete all device in the site model from the registry (combine with `-x` to delete all devices from the registry) + * `-b` Block unknown devices. + * `-x` Delete unknown devices from the registry. + * `-n` Number of thread counts. * `devices`: Multiple device entries for limited registration. Can be just the device name -(`AHU-12`), or path to device (`site/devices/AHU-12`) for use with file-name glob. + (`AHU-12`), or path to device (`site/devices/AHU-12`) for use with file-name glob. + +Examples: + +``` +bin/registrar sites/UK-LON-ABC //gbos/bos-platform-testing +bin/registrar sites/UK-LON-ABC/cloud_iot_config.json +``` + Running the tool will create some output files for each device, and also a top-level `registration_summary.json` file with summary results. Detailed error reports (if any) diff --git a/gencode/docs/events.html b/gencode/docs/events.html index c0bbad2052..c90f786d8e 100644 --- a/gencode/docs/events.html +++ b/gencode/docs/events.html @@ -6172,6 +6172,64 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
@@ -7114,6 +7172,64 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
@@ -11574,6 +11690,57 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
diff --git a/gencode/docs/events_discovery.html b/gencode/docs/events_discovery.html index f25144619b..f504bd5f35 100644 --- a/gencode/docs/events_discovery.html +++ b/gencode/docs/events_discovery.html @@ -2331,6 +2331,57 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
@@ -3154,6 +3205,57 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
@@ -7103,6 +7205,50 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
diff --git a/gencode/docs/metadata.html b/gencode/docs/metadata.html index 28d9904420..e4a12531ed 100644 --- a/gencode/docs/metadata.html +++ b/gencode/docs/metadata.html @@ -233,6 +233,79 @@

+

+
+
+

+
+
+
+

+ +

+
+ +
+
+ + Type: array
+

Tags assosciated with the device

+
+ + + + + +

All items must be unique

Each item of this array must be:

+
+
+ + + Type: object
+Must match regular expression: ^[a-z0-9]+$ + + + + + + +
+

+
Examples:
+
[
+    "lighting"
+]
+
+
[
+    "energy",
+    "building"
+]
+
+
@@ -269,6 +342,50 @@

+
+
+
+

+ +

+
+ +
+
+ + Type: enum (of string)
+

Connection type for connecting to cloud

+
+

Must be one of:

+
  • "GATEWAY"
  • "DIRECT"
  • "PROXIED"
+
+ + + + + + +
+
+
+
@@ -1179,6 +1296,54 @@

"RF"
 
+
+
+

+
+
+
+
+

+ +

+
+ +
+
+ + Type: integer
+

Sequential integer representation for a floor, primiarly for comparisons when non integer floors are used, e.g. 1 and 1M

+
+ + + + + +
@@ -1544,6 +1709,61 @@

+

+
+

+
+
+
+
+

+ +

+
+ +
+
+ + Type: number
+

The altitude coordinate of the device in meters

+
+ + + + + +
@@ -3917,6 +4137,121 @@

"400070"
 
+
+

+
+
+

+
+
+
+

+ +

+
+ +
+
+ + Type: array
+

Tags assosciated with the point

+
+ + + + + +

All items must be unique

Each item of this array must be:

+
+
+ + + Type: object
+Must match regular expression: ^[a-z0-9]+$ + + + + + + +
+

+
Examples:
+
[
+    "lighting"
+]
+
+
[
+    "energy",
+    "hvac"
+]
+
diff --git a/gencode/java/udmi/schema/CloudModel.java b/gencode/java/udmi/schema/CloudModel.java index 27fdc78b8f..88f98c6cca 100644 --- a/gencode/java/udmi/schema/CloudModel.java +++ b/gencode/java/udmi/schema/CloudModel.java @@ -25,6 +25,7 @@ @JsonPropertyOrder({ "timestamp", "version", + "connection_type", "auth_type", "device_key", "resource_type", @@ -60,6 +61,13 @@ public class CloudModel { @JsonProperty("version") @JsonPropertyDescription("Version of the UDMI schema") public java.lang.String version; + /** + * Connection type for connecting to cloud + * + */ + @JsonProperty("connection_type") + @JsonPropertyDescription("Connection type for connecting to cloud") + public CloudModel.Connection_type connection_type; /** * The key type used for cloud communication. * @@ -129,6 +137,7 @@ public int hashCode() { result = ((result* 31)+((this.auth_type == null)? 0 :this.auth_type.hashCode())); result = ((result* 31)+((this.device_key == null)? 0 :this.device_key.hashCode())); result = ((result* 31)+((this.metadata == null)? 0 :this.metadata.hashCode())); + result = ((result* 31)+((this.connection_type == null)? 0 :this.connection_type.hashCode())); result = ((result* 31)+((this.last_event_time == null)? 0 :this.last_event_time.hashCode())); result = ((result* 31)+((this.last_config_time == null)? 0 :this.last_config_time.hashCode())); result = ((result* 31)+((this.credentials == null)? 0 :this.credentials.hashCode())); @@ -156,7 +165,7 @@ public boolean equals(Object other) { return false; } CloudModel rhs = ((CloudModel) other); - return ((((((((((((((((((((this.updated_time == rhs.updated_time)||((this.updated_time!= null)&&this.updated_time.equals(rhs.updated_time)))&&((this.auth_type == rhs.auth_type)||((this.auth_type!= null)&&this.auth_type.equals(rhs.auth_type))))&&((this.device_key == rhs.device_key)||((this.device_key!= null)&&this.device_key.equals(rhs.device_key))))&&((this.metadata == rhs.metadata)||((this.metadata!= null)&&this.metadata.equals(rhs.metadata))))&&((this.last_event_time == rhs.last_event_time)||((this.last_event_time!= null)&&this.last_event_time.equals(rhs.last_event_time))))&&((this.last_config_time == rhs.last_config_time)||((this.last_config_time!= null)&&this.last_config_time.equals(rhs.last_config_time))))&&((this.credentials == rhs.credentials)||((this.credentials!= null)&&this.credentials.equals(rhs.credentials))))&&((this.last_state_time == rhs.last_state_time)||((this.last_state_time!= null)&&this.last_state_time.equals(rhs.last_state_time))))&&((this.resource_type == rhs.resource_type)||((this.resource_type!= null)&&this.resource_type.equals(rhs.resource_type))))&&((this.num_id == rhs.num_id)||((this.num_id!= null)&&this.num_id.equals(rhs.num_id))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.blocked == rhs.blocked)||((this.blocked!= null)&&this.blocked.equals(rhs.blocked))))&&((this.last_error_time == rhs.last_error_time)||((this.last_error_time!= null)&&this.last_error_time.equals(rhs.last_error_time))))&&((this.detail == rhs.detail)||((this.detail!= null)&&this.detail.equals(rhs.detail))))&&((this.device_ids == rhs.device_ids)||((this.device_ids!= null)&&this.device_ids.equals(rhs.device_ids))))&&((this.config == rhs.config)||((this.config!= null)&&this.config.equals(rhs.config))))&&((this.last_config_ack == rhs.last_config_ack)||((this.last_config_ack!= null)&&this.last_config_ack.equals(rhs.last_config_ack))))&&((this.operation == rhs.operation)||((this.operation!= null)&&this.operation.equals(rhs.operation))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp)))); + return (((((((((((((((((((((this.updated_time == rhs.updated_time)||((this.updated_time!= null)&&this.updated_time.equals(rhs.updated_time)))&&((this.auth_type == rhs.auth_type)||((this.auth_type!= null)&&this.auth_type.equals(rhs.auth_type))))&&((this.device_key == rhs.device_key)||((this.device_key!= null)&&this.device_key.equals(rhs.device_key))))&&((this.metadata == rhs.metadata)||((this.metadata!= null)&&this.metadata.equals(rhs.metadata))))&&((this.connection_type == rhs.connection_type)||((this.connection_type!= null)&&this.connection_type.equals(rhs.connection_type))))&&((this.last_event_time == rhs.last_event_time)||((this.last_event_time!= null)&&this.last_event_time.equals(rhs.last_event_time))))&&((this.last_config_time == rhs.last_config_time)||((this.last_config_time!= null)&&this.last_config_time.equals(rhs.last_config_time))))&&((this.credentials == rhs.credentials)||((this.credentials!= null)&&this.credentials.equals(rhs.credentials))))&&((this.last_state_time == rhs.last_state_time)||((this.last_state_time!= null)&&this.last_state_time.equals(rhs.last_state_time))))&&((this.resource_type == rhs.resource_type)||((this.resource_type!= null)&&this.resource_type.equals(rhs.resource_type))))&&((this.num_id == rhs.num_id)||((this.num_id!= null)&&this.num_id.equals(rhs.num_id))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.blocked == rhs.blocked)||((this.blocked!= null)&&this.blocked.equals(rhs.blocked))))&&((this.last_error_time == rhs.last_error_time)||((this.last_error_time!= null)&&this.last_error_time.equals(rhs.last_error_time))))&&((this.detail == rhs.detail)||((this.detail!= null)&&this.detail.equals(rhs.detail))))&&((this.device_ids == rhs.device_ids)||((this.device_ids!= null)&&this.device_ids.equals(rhs.device_ids))))&&((this.config == rhs.config)||((this.config!= null)&&this.config.equals(rhs.config))))&&((this.last_config_ack == rhs.last_config_ack)||((this.last_config_ack!= null)&&this.last_config_ack.equals(rhs.last_config_ack))))&&((this.operation == rhs.operation)||((this.operation!= null)&&this.operation.equals(rhs.operation))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp)))); } @@ -206,6 +215,52 @@ public static CloudModel.Auth_type fromValue(java.lang.String value) { } + + /** + * Connection type for connecting to cloud + * + */ + @Generated("jsonschema2pojo") + public enum Connection_type { + + GATEWAY("GATEWAY"), + DIRECT("DIRECT"), + PROXIED("PROXIED"); + private final java.lang.String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (CloudModel.Connection_type c: values()) { + CONSTANTS.put(c.value, c); + } + } + + Connection_type(java.lang.String value) { + this.value = value; + } + + @Override + public java.lang.String toString() { + return this.value; + } + + @JsonValue + public java.lang.String value() { + return this.value; + } + + @JsonCreator + public static CloudModel.Connection_type fromValue(java.lang.String value) { + CloudModel.Connection_type constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + + } + @Generated("jsonschema2pojo") public enum Operation { diff --git a/gencode/java/udmi/schema/Coordinates.java b/gencode/java/udmi/schema/Coordinates.java index 797ff5af23..3c8bbf5a93 100644 --- a/gencode/java/udmi/schema/Coordinates.java +++ b/gencode/java/udmi/schema/Coordinates.java @@ -10,7 +10,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "lat", - "long" + "long", + "alt_m" }) @Generated("jsonschema2pojo") public class Coordinates { @@ -29,12 +30,20 @@ public class Coordinates { @JsonProperty("long") @JsonPropertyDescription("The `longitude` coordinate of the device in the WGS84 coordinate system") public Double _long; + /** + * The `altitude` coordinate of the device in meters + * + */ + @JsonProperty("alt_m") + @JsonPropertyDescription("The `altitude` coordinate of the device in meters") + public Double alt_m; @Override public int hashCode() { int result = 1; result = ((result* 31)+((this.lat == null)? 0 :this.lat.hashCode())); result = ((result* 31)+((this._long == null)? 0 :this._long.hashCode())); + result = ((result* 31)+((this.alt_m == null)? 0 :this.alt_m.hashCode())); return result; } @@ -47,7 +56,7 @@ public boolean equals(Object other) { return false; } Coordinates rhs = ((Coordinates) other); - return (((this.lat == rhs.lat)||((this.lat!= null)&&this.lat.equals(rhs.lat)))&&((this._long == rhs._long)||((this._long!= null)&&this._long.equals(rhs._long)))); + return ((((this.lat == rhs.lat)||((this.lat!= null)&&this.lat.equals(rhs.lat)))&&((this._long == rhs._long)||((this._long!= null)&&this._long.equals(rhs._long))))&&((this.alt_m == rhs.alt_m)||((this.alt_m!= null)&&this.alt_m.equals(rhs.alt_m)))); } } diff --git a/gencode/java/udmi/schema/Location.java b/gencode/java/udmi/schema/Location.java index 58d210c04c..a20a8ce23c 100644 --- a/gencode/java/udmi/schema/Location.java +++ b/gencode/java/udmi/schema/Location.java @@ -18,6 +18,7 @@ "section", "room", "floor", + "floor_seq", "position", "coordinates" }) @@ -38,6 +39,13 @@ public class Location { public String room; @JsonProperty("floor") public String floor; + /** + * Sequential integer representation for a floor, primiarly for comparisons when non integer floors are used, e.g. 1 and 1M + * + */ + @JsonProperty("floor_seq") + @JsonPropertyDescription("Sequential integer representation for a floor, primiarly for comparisons when non integer floors are used, e.g. 1 and 1M") + public Integer floor_seq; @JsonProperty("position") public Position position; @JsonProperty("coordinates") @@ -47,6 +55,7 @@ public class Location { public int hashCode() { int result = 1; result = ((result* 31)+((this.site == null)? 0 :this.site.hashCode())); + result = ((result* 31)+((this.floor_seq == null)? 0 :this.floor_seq.hashCode())); result = ((result* 31)+((this.coordinates == null)? 0 :this.coordinates.hashCode())); result = ((result* 31)+((this.section == null)? 0 :this.section.hashCode())); result = ((result* 31)+((this.position == null)? 0 :this.position.hashCode())); @@ -64,7 +73,7 @@ public boolean equals(Object other) { return false; } Location rhs = ((Location) other); - return (((((((this.site == rhs.site)||((this.site!= null)&&this.site.equals(rhs.site)))&&((this.coordinates == rhs.coordinates)||((this.coordinates!= null)&&this.coordinates.equals(rhs.coordinates))))&&((this.section == rhs.section)||((this.section!= null)&&this.section.equals(rhs.section))))&&((this.position == rhs.position)||((this.position!= null)&&this.position.equals(rhs.position))))&&((this.floor == rhs.floor)||((this.floor!= null)&&this.floor.equals(rhs.floor))))&&((this.room == rhs.room)||((this.room!= null)&&this.room.equals(rhs.room)))); + return ((((((((this.site == rhs.site)||((this.site!= null)&&this.site.equals(rhs.site)))&&((this.floor_seq == rhs.floor_seq)||((this.floor_seq!= null)&&this.floor_seq.equals(rhs.floor_seq))))&&((this.coordinates == rhs.coordinates)||((this.coordinates!= null)&&this.coordinates.equals(rhs.coordinates))))&&((this.section == rhs.section)||((this.section!= null)&&this.section.equals(rhs.section))))&&((this.position == rhs.position)||((this.position!= null)&&this.position.equals(rhs.position))))&&((this.floor == rhs.floor)||((this.floor!= null)&&this.floor.equals(rhs.floor))))&&((this.room == rhs.room)||((this.room!= null)&&this.room.equals(rhs.room)))); } } diff --git a/gencode/java/udmi/schema/Metadata.java b/gencode/java/udmi/schema/Metadata.java index e6c5e69282..74f521bad0 100644 --- a/gencode/java/udmi/schema/Metadata.java +++ b/gencode/java/udmi/schema/Metadata.java @@ -2,12 +2,15 @@ package udmi.schema; import java.util.Date; +import java.util.LinkedHashSet; import java.util.Map; +import java.util.Set; import javax.annotation.processing.Generated; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; /** @@ -24,6 +27,7 @@ "description", "hash", "device_version", + "tags", "cloud", "system", "gateway", @@ -80,6 +84,14 @@ public class Metadata { @JsonProperty("device_version") @JsonPropertyDescription("Version of schema supported by the device") public java.lang.String device_version; + /** + * Tags assosciated with the device + * + */ + @JsonProperty("tags") + @JsonDeserialize(as = java.util.LinkedHashSet.class) + @JsonPropertyDescription("Tags assosciated with the device") + public Set tags = new LinkedHashSet(); /** * Cloud Model *

@@ -161,6 +173,7 @@ public int hashCode() { result = ((result* 31)+((this.testing == null)? 0 :this.testing.hashCode())); result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); + result = ((result* 31)+((this.tags == null)? 0 :this.tags.hashCode())); result = ((result* 31)+((this.cloud == null)? 0 :this.cloud.hashCode())); result = ((result* 31)+((this.features == null)? 0 :this.features.hashCode())); result = ((result* 31)+((this.system == null)? 0 :this.system.hashCode())); @@ -183,7 +196,7 @@ public boolean equals(Object other) { return false; } Metadata rhs = ((Metadata) other); - return (((((((((((((((this.device_version == rhs.device_version)||((this.device_version!= null)&&this.device_version.equals(rhs.device_version)))&&((this.testing == rhs.testing)||((this.testing!= null)&&this.testing.equals(rhs.testing))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.cloud == rhs.cloud)||((this.cloud!= null)&&this.cloud.equals(rhs.cloud))))&&((this.features == rhs.features)||((this.features!= null)&&this.features.equals(rhs.features))))&&((this.system == rhs.system)||((this.system!= null)&&this.system.equals(rhs.system))))&&((this.discovery == rhs.discovery)||((this.discovery!= null)&&this.discovery.equals(rhs.discovery))))&&((this.upgraded_from == rhs.upgraded_from)||((this.upgraded_from!= null)&&this.upgraded_from.equals(rhs.upgraded_from))))&&((this.pointset == rhs.pointset)||((this.pointset!= null)&&this.pointset.equals(rhs.pointset))))&&((this.hash == rhs.hash)||((this.hash!= null)&&this.hash.equals(rhs.hash))))&&((this.gateway == rhs.gateway)||((this.gateway!= null)&&this.gateway.equals(rhs.gateway))))&&((this.localnet == rhs.localnet)||((this.localnet!= null)&&this.localnet.equals(rhs.localnet))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp)))); + return ((((((((((((((((this.device_version == rhs.device_version)||((this.device_version!= null)&&this.device_version.equals(rhs.device_version)))&&((this.testing == rhs.testing)||((this.testing!= null)&&this.testing.equals(rhs.testing))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.tags == rhs.tags)||((this.tags!= null)&&this.tags.equals(rhs.tags))))&&((this.cloud == rhs.cloud)||((this.cloud!= null)&&this.cloud.equals(rhs.cloud))))&&((this.features == rhs.features)||((this.features!= null)&&this.features.equals(rhs.features))))&&((this.system == rhs.system)||((this.system!= null)&&this.system.equals(rhs.system))))&&((this.discovery == rhs.discovery)||((this.discovery!= null)&&this.discovery.equals(rhs.discovery))))&&((this.upgraded_from == rhs.upgraded_from)||((this.upgraded_from!= null)&&this.upgraded_from.equals(rhs.upgraded_from))))&&((this.pointset == rhs.pointset)||((this.pointset!= null)&&this.pointset.equals(rhs.pointset))))&&((this.hash == rhs.hash)||((this.hash!= null)&&this.hash.equals(rhs.hash))))&&((this.gateway == rhs.gateway)||((this.gateway!= null)&&this.gateway.equals(rhs.gateway))))&&((this.localnet == rhs.localnet)||((this.localnet!= null)&&this.localnet.equals(rhs.localnet))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp)))); } } diff --git a/gencode/java/udmi/schema/PointPointsetModel.java b/gencode/java/udmi/schema/PointPointsetModel.java index 9d1a6b9fc8..0bcf342b56 100644 --- a/gencode/java/udmi/schema/PointPointsetModel.java +++ b/gencode/java/udmi/schema/PointPointsetModel.java @@ -2,7 +2,9 @@ package udmi.schema; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.Map; +import java.util.Set; import javax.annotation.processing.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -10,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; /** @@ -26,7 +29,8 @@ "baseline_tolerance", "baseline_state", "cov_increment", - "ref" + "ref", + "tags" }) @Generated("jsonschema2pojo") public class PointPointsetModel { @@ -80,6 +84,14 @@ public class PointPointsetModel { @JsonProperty("ref") @JsonPropertyDescription("Mapping for the point to an internal resource (e.g. BACnet object reference)") public String ref; + /** + * Tags assosciated with the point + * + */ + @JsonProperty("tags") + @JsonDeserialize(as = java.util.LinkedHashSet.class) + @JsonPropertyDescription("Tags assosciated with the point") + public Set tags = new LinkedHashSet(); @Override public int hashCode() { @@ -91,6 +103,7 @@ public int hashCode() { result = ((result* 31)+((this.baseline_tolerance == null)? 0 :this.baseline_tolerance.hashCode())); result = ((result* 31)+((this.cov_increment == null)? 0 :this.cov_increment.hashCode())); result = ((result* 31)+((this.writable == null)? 0 :this.writable.hashCode())); + result = ((result* 31)+((this.tags == null)? 0 :this.tags.hashCode())); return result; } @@ -103,7 +116,7 @@ public boolean equals(Object other) { return false; } PointPointsetModel rhs = ((PointPointsetModel) other); - return ((((((((this.ref == rhs.ref)||((this.ref!= null)&&this.ref.equals(rhs.ref)))&&((this.baseline_value == rhs.baseline_value)||((this.baseline_value!= null)&&this.baseline_value.equals(rhs.baseline_value))))&&((this.baseline_state == rhs.baseline_state)||((this.baseline_state!= null)&&this.baseline_state.equals(rhs.baseline_state))))&&((this.units == rhs.units)||((this.units!= null)&&this.units.equals(rhs.units))))&&((this.baseline_tolerance == rhs.baseline_tolerance)||((this.baseline_tolerance!= null)&&this.baseline_tolerance.equals(rhs.baseline_tolerance))))&&((this.cov_increment == rhs.cov_increment)||((this.cov_increment!= null)&&this.cov_increment.equals(rhs.cov_increment))))&&((this.writable == rhs.writable)||((this.writable!= null)&&this.writable.equals(rhs.writable)))); + return (((((((((this.ref == rhs.ref)||((this.ref!= null)&&this.ref.equals(rhs.ref)))&&((this.baseline_value == rhs.baseline_value)||((this.baseline_value!= null)&&this.baseline_value.equals(rhs.baseline_value))))&&((this.baseline_state == rhs.baseline_state)||((this.baseline_state!= null)&&this.baseline_state.equals(rhs.baseline_state))))&&((this.units == rhs.units)||((this.units!= null)&&this.units.equals(rhs.units))))&&((this.baseline_tolerance == rhs.baseline_tolerance)||((this.baseline_tolerance!= null)&&this.baseline_tolerance.equals(rhs.baseline_tolerance))))&&((this.cov_increment == rhs.cov_increment)||((this.cov_increment!= null)&&this.cov_increment.equals(rhs.cov_increment))))&&((this.writable == rhs.writable)||((this.writable!= null)&&this.writable.equals(rhs.writable))))&&((this.tags == rhs.tags)||((this.tags!= null)&&this.tags.equals(rhs.tags)))); } diff --git a/gencode/python/udmi/schema/metadata.py b/gencode/python/udmi/schema/metadata.py index e4939b08d3..78655d0e1f 100644 --- a/gencode/python/udmi/schema/metadata.py +++ b/gencode/python/udmi/schema/metadata.py @@ -19,6 +19,7 @@ def __init__(self): self.description = None self.hash = None self.device_version = None + self.tags = None self.cloud = None self.system = None self.gateway = None @@ -39,6 +40,7 @@ def from_dict(source): result.description = source.get('description') result.hash = source.get('hash') result.device_version = source.get('device_version') + result.tags = source.get('tags') result.cloud = CloudModel.from_dict(source.get('cloud')) result.system = SystemModel.from_dict(source.get('system')) result.gateway = GatewayModel.from_dict(source.get('gateway')) @@ -79,6 +81,8 @@ def to_dict(self): result['hash'] = self.hash # 5 if self.device_version: result['device_version'] = self.device_version # 5 + if self.tags: + result['tags'] = self.tags # 1 if self.cloud: result['cloud'] = self.cloud.to_dict() # 4 if self.system: diff --git a/gencode/python/udmi/schema/model_cloud.py b/gencode/python/udmi/schema/model_cloud.py index ecaeaabf32..84d8c7c92b 100644 --- a/gencode/python/udmi/schema/model_cloud.py +++ b/gencode/python/udmi/schema/model_cloud.py @@ -42,6 +42,7 @@ class CloudModel: def __init__(self): self.timestamp = None self.version = None + self.connection_type = None self.auth_type = None self.device_key = None self.resource_type = None @@ -67,6 +68,7 @@ def from_dict(source): result = CloudModel() result.timestamp = source.get('timestamp') result.version = source.get('version') + result.connection_type = source.get('connection_type') result.auth_type = source.get('auth_type') result.device_key = source.get('device_key') result.resource_type = source.get('resource_type') @@ -108,6 +110,8 @@ def to_dict(self): result['timestamp'] = self.timestamp # 5 if self.version: result['version'] = self.version # 5 + if self.connection_type: + result['connection_type'] = self.connection_type # 5 if self.auth_type: result['auth_type'] = self.auth_type # 5 if self.device_key: diff --git a/gencode/python/udmi/schema/model_pointset_point.py b/gencode/python/udmi/schema/model_pointset_point.py index 1c3eb4f292..361326494d 100644 --- a/gencode/python/udmi/schema/model_pointset_point.py +++ b/gencode/python/udmi/schema/model_pointset_point.py @@ -12,6 +12,7 @@ def __init__(self): self.baseline_state = None self.cov_increment = None self.ref = None + self.tags = None @staticmethod def from_dict(source): @@ -25,6 +26,7 @@ def from_dict(source): result.baseline_state = source.get('baseline_state') result.cov_increment = source.get('cov_increment') result.ref = source.get('ref') + result.tags = source.get('tags') return result @staticmethod @@ -59,4 +61,6 @@ def to_dict(self): result['cov_increment'] = self.cov_increment # 5 if self.ref: result['ref'] = self.ref # 5 + if self.tags: + result['tags'] = self.tags # 1 return result diff --git a/gencode/python/udmi/schema/model_system.py b/gencode/python/udmi/schema/model_system.py index 9ece9a57e6..913e37dd1a 100644 --- a/gencode/python/udmi/schema/model_system.py +++ b/gencode/python/udmi/schema/model_system.py @@ -46,20 +46,22 @@ def to_dict(self): return result -class Object5437D086: +class Object88B5177A: """Generated schema class""" def __init__(self): self.lat = None self.long = None + self.alt_m = None @staticmethod def from_dict(source): if not source: return None - result = Object5437D086() + result = Object88B5177A() result.lat = source.get('lat') result.long = source.get('long') + result.alt_m = source.get('alt_m') return result @staticmethod @@ -68,7 +70,7 @@ def map_from(source): return None result = {} for key in source: - result[key] = Object5437D086.from_dict(source[key]) + result[key] = Object88B5177A.from_dict(source[key]) return result @staticmethod @@ -84,10 +86,12 @@ def to_dict(self): result['lat'] = self.lat # 5 if self.long: result['long'] = self.long # 5 + if self.alt_m: + result['alt_m'] = self.alt_m # 5 return result -class Object0756F417: +class Object2CA76C23: """Generated schema class""" def __init__(self): @@ -95,6 +99,7 @@ def __init__(self): self.section = None self.room = None self.floor = None + self.floor_seq = None self.position = None self.coordinates = None @@ -102,13 +107,14 @@ def __init__(self): def from_dict(source): if not source: return None - result = Object437AAED6() + result = ObjectC15AACEE() result.site = source.get('site') result.section = source.get('section') result.room = source.get('room') result.floor = source.get('floor') + result.floor_seq = source.get('floor_seq') result.position = Object11D8FD30.from_dict(source.get('position')) - result.coordinates = Object5437D086.from_dict(source.get('coordinates')) + result.coordinates = Object88B5177A.from_dict(source.get('coordinates')) return result @staticmethod @@ -117,7 +123,7 @@ def map_from(source): return None result = {} for key in source: - result[key] = Object437AAED6.from_dict(source[key]) + result[key] = ObjectC15AACEE.from_dict(source[key]) return result @staticmethod @@ -137,6 +143,8 @@ def to_dict(self): result['room'] = self.room # 5 if self.floor: result['floor'] = self.floor # 5 + if self.floor_seq: + result['floor_seq'] = self.floor_seq # 5 if self.position: result['position'] = self.position.to_dict() # 4 if self.coordinates: @@ -280,7 +288,7 @@ def from_dict(source): if not source: return None result = SystemModel() - result.location = Object437AAED6.from_dict(source.get('location')) + result.location = ObjectC15AACEE.from_dict(source.get('location')) result.hardware = SystemHardware.from_dict(source.get('hardware')) result.software = source.get('software') result.physical_tag = Object30AFA53A.from_dict(source.get('physical_tag')) diff --git a/schema/metadata.json b/schema/metadata.json index 4295e8ffb3..a79577a2ff 100644 --- a/schema/metadata.json +++ b/schema/metadata.json @@ -39,6 +39,15 @@ "description": "Version of schema supported by the device", "type": "string" }, + "tags":{ + "description": "Tags assosciated with the device", + "type": "array", + "uniqueItems": true, + "items": { + "pattern": "^[a-z0-9]+$" + }, + "examples": [["lighting"], ["energy", "building"]] + }, "cloud": { "$ref": "file:model_cloud.json#" }, diff --git a/schema/model_cloud.json b/schema/model_cloud.json index b4e9dc27d8..9fca6ec567 100644 --- a/schema/model_cloud.json +++ b/schema/model_cloud.json @@ -16,6 +16,14 @@ "description": "Version of the UDMI schema", "type": "string" }, + "connection_type": { + "description": "Connection type for connecting to cloud", + "enum": [ + "GATEWAY", + "DIRECT", + "PROXIED" + ] + }, "auth_type": { "description": "The key type used for cloud communication.", "enum": [ diff --git a/schema/model_pointset_point.json b/schema/model_pointset_point.json index dee7450bd3..90fbbf767d 100644 --- a/schema/model_pointset_point.json +++ b/schema/model_pointset_point.json @@ -42,6 +42,15 @@ "description": "Mapping for the point to an internal resource (e.g. BACnet object reference)", "type": "string", "examples": ["AI3", "400070"] + }, + "tags":{ + "description": "Tags assosciated with the point", + "type": "array", + "uniqueItems": true, + "items": { + "pattern": "^[a-z0-9]+$" + }, + "examples": [["lighting"], ["energy", "hvac"]] } } } diff --git a/schema/model_system.json b/schema/model_system.json index 9cd84c7de4..fb54f33277 100644 --- a/schema/model_system.json +++ b/schema/model_system.json @@ -30,6 +30,10 @@ "pattern": "^[A-Z0-9-]+$", "examples": ["1", "1A", "G", "B1M", "RF"] }, + "floor_seq": { + "type": "integer", + "description": "Sequential integer representation for a floor, primiarly for comparisons when non integer floors are used, e.g. 1 and 1M" + }, "position": { "type": "object", "additionalProperties": false, @@ -59,6 +63,10 @@ "long": { "description": "The `longitude` coordinate of the device in the WGS84 coordinate system", "type": "number" + }, + "alt_m": { + "description": "The `altitude` coordinate of the device in meters", + "type": "number" } } } diff --git a/tests/schemas/metadata/example.json b/tests/schemas/metadata/example.json index 3cb704645f..c295478803 100644 --- a/tests/schemas/metadata/example.json +++ b/tests/schemas/metadata/example.json @@ -2,11 +2,13 @@ "version": "1.5.0", "timestamp": "2018-08-26T21:39:29.364Z", "description": "Generic test example metadata file", + "tags": ["energy", "lighting", "building"], "system": { "location": { "site": "US-SFO-XYY", "section": "NW-2F", "floor": "2", + "floor_seq": 2, "room": "2F26", "position": { "x": 10, @@ -15,7 +17,8 @@ }, "coordinates": { "lat": 37.386051, - "long": -122.083855 + "long": -122.083855, + "alt_m": 8849.0 } }, "physical_tag": { @@ -30,14 +33,16 @@ } }, "cloud": { - "auth_type": "ES256" + "auth_type": "ES256", + "connection_type": "DIRECT" }, "pointset": { "points": { "return_air_temperature_sensor": { "units": "Degrees-Celsius", "baseline_value": 20, - "baseline_tolerance": 2 + "baseline_tolerance": 2, + "tags": ["hvac"] }, "room_setpoint": { "writable": true, diff --git a/tests/sites/configs/devices/AHU-1/expected/metadata_norm.json b/tests/sites/configs/devices/AHU-1/expected/metadata_norm.json index 32dc93aa68..c0f0365a62 100644 --- a/tests/sites/configs/devices/AHU-1/expected/metadata_norm.json +++ b/tests/sites/configs/devices/AHU-1/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "3a9c06e5", + "hash": "a6ac2151", + "tags": [ ], "cloud": { "auth_type": "RS256", "config": { @@ -61,18 +62,21 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "BV11.present_value" + "ref": "BV11.present_value", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", "baseline_value": 10, "baseline_tolerance": 2.0, - "ref": "FAXLE12.present_value" + "ref": "FAXLE12.present_value", + "tags": [ ] }, "filter_differential_pressure_setpoint": { "units": "Bars", "writable": true, - "baseline_value": 98 + "baseline_value": 98, + "tags": [ ] } } } diff --git a/tests/sites/configs/devices/AHU-22/expected/metadata_norm.json b/tests/sites/configs/devices/AHU-22/expected/metadata_norm.json index 8c126136d8..2e16bee363 100644 --- a/tests/sites/configs/devices/AHU-22/expected/metadata_norm.json +++ b/tests/sites/configs/devices/AHU-22/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "922046ba", + "hash": "a7430a84", + "tags": [ ], "system": { "location": { "section": "2-3N8C", @@ -36,15 +37,18 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "MCN8.present_value" + "ref": "MCN8.present_value", + "tags": [ ] }, "filter_differential_pressure": { "units": "Bars", - "ref": "AI2.differential" + "ref": "AI2.differential", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", - "ref": "AI1.present_value" + "ref": "AI1.present_value", + "tags": [ ] } } } diff --git a/tests/sites/configs/devices/GAT-123/expected/metadata_norm.json b/tests/sites/configs/devices/GAT-123/expected/metadata_norm.json index 49d5ecdb85..59a2c29c2c 100644 --- a/tests/sites/configs/devices/GAT-123/expected/metadata_norm.json +++ b/tests/sites/configs/devices/GAT-123/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "62d465d3", + "hash": "8a90e8f4", + "tags": [ ], "cloud": { "auth_type": "ES256", "config": { diff --git a/tests/sites/configs/devices/GAT-456/expected/metadata_norm.json b/tests/sites/configs/devices/GAT-456/expected/metadata_norm.json index f6a14c8239..7b5a9c8f17 100644 --- a/tests/sites/configs/devices/GAT-456/expected/metadata_norm.json +++ b/tests/sites/configs/devices/GAT-456/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "8d930d66", + "hash": "80440d25", + "tags": [ ], "cloud": { "auth_type": "ES256", "config": { diff --git a/tests/sites/discovery/devices/GAT-123/expected/metadata_norm.json b/tests/sites/discovery/devices/GAT-123/expected/metadata_norm.json index 0a3f5163a7..7eb29415dd 100644 --- a/tests/sites/discovery/devices/GAT-123/expected/metadata_norm.json +++ b/tests/sites/discovery/devices/GAT-123/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "004dae42", + "hash": "92bd1560", + "tags": [ ], "cloud": { "auth_type": "ES256" }, @@ -23,7 +24,8 @@ "pointset": { "points": { "globulating_globar": { - "units": "Bars" + "units": "Bars", + "tags": [ ] } } } diff --git a/tests/sites/downgrade/devices/CGW-12/expected/metadata_norm.json b/tests/sites/downgrade/devices/CGW-12/expected/metadata_norm.json index 91a4756300..aa84c5a1d6 100644 --- a/tests/sites/downgrade/devices/CGW-12/expected/metadata_norm.json +++ b/tests/sites/downgrade/devices/CGW-12/expected/metadata_norm.json @@ -2,7 +2,8 @@ "timestamp": "2018-08-26T21:39:29Z", "version": "1.4.1", "upgraded_from": "1.3.14", - "hash": "e5804319", + "hash": "d7db447c", + "tags": [ ], "cloud": { "auth_type": "RS256" }, @@ -39,40 +40,52 @@ "pointset": { "points": { "chiller_fault_status": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "chiller_run_status": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_primary_return_temperature_sensor": { - "units": "degrees-celcius" + "units": "degrees-celcius", + "tags": [ ] }, "cooling_water_primary_supply_temperature_sensor": { - "units": "degrees-celcius" + "units": "degrees-celcius", + "tags": [ ] }, "cooling_water_secondary_pump_differential_pressure_status": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_secondary_pump_fault_status_1": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_secondary_pump_fault_status_2": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_secondary_pump_run_command_1": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_secondary_pump_run_command_2": { - "units": "no_units" + "units": "no_units", + "tags": [ ] }, "cooling_water_secondary_return_temperature_sensor": { - "units": "degrees-celcius" + "units": "degrees-celcius", + "tags": [ ] }, "cooling_water_secondary_supply_temperature_sensor": { - "units": "degrees-celcius" + "units": "degrees-celcius", + "tags": [ ] }, "cooling_water_system_pressurization_unit_status": { - "units": "no_units" + "units": "no_units", + "tags": [ ] } } } diff --git a/tests/sites/downgrade/devices/DDC-54/expected/metadata_norm.json b/tests/sites/downgrade/devices/DDC-54/expected/metadata_norm.json index bcc1dd11bb..f7313b3a96 100644 --- a/tests/sites/downgrade/devices/DDC-54/expected/metadata_norm.json +++ b/tests/sites/downgrade/devices/DDC-54/expected/metadata_norm.json @@ -2,7 +2,8 @@ "timestamp": "2018-08-26T21:39:29Z", "version": "1.4.1", "upgraded_from": "1.3.13", - "hash": "a767b6cb", + "hash": "d09198e4", + "tags": [ ], "cloud": { "auth_type": "RS256" }, diff --git a/tests/sites/downgrade/devices/DWN-1/expected/metadata_norm.json b/tests/sites/downgrade/devices/DWN-1/expected/metadata_norm.json index 5214e6bde6..d9c005ca48 100644 --- a/tests/sites/downgrade/devices/DWN-1/expected/metadata_norm.json +++ b/tests/sites/downgrade/devices/DWN-1/expected/metadata_norm.json @@ -2,7 +2,8 @@ "timestamp": "2020-05-01T13:39:07Z", "version": "1.4.1", "upgraded_from": "1", - "hash": "63cc9801", + "hash": "5552d167", + "tags": [ ], "cloud": { "auth_type": "RS256" }, @@ -40,14 +41,17 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "BV11.present_value" + "ref": "BV11.present_value", + "tags": [ ] }, "filter_differential_pressure": { - "units": "Bars" + "units": "Bars", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", - "ref": "AV12.present_value" + "ref": "AV12.present_value", + "tags": [ ] } } } diff --git a/tests/sites/downgrade/devices/DWN-2/expected/errors.map b/tests/sites/downgrade/devices/DWN-2/expected/errors.map index ae2ed8e66d..df90fc2833 100644 --- a/tests/sites/downgrade/devices/DWN-2/expected/errors.map +++ b/tests/sites/downgrade/devices/DWN-2/expected/errors.map @@ -2,4 +2,4 @@ Exceptions for DWN-2 While loading device metadata for DWN-2 While converting strict to udmi.schema.Metadata While converting string/string to udmi.schema.Metadata - Unrecognized field "grumpy" (class udmi.schema.Metadata), not marked as ignorable (14 known properties: "upgraded_from", "gateway", "hash", "device_version", "discovery", "localnet", "cloud", "timestamp", "version", "description", "features", "system", "testing", "pointset"]) at [Source: (String)"{ "cloud" : { "auth_type" : "RS256" }, "grumpy" : { "reason" : "This is an intentional schema violation to test the tools" }, "hash" : "da852d15", "localnet" : { "families" : { "vendor" : { "addr" : "0x65" } } }, "pointset" : { "exclude_units_from_config" : true, "points" : { "filter_alarm_pressure_status" : { "ref" : "BV11.present_value", "units" : "No-units" }, "filter_differential_pressure" : { "[truncated 693 chars]; line: 5, column: 15] (through reference chain: udmi.schema.Metadata["grumpy"]) + Unrecognized field "grumpy" (class udmi.schema.Metadata), not marked as ignorable (15 known properties: "upgraded_from", "gateway", "hash", "device_version", "discovery", "localnet", "cloud", "timestamp", "version", "tags", "description", "features", "system", "testing", "pointset"]) at [Source: (String)"{ "cloud" : { "auth_type" : "RS256" }, "grumpy" : { "reason" : "This is an intentional schema violation to test the tools" }, "hash" : "da852d15", "localnet" : { "families" : { "vendor" : { "addr" : "0x65" } } }, "pointset" : { "exclude_units_from_config" : true, "points" : { "filter_alarm_pressure_status" : { "ref" : "BV11.present_value", "units" : "No-units" }, "filter_differential_pressure" : { "[truncated 709 chars]; line: 5, column: 15] (through reference chain: udmi.schema.Metadata["grumpy"]) diff --git a/tests/sites/downgrade/devices/DWN-3/expected/metadata_norm.json b/tests/sites/downgrade/devices/DWN-3/expected/metadata_norm.json index 1385a0c73d..d5d7357e3d 100644 --- a/tests/sites/downgrade/devices/DWN-3/expected/metadata_norm.json +++ b/tests/sites/downgrade/devices/DWN-3/expected/metadata_norm.json @@ -2,7 +2,8 @@ "timestamp": "2020-05-01T13:39:07Z", "version": "1.4.1", "upgraded_from": "1", - "hash": "82199b21", + "hash": "e6633afb", + "tags": [ ], "cloud": { "auth_type": "RS256" }, @@ -40,14 +41,17 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "BV11.present_value" + "ref": "BV11.present_value", + "tags": [ ] }, "filter_differential_pressure": { - "units": "Bars" + "units": "Bars", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", - "ref": "AV12.present_value" + "ref": "AV12.present_value", + "tags": [ ] } }, "exclude_units_from_config": true diff --git a/tests/sites/downgrade/devices/DWN-4/expected/errors.map b/tests/sites/downgrade/devices/DWN-4/expected/errors.map index d1adf11af6..a80d58cc9c 100644 --- a/tests/sites/downgrade/devices/DWN-4/expected/errors.map +++ b/tests/sites/downgrade/devices/DWN-4/expected/errors.map @@ -2,4 +2,4 @@ Exceptions for DWN-4 While loading device metadata for DWN-4 While converting strict to udmi.schema.Metadata While converting string/string to udmi.schema.Metadata - Unrecognized field "subsystem" (class udmi.schema.LocalnetModel), not marked as ignorable (one known property: "families"]) at [Source: (String)"{ "cloud" : { "auth_type" : "RS256" }, "hash" : "da852d15", "localnet" : { "subsystem" : { "vendor" : { "id" : "0x65" } } }, "pointset" : { "exclude_units_from_config" : true, "points" : { "filter_alarm_pressure_status" : { "ref" : "BV11.present_value", "units" : "No-units" }, "filter_differential_pressure" : { "units" : "Bars" }, "filter_differential_pressure_sensor" : { "ref" : "AV"[truncated 497 chars]; line: 7, column: 20] (through reference chain: udmi.schema.Metadata["localnet"]->udmi.schema.LocalnetModel["subsystem"]) + Unrecognized field "subsystem" (class udmi.schema.LocalnetModel), not marked as ignorable (one known property: "families"]) at [Source: (String)"{ "cloud" : { "auth_type" : "RS256" }, "hash" : "da852d15", "localnet" : { "subsystem" : { "vendor" : { "id" : "0x65" } } }, "pointset" : { "exclude_units_from_config" : true, "points" : { "filter_alarm_pressure_status" : { "ref" : "BV11.present_value", "units" : "No-units" }, "filter_differential_pressure" : { "units" : "Bars" }, "filter_differential_pressure_sensor" : { "ref" : "AV"[truncated 513 chars]; line: 7, column: 20] (through reference chain: udmi.schema.Metadata["localnet"]->udmi.schema.LocalnetModel["subsystem"]) diff --git a/tests/sites/downgrade/devices/SF-28/expected/metadata_norm.json b/tests/sites/downgrade/devices/SF-28/expected/metadata_norm.json index 63f2549b6a..73a974695d 100644 --- a/tests/sites/downgrade/devices/SF-28/expected/metadata_norm.json +++ b/tests/sites/downgrade/devices/SF-28/expected/metadata_norm.json @@ -2,7 +2,8 @@ "timestamp": "2021-02-25T09:56:39Z", "version": "1.4.1", "upgraded_from": "1.3.14", - "hash": "564e1138", + "hash": "46cb2491", + "tags": [ ], "system": { "location": { "site": "US-SFO-XYY", @@ -38,51 +39,63 @@ "points": { "discharge_air_temperature_sensor": { "units": "degrees-celcius", - "ref": "AI1104.Present_Value" + "ref": "AI1104.Present_Value", + "tags": [ ] }, "discharge_fan_fault_status": { "units": "No-units", - "ref": "BI1103.Present_Value" + "ref": "BI1103.Present_Value", + "tags": [ ] }, "discharge_fan_percentage_speed_command": { "units": "percent", - "ref": "AO1101.Present_Value" + "ref": "AO1101.Present_Value", + "tags": [ ] }, "discharge_fan_percentage_speed_setpoint": { "units": "percent", - "ref": "AV101.Present_Value" + "ref": "AV101.Present_Value", + "tags": [ ] }, "discharge_fan_run_status": { "units": "No-units", - "ref": "BI1102.Present_Value" + "ref": "BI1102.Present_Value", + "tags": [ ] }, "discharge_fan_static_pressure_status": { "units": "No-units", - "ref": "BI1105.Present_Value" + "ref": "BI1105.Present_Value", + "tags": [ ] }, "fire_alarm_status": { "units": "No-units", - "ref": "BV1001.Present_Value" + "ref": "BV1001.Present_Value", + "tags": [ ] }, "zone_air_co2_concentration_sensor": { "units": "parts_per_million", - "ref": "AI101004.Present_Value" + "ref": "AI101004.Present_Value", + "tags": [ ] }, "zone_air_co2_concentration_setpoint": { "units": "parts_per_million", - "ref": "AV2.Present_Value" + "ref": "AV2.Present_Value", + "tags": [ ] }, "zone_air_temperature_sensor": { "units": "degrees-celcius", - "ref": "AI101001.Present_Value" + "ref": "AI101001.Present_Value", + "tags": [ ] }, "zone_air_temperature_setpoint": { "units": "degrees-celcius", - "ref": "AV101022.Present_Value" + "ref": "AV101022.Present_Value", + "tags": [ ] }, "zone_occupancy_status": { "units": "No-units", - "ref": "BV1003.Present_Value" + "ref": "BV1003.Present_Value", + "tags": [ ] } } } diff --git a/tests/sites/mapping/devices/GAT-123/expected/metadata_norm.json b/tests/sites/mapping/devices/GAT-123/expected/metadata_norm.json index 7124de9d5f..9701ee54f6 100644 --- a/tests/sites/mapping/devices/GAT-123/expected/metadata_norm.json +++ b/tests/sites/mapping/devices/GAT-123/expected/metadata_norm.json @@ -1,4 +1,5 @@ { "timestamp": "2024-04-02T17:30:04Z", - "hash": "0001d237" + "hash": "850d754e", + "tags": [ ] } \ No newline at end of file diff --git a/tests/sites/missing/devices/AHU-1/expected/metadata_norm.json b/tests/sites/missing/devices/AHU-1/expected/metadata_norm.json index ce84ac4f46..dcdd25c797 100644 --- a/tests/sites/missing/devices/AHU-1/expected/metadata_norm.json +++ b/tests/sites/missing/devices/AHU-1/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "3d7ff041", + "hash": "7d7623d7", + "tags": [ ], "cloud": { "auth_type": "RS256", "detail": "site default for unit tests" @@ -59,18 +60,21 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "BV11.present_value" + "ref": "BV11.present_value", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", "baseline_value": 10, "baseline_tolerance": 2.0, - "ref": "FAXLE12.present_value" + "ref": "FAXLE12.present_value", + "tags": [ ] }, "filter_differential_pressure_setpoint": { "units": "Bars", "writable": true, - "baseline_value": 98 + "baseline_value": 98, + "tags": [ ] } } } diff --git a/tests/sites/missing/devices/AHU-22/expected/metadata_norm.json b/tests/sites/missing/devices/AHU-22/expected/metadata_norm.json index ac17b4a19b..41e33860ff 100644 --- a/tests/sites/missing/devices/AHU-22/expected/metadata_norm.json +++ b/tests/sites/missing/devices/AHU-22/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "fb7395cf", + "hash": "b5ab954f", + "tags": [ ], "cloud": { "detail": "site default for unit tests" }, @@ -40,15 +41,18 @@ "points": { "filter_alarm_pressure_status": { "units": "No-units", - "ref": "MCN8.present_value" + "ref": "MCN8.present_value", + "tags": [ ] }, "filter_differential_pressure": { "units": "Bars", - "ref": "AI2.differential" + "ref": "AI2.differential", + "tags": [ ] }, "filter_differential_pressure_sensor": { "units": "Degrees-Celsius", - "ref": "FAXLE12.present_value" + "ref": "FAXLE12.present_value", + "tags": [ ] } } } diff --git a/tests/sites/missing/devices/GAT-123/expected/metadata_norm.json b/tests/sites/missing/devices/GAT-123/expected/metadata_norm.json index 90cb936005..f50e8015cb 100644 --- a/tests/sites/missing/devices/GAT-123/expected/metadata_norm.json +++ b/tests/sites/missing/devices/GAT-123/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "0a53924a", + "hash": "cf9b9549", + "tags": [ ], "cloud": { "auth_type": "ES256", "detail": "site default for unit tests" diff --git a/tests/sites/missing/devices/SNS-4/expected/metadata_norm.json b/tests/sites/missing/devices/SNS-4/expected/metadata_norm.json index 68acb64a08..57cb9c23e2 100644 --- a/tests/sites/missing/devices/SNS-4/expected/metadata_norm.json +++ b/tests/sites/missing/devices/SNS-4/expected/metadata_norm.json @@ -1,7 +1,8 @@ { "timestamp": "2020-05-01T13:39:07Z", "version": "1.5.0", - "hash": "6746d2c8", + "hash": "3f4ee3b5", + "tags": [ ], "cloud": { "detail": "site default for unit tests" }, @@ -36,11 +37,13 @@ "points": { "split_threshold": { "units": "Imperial-gallons-per-minute", - "ref": "vendor-ref can be anything" + "ref": "vendor-ref can be anything", + "tags": [ ] }, "triangulating_axis": { "units": "Degrees-phase", - "ref": "anything-goes!" + "ref": "anything-goes!", + "tags": [ ] } } } diff --git a/udmis/.idea/runConfigurations/ClearBladeIotAccessProvider.xml b/udmis/.idea/runConfigurations/ClearBladeIotAccessProvider.xml index 7a89db79f3..63572d4fc9 100644 --- a/udmis/.idea/runConfigurations/ClearBladeIotAccessProvider.xml +++ b/udmis/.idea/runConfigurations/ClearBladeIotAccessProvider.xml @@ -1,11 +1,11 @@ - +