diff --git a/.gencode_hash.txt b/.gencode_hash.txt index 234d82f44c..c4a40fe9d5 100644 --- a/.gencode_hash.txt +++ b/.gencode_hash.txt @@ -1,6 +1,6 @@ 68d980d671aff90933b2cedc119625bd1c538bfdfb31894ef7796fd12c1a2755 gencode/docs/config.html e2944b13db5ff06be9caea51d03bca48f2cb093a8bb583dca14051255d34ea6b gencode/docs/envelope.html -ffe3ff971a425218e7601a205a2e37c629f9dbdc4a15e0c7856ed24a0114eac0 gencode/docs/event_discovery.html +0588439b84653d60be40fe8680738fbca8cb50b77567215b0d65eaafc30de6b7 gencode/docs/event_discovery.html 8133e380e40f27c56accbffc665b2eeb56ec84a4da3b52ba7aa5e439c9c40572 gencode/docs/event_pointset.html 076eb51e75281ed065a9f0236a1e19b6bf3c277b51ceca84f6aa3f76d5bb6022 gencode/docs/event_system.html a82821e72af6d0ee35800e6262eb9bb05256309b98aed2dad1a368fd2d6882bb gencode/docs/index.html @@ -9,7 +9,6 @@ a82821e72af6d0ee35800e6262eb9bb05256309b98aed2dad1a368fd2d6882bb gencode/docs/i 878ea88206c974f40643c3cc430875f9c4e8c5e3fd6bcd6358bd3eb6d48699a9 gencode/docs/schema_doc.min.js 7ed934930aee763e0beebc349725ba3909115e8d346bb762f28bcbe745bb163a gencode/docs/schema_extras.js 5a1e8ec9c93f3091b3c8a81b0b804b05cc333744e13efb6a379bd9c84326b9fc gencode/docs/state.html -68f8919d59556c7c781958baaac0b8cc629b6c4ce86e6ffd0171d23536747ec6 gencode/java/udmi/schema/Ancillary.java d39d7fe37a41c74a40080af7b0a429d201ab1fdff7444428c4b98eb7b38c332b gencode/java/udmi/schema/Asset.java 0edc9b905bbe4ad0ee5ffdb7fb5d65a00ad171b2dad299ef128e59c0bd9dddc0 gencode/java/udmi/schema/AuditEvent.java 0825a5cec83003bb0a6488c4ed7010a04ae0d3848ef36fe01bb4e6718ba7b96d gencode/java/udmi/schema/Aux.java @@ -21,7 +20,7 @@ a2eeff86f4302272736d84602e2ca36a64d27c8ef6761cc05ffb8ad17b030d4d gencode/java/u ff79de9390aa25bb45fb3e2ebb682c865ccab764f56d9644377d9d28c0ab10e4 gencode/java/udmi/schema/Config.java 587d67a67431349939dffd37b880c44e798a1eb607d54bd6d8a077bbac668067 gencode/java/udmi/schema/DiscoveryCommand.java d8a80ab3180d33bfa17564c969018e1d4350a47dbc70c4ae8a5abbfb25cfedc9 gencode/java/udmi/schema/DiscoveryConfig.java -fb243b3fa232d8497472869b0cf1acb2accea6dee72bbd006ec82396fd0012a9 gencode/java/udmi/schema/DiscoveryEvent.java +f91b936b62ccd98d367f548eeb13aa71e56c84fc250c227ef4b1fb0cffec744a gencode/java/udmi/schema/DiscoveryEvent.java 04112dd47b0f761131c276c67d3cd8b789d25e6716b5732be9fef14fc6831f1d gencode/java/udmi/schema/DiscoveryModel.java 9962b0eb7d5adf52af6160e9f3131f8eeb52ae9e518954dbb6aead1bcad0245e gencode/java/udmi/schema/DiscoveryState.java 090bbaf1508aa6ca8380af936af990673f300eb5a940c9e8ab94deb64efa2b7b gencode/java/udmi/schema/Entry.java @@ -43,7 +42,7 @@ a5e5adfc187709e8646a11c92e804acfb67743f9d72149008aaca954df3177f6 gencode/java/u 304164da05dc722b6e94cfa68659f0120e2425c94bfb5f5a4c6d796fe13da885 gencode/java/udmi/schema/Metadata.java a4e8f69100ab678a8236f481c558d677bbaea3e76c853bbd9262113d2a9c031d gencode/java/udmi/schema/Metrics.java 5e1c5411fae4d7c47391ceb5d19ae864fcd484df75ac6b6db39fd2d12647dec8 gencode/java/udmi/schema/Physical_tag.java -0868f0a9beb671dd08f066e7e7e796531fe151307a0b853b1f1a1aafe50ee746 gencode/java/udmi/schema/PointEnumerationEvent.java +052139f222b9585dcc1dd4c5de197e107cf6264783917af4b62c84d66548e3cc gencode/java/udmi/schema/PointEnumerationEvent.java 9855400da64cb7c9501294b72d0190caa646fab043b39a6c7c5e4b0250515f20 gencode/java/udmi/schema/PointPointsetConfig.java 8f3fc1cdc2dcd3e524863f4675aebabc450a35f5fd1cdc3fd37289b5cab7f2ec gencode/java/udmi/schema/PointPointsetEvent.java 65337109653a93d873dae40eb517857149bae1b20c7b479f41b35c0822d94ba0 gencode/java/udmi/schema/PointPointsetModel.java @@ -66,7 +65,8 @@ abe99dd74122c186403baa6982300a9d5968f8bbb7a67b1689104111b98f32fb gencode/java/u dfe4bb7c9ba6e366a967ff475883a8ff33fc558ae51db5c71fafae2323d0f8eb gencode/java/udmi/schema/Target.java 7d6dd13e368e7f073738fee69c15e18652a9b7d7ac63bde0a200f747e3aa1b1d gencode/java/udmi/schema/TargetTestingModel.java d3968b92497e83a63f18cc0e74484a9807f1bb92db0c92d556ec2caaa143d645 gencode/java/udmi/schema/TestingModel.java -c9bf6e8763d0092d348f651da0bbff16841d1bd01e036afbb56d21f5cd29098e gencode/python/udmi/schema/__init__.py +786b8685c921b6f13688b5f5933ff0aaf8cfa3d1d6d430a972d16d4857a0a8d9 gencode/python/udmi/schema/__init__.py +4b25dd95f863059b761269f93adcae7049507924a1c6e74d6856849203c179db gencode/python/udmi/schema/ancillary_properties.py 6578d68f65b87b781086e72566de910db4bef365599fe3188862d4d8a81e84fb gencode/python/udmi/schema/command_discovery.py 704c8f0eec0b87015af8f7e524375f651b3d35f659ec89b4b022f8c1d0813ec5 gencode/python/udmi/schema/common.py b975892df78076dabc797b4c0be87f20b33eacda11f9d1ac1c09be33d4937a87 gencode/python/udmi/schema/config.py @@ -82,9 +82,9 @@ b461bdc24310ef972faf579b5be577b5af67fb0977d6afb4c42955211b26e3d5 gencode/python 631371489cb1275517bebcc4040cbc655d18ca147ab540701b3fd9cedba138c5 gencode/python/udmi/schema/envelope.py 1eb9019b9d0b4ff7de2df8beb625a4f89292d636ece0c02f160495c537bd6c2c gencode/python/udmi/schema/event.py c93eced8341bc7db0d6b36949c24229e0ec1b2d54543986cb0aab6e835524153 gencode/python/udmi/schema/event_audit.py -0ad4a9225ce8d995f331d0b95dfe253ec961f6ad9aca14a5fba9f9a8e3b585f4 gencode/python/udmi/schema/event_discovery.py +9b96027946f28850722c01a6d7b27de55f0fab613fcd7e07ac405914f4b235d8 gencode/python/udmi/schema/event_discovery.py ad33b91a7fabb4eed7e49c30a983a2106c96330facbe0f376f94d06e2263d6d0 gencode/python/udmi/schema/event_discovery_family.py -266c36a6174c959017894de6051f7d6071ac59ed3f049df9cbb49b894c11c84e gencode/python/udmi/schema/event_discovery_point.py +06c416a6ffcb96f84c1cf7419a31f996b2028094af6351ae77e958124bf501c5 gencode/python/udmi/schema/event_discovery_point.py abe4044d2e3be6693ed39edc8ccaed4eee4eb8acad991e820b21d6ecf3812dd9 gencode/python/udmi/schema/event_mapping.py ddf849bfeb2b87d071cefd5e6feacabc57375a7fff6d72b6d42ffb89f33c859b gencode/python/udmi/schema/event_pointset.py 44aff1bc930dbdbadd51ac3fe0e7d9c83ad84a6a9f9d1c809b3fce66cbcd5e00 gencode/python/udmi/schema/event_pointset_point.py diff --git a/gencode/docs/event_discovery.html b/gencode/docs/event_discovery.html index 638941ee10..b3f6c6ad2f 100644 --- a/gencode/docs/event_discovery.html +++ b/gencode/docs/event_discovery.html @@ -1341,15 +1341,279 @@

ancillaryType: object

Arbitrary blob of json associated with this point

+ + + + + + + + + + + + + + + + + + + + +
+
+
+

+ +

+
+ +
+
+ + Type: object
+

Arbitrary blob of json associated with this point

+
+ + + + + + + + +
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: object
+

A collection of fields which describe the physical hardware of the device.

+
+ + No Additional Properties +
+
+
+

+ +

+
+ +
+
+ + Type: string
+

The manufacturer of the device

+
+ + + + + +
+
Example:
+
"Google"
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: string
+

The model of the device

+
+ + + + + +
+
Examples:
+
"Pixel 5"
+
+
"Pixel 6"
+
+
"Pixel 6 Pro"
+
+
+
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: string
+

A stock keeping unit which identifies the unique composition of a device, for example those with different hardware configurations

+
+ + + + + +
+
Examples:
+
"GF5KQ"
+
+
"4215612"
+
+
+
+
+
+
+
+
+
+

+ +

+
+ +
+
+ + Type: string
+

Hardware revision of the device

+
+ + + + + +
+
Examples:
+
"A"
+
+
"B"
+
+
"1"
+
diff --git a/gencode/java/udmi/schema/Ancillary.java b/gencode/java/udmi/schema/Ancillary.java deleted file mode 100644 index a1b456b1c6..0000000000 --- a/gencode/java/udmi/schema/Ancillary.java +++ /dev/null @@ -1,39 +0,0 @@ - -package udmi.schema; - -import javax.annotation.processing.Generated; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * Arbitrary blob of json associated with this point - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - -}) -@Generated("jsonschema2pojo") -public class Ancillary { - - - @Override - public int hashCode() { - int result = 1; - return result; - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Ancillary) == false) { - return false; - } - Ancillary rhs = ((Ancillary) other); - return true; - } - -} diff --git a/gencode/java/udmi/schema/DiscoveryEvent.java b/gencode/java/udmi/schema/DiscoveryEvent.java index df51942e1c..1db6f9c69d 100644 --- a/gencode/java/udmi/schema/DiscoveryEvent.java +++ b/gencode/java/udmi/schema/DiscoveryEvent.java @@ -2,6 +2,7 @@ package udmi.schema; import java.util.Date; +import java.util.HashMap; import java.util.Map; import javax.annotation.processing.Generated; import com.fasterxml.jackson.annotation.JsonInclude; @@ -24,7 +25,9 @@ "status", "scan_family", "families", - "points" + "points", + "ancillary", + "hardware" }) @Generated("jsonschema2pojo") public class DiscoveryEvent { @@ -82,6 +85,24 @@ public class DiscoveryEvent { @JsonProperty("points") @JsonPropertyDescription("Collection of data points available for this device.") public Map points; + /** + * Ancillary Properties + *

+ * Arbitrary blob of json associated with this point + * + */ + @JsonProperty("ancillary") + @JsonPropertyDescription("Arbitrary blob of json associated with this point") + public HashMap ancillary; + /** + * Hardware + *

+ * A collection of fields which describe the physical hardware of the device. + * + */ + @JsonProperty("hardware") + @JsonPropertyDescription("A collection of fields which describe the physical hardware of the device.") + public Hardware hardware; @Override public int hashCode() { @@ -89,15 +110,17 @@ public int hashCode() { result = ((result* 31)+((this.generation == null)? 0 :this.generation.hashCode())); result = ((result* 31)+((this.scan_family == null)? 0 :this.scan_family.hashCode())); result = ((result* 31)+((this.families == null)? 0 :this.families.hashCode())); + result = ((result* 31)+((this.ancillary == null)? 0 :this.ancillary.hashCode())); result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode())); result = ((result* 31)+((this.timestamp == null)? 0 :this.timestamp.hashCode())); result = ((result* 31)+((this.status == null)? 0 :this.status.hashCode())); result = ((result* 31)+((this.points == null)? 0 :this.points.hashCode())); + result = ((result* 31)+((this.hardware == null)? 0 :this.hardware.hashCode())); return result; } @Override - public boolean equals(Object other) { + public boolean equals(java.lang.Object other) { if (other == this) { return true; } @@ -105,7 +128,7 @@ public boolean equals(Object other) { return false; } DiscoveryEvent rhs = ((DiscoveryEvent) other); - return ((((((((this.generation == rhs.generation)||((this.generation!= null)&&this.generation.equals(rhs.generation)))&&((this.scan_family == rhs.scan_family)||((this.scan_family!= null)&&this.scan_family.equals(rhs.scan_family))))&&((this.families == rhs.families)||((this.families!= null)&&this.families.equals(rhs.families))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp))))&&((this.status == rhs.status)||((this.status!= null)&&this.status.equals(rhs.status))))&&((this.points == rhs.points)||((this.points!= null)&&this.points.equals(rhs.points)))); + return ((((((((((this.generation == rhs.generation)||((this.generation!= null)&&this.generation.equals(rhs.generation)))&&((this.scan_family == rhs.scan_family)||((this.scan_family!= null)&&this.scan_family.equals(rhs.scan_family))))&&((this.families == rhs.families)||((this.families!= null)&&this.families.equals(rhs.families))))&&((this.ancillary == rhs.ancillary)||((this.ancillary!= null)&&this.ancillary.equals(rhs.ancillary))))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.timestamp == rhs.timestamp)||((this.timestamp!= null)&&this.timestamp.equals(rhs.timestamp))))&&((this.status == rhs.status)||((this.status!= null)&&this.status.equals(rhs.status))))&&((this.points == rhs.points)||((this.points!= null)&&this.points.equals(rhs.points))))&&((this.hardware == rhs.hardware)||((this.hardware!= null)&&this.hardware.equals(rhs.hardware)))); } } diff --git a/gencode/java/udmi/schema/PointEnumerationEvent.java b/gencode/java/udmi/schema/PointEnumerationEvent.java index 51774ff877..866790f288 100644 --- a/gencode/java/udmi/schema/PointEnumerationEvent.java +++ b/gencode/java/udmi/schema/PointEnumerationEvent.java @@ -2,6 +2,7 @@ package udmi.schema; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import javax.annotation.processing.Generated; import com.fasterxml.jackson.annotation.JsonInclude; @@ -36,28 +37,28 @@ public class PointEnumerationEvent { */ @JsonProperty("possible_values") @JsonPropertyDescription("List of possible enumerated values for the point") - public List possible_values = new ArrayList(); + public List possible_values = new ArrayList(); /** * Current or default unit for this point * */ @JsonProperty("units") @JsonPropertyDescription("Current or default unit for this point") - public String units; + public java.lang.String units; /** * Current or default type for this point * */ @JsonProperty("type") @JsonPropertyDescription("Current or default type for this point") - public String type; + public java.lang.String type; /** * Reference parameter for this point (e.g. BACnet object) * */ @JsonProperty("ref") @JsonPropertyDescription("Reference parameter for this point (e.g. BACnet object)") - public String ref; + public java.lang.String ref; /** * Indicates if this point is writable or not * @@ -71,7 +72,7 @@ public class PointEnumerationEvent { */ @JsonProperty("description") @JsonPropertyDescription("Human-readable description of this point") - public String description; + public java.lang.String description; /** * Entry *

@@ -81,12 +82,14 @@ public class PointEnumerationEvent { @JsonProperty("status") public Entry status; /** + * Ancillary Properties + *

* Arbitrary blob of json associated with this point * */ @JsonProperty("ancillary") @JsonPropertyDescription("Arbitrary blob of json associated with this point") - public Ancillary ancillary; + public HashMap ancillary; @Override public int hashCode() { @@ -103,7 +106,7 @@ public int hashCode() { } @Override - public boolean equals(Object other) { + public boolean equals(java.lang.Object other) { if (other == this) { return true; } diff --git a/gencode/python/udmi/schema/__init__.py b/gencode/python/udmi/schema/__init__.py index 8be3c9d4a9..d135bad57b 100644 --- a/gencode/python/udmi/schema/__init__.py +++ b/gencode/python/udmi/schema/__init__.py @@ -1,3 +1,4 @@ +from .ancillary_properties import AncillaryProperties from .command_discovery import DiscoveryCommand from .common import Common from .config import Config diff --git a/gencode/python/udmi/schema/ancillary_properties.py b/gencode/python/udmi/schema/ancillary_properties.py new file mode 100644 index 0000000000..a2de030f1f --- /dev/null +++ b/gencode/python/udmi/schema/ancillary_properties.py @@ -0,0 +1,35 @@ +"""Generated class for ancillary_properties.json""" + + +class AncillaryProperties: + """Generated schema class""" + + def __init__(self): + pass + + @staticmethod + def from_dict(source): + if not source: + return None + result = AncillaryProperties() + return result + + @staticmethod + def map_from(source): + if not source: + return None + result = {} + for key in source: + result[key] = AncillaryProperties.from_dict(source[key]) + return result + + @staticmethod + def expand_dict(input): + result = {} + for property in input: + result[property] = input[property].to_dict() if input[property] else {} + return result + + def to_dict(self): + result = {} + return result diff --git a/gencode/python/udmi/schema/event_discovery.py b/gencode/python/udmi/schema/event_discovery.py index c1b457ecb7..4d69f8915d 100644 --- a/gencode/python/udmi/schema/event_discovery.py +++ b/gencode/python/udmi/schema/event_discovery.py @@ -2,6 +2,8 @@ from .common import Entry from .event_discovery_family import FamilyDiscoveryEvent from .event_discovery_point import PointEnumerationEvent +from .ancillary_properties import AncillaryProperties +from .state_system_hardware import Hardware class DiscoveryEvent: @@ -15,6 +17,8 @@ def __init__(self): self.scan_family = None self.families = None self.points = None + self.ancillary = None + self.hardware = None @staticmethod def from_dict(source): @@ -28,6 +32,8 @@ def from_dict(source): result.scan_family = source.get('scan_family') result.families = FamilyDiscoveryEvent.map_from(source.get('families')) result.points = PointEnumerationEvent.map_from(source.get('points')) + result.ancillary = AncillaryProperties.from_dict(source.get('ancillary')) + result.hardware = Hardware.from_dict(source.get('hardware')) return result @staticmethod @@ -62,4 +68,8 @@ def to_dict(self): result['families'] = FamilyDiscoveryEvent.expand_dict(self.families) # 2 if self.points: result['points'] = PointEnumerationEvent.expand_dict(self.points) # 2 + if self.ancillary: + result['ancillary'] = self.ancillary.to_dict() # 4 + if self.hardware: + result['hardware'] = self.hardware.to_dict() # 4 return result diff --git a/gencode/python/udmi/schema/event_discovery_point.py b/gencode/python/udmi/schema/event_discovery_point.py index 39632931c9..bc259164e8 100644 --- a/gencode/python/udmi/schema/event_discovery_point.py +++ b/gencode/python/udmi/schema/event_discovery_point.py @@ -1,39 +1,6 @@ """Generated class for event_discovery_point.json""" from .common import Entry - - -class Object1D746D26: - """Generated schema class""" - - def __init__(self): - pass - - @staticmethod - def from_dict(source): - if not source: - return None - result = Object1D746D26() - return result - - @staticmethod - def map_from(source): - if not source: - return None - result = {} - for key in source: - result[key] = Object1D746D26.from_dict(source[key]) - return result - - @staticmethod - def expand_dict(input): - result = {} - for property in input: - result[property] = input[property].to_dict() if input[property] else {} - return result - - def to_dict(self): - result = {} - return result +from .ancillary_properties import AncillaryProperties class PointEnumerationEvent: @@ -61,7 +28,7 @@ def from_dict(source): result.writable = source.get('writable') result.description = source.get('description') result.status = Entry.from_dict(source.get('status')) - result.ancillary = Object1D746D26.from_dict(source.get('ancillary')) + result.ancillary = AncillaryProperties.from_dict(source.get('ancillary')) return result @staticmethod diff --git a/schema/ancillary_properties.json b/schema/ancillary_properties.json new file mode 100644 index 0000000000..c8d4d024da --- /dev/null +++ b/schema/ancillary_properties.json @@ -0,0 +1,6 @@ +{ + "title": "Ancillary Properties", + "description": "Arbitrary blob of json associated with this point", + "existingJavaType": "java.util.HashMap", + "type": "object" +} diff --git a/schema/event_discovery.json b/schema/event_discovery.json index f4b1b989ff..228ce0f8c6 100644 --- a/schema/event_discovery.json +++ b/schema/event_discovery.json @@ -48,6 +48,12 @@ "$ref": "file:event_discovery_point.json#" } } + }, + "ancillary": { + "$ref": "file:ancillary_properties.json" + }, + "hardware": { + "$ref": "file:state_system_hardware.json" } }, "required": [ diff --git a/schema/event_discovery_point.json b/schema/event_discovery_point.json index f68cad9cca..760cdbadde 100644 --- a/schema/event_discovery_point.json +++ b/schema/event_discovery_point.json @@ -36,8 +36,7 @@ "$ref": "file:common.json#/definitions/entry" }, "ancillary": { - "description": "Arbitrary blob of json associated with this point", - "type": "object" + "$ref": "file:ancillary_properties.json" } } } diff --git a/tests/event_discovery.tests/implicit.json b/tests/event_discovery.tests/implicit.json index 3fa7849384..9002475281 100644 --- a/tests/event_discovery.tests/implicit.json +++ b/tests/event_discovery.tests/implicit.json @@ -32,7 +32,17 @@ "sup_flow_actual_avo_1": { "units": "percent", "ref": "analog-value_29", - "description": "Basic value reading" + "description": "Basic value reading", + "ancillary": { + "monkeys": true + } } + }, + "hardware": { + "model": "MS-NAE5510-3", + "make": "JCI" + }, + "ancillary": { + "rabbits": 283 } }