diff --git a/.gencode_hash.txt b/.gencode_hash.txt index dfd2ceb493..664d5549ac 100644 --- a/.gencode_hash.txt +++ b/.gencode_hash.txt @@ -1,10 +1,10 @@ 97695067e507720ef649cca27a0eb9ebf9ba8bebe31898289b7d6586a9ada6db gencode/docs/config.html e2944b13db5ff06be9caea51d03bca48f2cb093a8bb583dca14051255d34ea6b gencode/docs/envelope.html -559379abd267e9719a2bee98e56c21301853b6f69bc37fddc501acc57ce7cd63 gencode/docs/event_discovery.html +cecc213148404cd2ad83ee519369c2e2f8b611798bcd6dce441d2f9c02804073 gencode/docs/event_discovery.html 987503860562a3971314a98d75890b6c7615fee84bff6bede7010231f469c035 gencode/docs/event_pointset.html e3fb2b1a96f6fcb06f5af6cff32829abc825065ed52de81c3d379c8c8070fe09 gencode/docs/event_system.html a82821e72af6d0ee35800e6262eb9bb05256309b98aed2dad1a368fd2d6882bb gencode/docs/index.html -9cd65f81a5c6441faba3424922520f29e4987a8827c39dc031b6611f8c920533 gencode/docs/metadata.html +2e2fd3af888c3e784f632ad31115f1029a9af7832c2064871ebb6bb3ec34a58e gencode/docs/metadata.html 741b880216be3743f6747800a042f2dbd89f3b0344c6b0a965f4bc010f03a930 gencode/docs/schema_doc.css 878ea88206c974f40643c3cc430875f9c4e8c5e3fd6bcd6358bd3eb6d48699a9 gencode/docs/schema_doc.min.js 7ed934930aee763e0beebc349725ba3909115e8d346bb762f28bcbe745bb163a gencode/docs/schema_extras.js @@ -15,52 +15,54 @@ d39d7fe37a41c74a40080af7b0a429d201ab1fdff7444428c4b98eb7b38c332b gencode/java/u 0825a5cec83003bb0a6488c4ed7010a04ae0d3848ef36fe01bb4e6718ba7b96d gencode/java/udmi/schema/Aux.java 724ad8db7982f4d703c05245119dc7f7ff731d2141dd861893b55684e3cd6224 gencode/java/udmi/schema/BlobBlobsetConfig.java 7f54da38284a1010de1a2590381022fa16d27fd141d76d1ba6eb471de4d94781 gencode/java/udmi/schema/BlobBlobsetState.java -60279d5d9aa911f25e934aabee3ca06c64a36cd438fe9b255df391c04d540814 gencode/java/udmi/schema/BlobEnumerationEvent.java d2c5b5aae8db27b68104fc83a1f38de0a3f1b5d683f2b13599adf24e96c7d124 gencode/java/udmi/schema/BlobsetConfig.java b6ff9b8739a9c3bb6972f73db6fc54f451189c13b273e58bc11cb3d82c74ad40 gencode/java/udmi/schema/BlobsetState.java -90d6e869087d4dfdc2c29c7f51872e630ad8135542dd432629bf4edac807053a gencode/java/udmi/schema/CloudMetadata.java +a2eeff86f4302272736d84602e2ca36a64d27c8ef6761cc05ffb8ad17b030d4d gencode/java/udmi/schema/CloudModel.java 28001569e7902d3aa39aa3749ca08fb8e29460ba97a4b560d266b365bf5f8c46 gencode/java/udmi/schema/Config.java -3d9a243dcdc6dce31a2b0671d473c60d4cc972087025c7e099f8b4bf85a800da gencode/java/udmi/schema/DiscoveryConfig.java -eb3df3042d3c2008e51c35f35074741ba94a5a7fd590b5f1e59bd30ec19b4c2f gencode/java/udmi/schema/DiscoveryEvent.java -b9b1c6dc52c28630021c76d51305cb2fe634c557f3cf9b8e5c8c8abf456e6216 gencode/java/udmi/schema/DiscoveryState.java +67ac3441ce6d5d4450741ee7e639174756498e1b3780c2d18ce20562b5a88c26 gencode/java/udmi/schema/DiscoveryCommand.java +d8a80ab3180d33bfa17564c969018e1d4350a47dbc70c4ae8a5abbfb25cfedc9 gencode/java/udmi/schema/DiscoveryConfig.java +0d4d7461494578c3530998ae203b43b422d2d7f3722e1095c3d81eb4bc0a1fd6 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 8f71ecd4c32044eccd74225006887d58827976f699ea03efaa5b7ed1b69849d0 gencode/java/udmi/schema/Envelope.java e9f5c77be81486b6b8c6d88f70f2d50583d8c3fafa2ac09ead80f44b8d5e751e gencode/java/udmi/schema/Event.java -70ac42b1f93211420e8b40add27a4388dffcaaac60ead45852412aa815520605 gencode/java/udmi/schema/Families.java aa0885ca43ab38c7597eacc38b7c512940a1a9fa061abd47d02c28e66b6fd93e gencode/java/udmi/schema/FamilyDiscoveryConfig.java ae4a645f199c8e24b3303463d428ca17af7603ae9ae9238397a6a82e752ab454 gencode/java/udmi/schema/FamilyDiscoveryEvent.java 0afc15acd72874e5a0c47f546abc0c4569f5bc37838fdcac77bc7bd55cc53a6d gencode/java/udmi/schema/FamilyDiscoveryState.java -d7aeee0fe20a8dd8d92e43e10d5b563ba4d70cb259f17c5818f3a0a4eed1e2ec gencode/java/udmi/schema/FamilyLocalnetMetadata.java +9959a84eea3e549c142c3edf637c86eb56eca138108ebd51fc2985e45aa41484 gencode/java/udmi/schema/FamilyDiscoveryTestingModel.java +efb376cd7a80ca74fbf74d3ef3f4101d393341a91d01db36456aa84f6be3d0a5 gencode/java/udmi/schema/FamilyLocalnetModel.java 60a8115ae1acae7c199b63180823198d38ec50d57b48dd85aca1ccc865058f85 gencode/java/udmi/schema/GatewayConfig.java -d79f50da651f376ec06bfe3b16bc76eae599d313240022894164ddbcc25c081c gencode/java/udmi/schema/GatewayMetadata.java +56b46f4914ef1f4baa59bf597186ff7901b7c8b607720ec798f4e4e6ad59aa08 gencode/java/udmi/schema/GatewayModel.java e0e7739046e834c0f0ca6a70b38b4579618899be3162887a0fa7ab60bbff22a5 gencode/java/udmi/schema/GatewayState.java a5e5adfc187709e8646a11c92e804acfb67743f9d72149008aaca954df3177f6 gencode/java/udmi/schema/Level.java 07fd4911363437b274c19b024759b04b116152176702da8d4203c4ff4cb55b7f gencode/java/udmi/schema/LocalnetConfig.java -419f04e56922a444c6cc1148796108df2c804cbe139f42b5505c3c48303a573c gencode/java/udmi/schema/LocalnetMetadata.java +910c68183db7703b00bcb81146ad73e6fe0d4bbc4caec4dc9c621f3cc2e5eee5 gencode/java/udmi/schema/LocalnetModel.java 2df4ae32d0bbecc21f7c3f6a416a195baa766a6210cfa8abca4a7bb45b9c7961 gencode/java/udmi/schema/Location.java -ceba95d0586f995eacc52defcf91cd91226e88891a01a0761770853de9dcdf5d gencode/java/udmi/schema/Metadata.java +a1b17e0a1bc10f8e2ea105649a4254fd81c67c3dbe5d78af661fadb739b5be54 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 2cca321fb2fbc00d2082fd918062f6b02e8f2dbe1359c0fbb6a3f47a946838c7 gencode/java/udmi/schema/PointPointsetConfig.java 8f3fc1cdc2dcd3e524863f4675aebabc450a35f5fd1cdc3fd37289b5cab7f2ec gencode/java/udmi/schema/PointPointsetEvent.java -09a99eddb418ef56a4744f94a1d15815e5c460c5e2bd0ea2badfc0662986a853 gencode/java/udmi/schema/PointPointsetMetadata.java +1372dc65268324a65a5854008b5dc5d2492328c145799dc4fda2a520e9f8198b gencode/java/udmi/schema/PointPointsetModel.java db8d6dd3498019ad12e0f328b6237d07e52f133f8b08858b712611a52c198009 gencode/java/udmi/schema/PointPointsetState.java c6a0571e228490defcb8fba335220b23247aea0e0cb9b657efc1e1e6dbcc0fb3 gencode/java/udmi/schema/PointsetConfig.java f3aea029530d0d8c6f50a75f266fd222d3f5ad92004f40675d6a99c906d22c82 gencode/java/udmi/schema/PointsetEvent.java -7987adebea9103a857493bb7698913d0891fcb4a77cec0e208c655953df82243 gencode/java/udmi/schema/PointsetMetadata.java +580dd48ce15879fcedf2150e9b87de99c3b6bdf3b631372b1391af048ba6771f gencode/java/udmi/schema/PointsetModel.java fc3a9415c04d8a06954dbdbfdff5d68ab113cce3948532c19df555778ffb04fa gencode/java/udmi/schema/PointsetState.java ca2e7566106818ca7e5190c8041eb86f0c9b3251b0bda8c3ea7ce11a0c891a0a gencode/java/udmi/schema/Position.java 6ddce136f5e34e7e8c7d101c8a729f1fdd323befdfa52590ebdf0028f970bdf5 gencode/java/udmi/schema/Properties.java 0a1a025dde88fd46925cbb56f5179ed2803ea97948292809ff328a5201d90a3e gencode/java/udmi/schema/State.java 6b8b054c5fa2baef5163d42cd6bf1b0aeb4d07aa881529d81f4ae7dfa4c2906e gencode/java/udmi/schema/SystemConfig.java 8075f2133463e55ac24fccf9391c94698c580b860ad1a0901d5346a2f369030b gencode/java/udmi/schema/SystemEvent.java -c46848327791cec1f1e62dbee2ad66951af7f61ed3c56eeaa8e563774e305bf4 gencode/java/udmi/schema/SystemMetadata.java +9cad2475189fa1115ca78978cbacaeac62fcb875494d72efa4bc40781e8072f9 gencode/java/udmi/schema/SystemModel.java 451217e2cce0ae9224a86f35b3bdea14b36658efe6f94f4a2dff4f4b1dc51cf7 gencode/java/udmi/schema/SystemState.java dfe4bb7c9ba6e366a967ff475883a8ff33fc558ae51db5c71fafae2323d0f8eb gencode/java/udmi/schema/Target.java 7d6dd13e368e7f073738fee69c15e18652a9b7d7ac63bde0a200f747e3aa1b1d gencode/java/udmi/schema/TargetTestingModel.java d3968b92497e83a63f18cc0e74484a9807f1bb92db0c92d556ec2caaa143d645 gencode/java/udmi/schema/TestingModel.java -dbc4084bb91080a350e862ecd8ffab786e677a0d18d4c77857c7546d78d9fe25 gencode/python/udmi/schema/__init__.py +256831be7080ab66aac89d7027d9fa174a12ef4182de6123efa7f4c3f1e7ff04 gencode/python/udmi/schema/__init__.py +6578d68f65b87b781086e72566de910db4bef365599fe3188862d4d8a81e84fb gencode/python/udmi/schema/command_discovery.py 704c8f0eec0b87015af8f7e524375f651b3d35f659ec89b4b022f8c1d0813ec5 gencode/python/udmi/schema/common.py b975892df78076dabc797b4c0be87f20b33eacda11f9d1ac1c09be33d4937a87 gencode/python/udmi/schema/config.py 191e1926c16b55f4ef350a711f540eef17a0ec60bec8c193c94182786dc3624b gencode/python/udmi/schema/config_blobset.py @@ -75,21 +77,23 @@ 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 -f74b62b11bbbd37ea8968ead811dc2534c4996a3dcfd3671807988b7874de347 gencode/python/udmi/schema/event_discovery.py -3ea3e50436e6b87fbcd773361f4a5cd1662b554a1f3eba47c1670c7f82a765ea gencode/python/udmi/schema/event_discovery_blob.py +0ad4a9225ce8d995f331d0b95dfe253ec961f6ad9aca14a5fba9f9a8e3b585f4 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 +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 a27b3b2ace3f301b5fa08a3763f792158f9725a5fbed5cd7b5fac8a6701080e4 gencode/python/udmi/schema/event_system.py -5052a13ce3b3b7affd607a62a8d919b79b464e1352e03fc35799f22996a4aa7a gencode/python/udmi/schema/metadata.py -defe9fcce671ff4ac1a91b9d60ff2260f60865a13fba29c032ff356b1b79f471 gencode/python/udmi/schema/model_cloud.py -1fb8473dd0f2b083ce7daf00a65121893ee5c88ba6999b4950813e4b914a514c gencode/python/udmi/schema/model_gateway.py -89ce7a460f6cba70b067329d2b58814fc2adfee9f783890b148babdceb1f5d2a gencode/python/udmi/schema/model_localnet.py -c1ebc4c6885a3299156300e27cefe63e3b745f595882e0e2be88bb61435d0752 gencode/python/udmi/schema/model_localnet_family.py -b0cfc2a86539f3525f2da52d7b0422bb8934348690f25d9ab64c38e7a8a20536 gencode/python/udmi/schema/model_pointset.py -347b1ee16f74b8cdfa83aa4e179af5a5529545daf1736baf401936c7cf9e7809 gencode/python/udmi/schema/model_pointset_point.py -cd00563a4e0be9112f6d8af3335acc12b0d3354beab602ab924aac59a0f588e4 gencode/python/udmi/schema/model_system.py +42f3429edf4a187be6ebfe9760f5e14821a25afa8f7c65b69e0e34fb29a7932e gencode/python/udmi/schema/metadata.py +b2227a48f21594f78c07c427de64e7ce51dc0ecd4b8091601d739a5f5038a2c9 gencode/python/udmi/schema/model_cloud.py +805cc8dcb29732d1965bbd533b12d2bc4966d584f05b8a478dd2cac98fd99d52 gencode/python/udmi/schema/model_discovery.py +44d057dffcac3a994e7b894f8e1ebb643ba49d7dbfbb0bfea9cc04f97af0bc47 gencode/python/udmi/schema/model_discovery_family.py +9416018a6d01094ab7af77c35ae4e5e2271a5d52c3bd3e381a541650415048b2 gencode/python/udmi/schema/model_gateway.py +ae6a7bc93b520cdc90cd158f876a58e98a3e000402ebb1ca632f01ee492d408a gencode/python/udmi/schema/model_localnet.py +4718368765cacc2cbf552a65346452a14690d0175e9cc921fc576a5c7691fa1d gencode/python/udmi/schema/model_localnet_family.py +2b68c4bdc6d512d12881c1e3ad1d1d31e8422a120f71f3b55abd7c3045ff91ba gencode/python/udmi/schema/model_pointset.py +7125a56680e83c874a35caa6c26f0aa0127fa7a3990aef198090af133d109eab gencode/python/udmi/schema/model_pointset_point.py +75832b261c613b963012b96c406d7e7d22d12aab4f5ad649a5d9d1dd28235345 gencode/python/udmi/schema/model_system.py aafe6e70c281152db958adf77a024e3e9fab8293927106297c5ec48c11f54e27 gencode/python/udmi/schema/model_testing.py 5c50847e136a033ea511209238bb570499b43fbee6189dae06603132dcb9f01f gencode/python/udmi/schema/model_testing_target.py a58f8c98e837a5b56126ca0f410e02f1e9cfcd80a8cb429e0ef522defab1f690 gencode/python/udmi/schema/properties.py diff --git a/bin/clone_model b/bin/clone_model index 36c33ae377..7217c449c7 100755 --- a/bin/clone_model +++ b/bin/clone_model @@ -4,7 +4,7 @@ ROOT_DIR=$(dirname $0)/.. cd $ROOT_DIR MODEL_DIR=udmi_site_model -MODEL_VER=1.6 +MODEL_VER=1.7 TEST_SITE_GIT=https://github.com/faucetsdn/$MODEL_DIR.git if [[ -d $MODEL_DIR ]]; then diff --git a/bin/loop_sequences b/bin/loop_sequences index e4fa826afb..e8ccee1074 100755 --- a/bin/loop_sequences +++ b/bin/loop_sequences @@ -51,6 +51,7 @@ JAVA_CMD="java -cp $JARFILE com.google.daq.mqtt.validator.SequenceTestRunner" rm -rf $site_model/out/devices/$device_id test_srces=`cd validator/src/main/java/com/google/daq/mqtt/validator/validations; ls *.java` +echo Processing test sources $test_srces exit_code=2 for test_name in $test_names; do @@ -62,8 +63,8 @@ for test_name in $test_names; do target=$test_class$test_prefix$test_name CLASS=com.google.daq.mqtt.validator.validations.$target echo $JAVA_CMD $CLASS - timeout 5m $JAVA_CMD $CLASS - result=$? + result=0 + timeout 5m $JAVA_CMD $CLASS || result=$? if [[ $result == 2 ]]; then echo Sequence test $target found no matching tests. @@ -71,7 +72,7 @@ for test_name in $test_names; do echo Sequence test $target exited with error code $result. exit_code=$result elif [[ $exit_code == 2 ]]; then - exit_code=0; + exit_code=0 fi done done diff --git a/docs/messages/pointset.md b/docs/messages/pointset.md index 7f7b3d8297..0cf72a8117 100644 --- a/docs/messages/pointset.md +++ b/docs/messages/pointset.md @@ -25,8 +25,7 @@ Pointset is represented in four locations The `metadata.pointset` subblock represents the abstract system expectation for what the device _should_ be doing, and how it _should_ be configured and operated. This block specifies the expected points that a device holds, along with, if the field is numeric, the expected units of those points. -The general structure of a `pointset` block exists inside of a complete -metadata message +The general structure of a `pointset` block exists inside of a complete metadata message * `pointset`: Top level block designator. * `points`: Collection of point names. diff --git a/docs/specs/mapping.md b/docs/specs/mapping.md new file mode 100644 index 0000000000..82d8eafa0f --- /dev/null +++ b/docs/specs/mapping.md @@ -0,0 +1,7 @@ +[**UDMI**](../../) / [**Docs**](../) / [**Specs**](./) / [Mapping](#) + +# Mapping Interface + +* state: indicates what is ready for external action +* event: details about the mapping itself +* config: external information about how mapping is behaving diff --git a/docs/specs/onboarding.md b/docs/specs/onboarding.md new file mode 100644 index 0000000000..f1d3c0a182 --- /dev/null +++ b/docs/specs/onboarding.md @@ -0,0 +1,98 @@ +[**UDMI**](../../) / [**Docs**](../) / [**Specs**](./) / [Onboarding](#) + +# Onboarding + +The overall "onboarding" flow consists of a number of separate subflows stitched together for a complete +end-to-end process. This generall starts from an "unknown" device in the system through to a UDMI-compliant +device that's properly integrated with backend services. + +At a high-level, the overall process involves different message subgroups that handle slightly different +scopes of device data: +* **(Native)**: Device communicaiton using some non-UDMI native protocol (e.g. BACnet, Modbus, etc...) +* **[Discovery](discovery.md)**: Messages relating to the discovery (and provisioning) of devices (e.g. messy BACnet info) +* **[Mapping](mapping.md)**: Messages relating to a 'resolved' device type and ID (e.g. the device is an `AHU` called `AHU-1`) +* **[Pointset](../messages/pointset.md)**: Messages relating to actual data flow (e.g. temperature reading), essentially the interesting stuff + +## Sequence Diagram + +The overall onboarding sequence involves multiple components that work together to provide the overall flow: +* **Device**: The target thing that needs to be discovered, configured, and ultimately communications point data +* **Node**: A 'discovery node' responsible for handling on-prem non-UDMI discovery communication with a device +* **Cloud**: The on-prem/in-cloud boundary. Things to the left are things in the building, to the right are in the cloud +* **Agent**: Responsible for managing the overall _discovery_ process (how often, what color, etc...) +* **Mapper**: Uses hueristics, ML, or a UI to convert discovery information into a concrete device/sink mapping +* **Sink**: Ultimate recepient of pointset information. The thing that cares about 'temperature' in a room + +Notes & Caveats: +1. Only "interesting" messages are shown in the diagram, there's other control flow things that go on (e.g. +to configure when the discovery *Node* should activate) to complete the overall flow. +2. This just shows one-of-many potential provisioning (handling keys) techniques. There's other paths +that would be possible (including manually, which is the baseline default). +3. This shows the flow for a direct-connect (no IoT Gateway) device. The overall flow for a proxied device +(with IoT Gateway) would more or less be the same, just different details about exact communication mechanisms. + +``` ++---------+ +-------+ +-------+ +-------+ +--------+ +-------+ +| Device | | Node | | Cloud | | Agent | | Mapper | | Sink | ++---------+ +-------+ +-------+ +-------+ +--------+ +-------+ + | | | | | | + | (Info) | | | | | + |----------------------->| | | | | + | | | | | | + | | Discovery Event | | | + | |----------------------------------------------------->| | + | | | | | | + | | | | | Mapping Event | + | | | | |------------------>| + | | | | | | + | | | | Mapping Event | | + | | | |<-------------------| | + | | | | | | + | | | (Cloud Provision) | | | + | | |<----------------------| | | + | | | | | | + | | | Discovery Command | | | + | |<--------------------------------| | | + | | | | | | + | (Device Provision) | | | | | + |<-----------------------| | | | | + | | | | | | + | | | | | Pointset Config | + |<--------------------------------------------------------------------------------------------------| + | | | | | | + | Pointset Event | | | | | + |-------------------------------------------------------------------------------------------------->| + | | | | | | +``` + +1. **(Info)** contains natively-encoded _Device_ information (format out of scope for UDMI) + * "I am device `78F936`, with points { `room_temp`, `step_size`, and `operation_count` }, and public key `XYZZYZ`" +2. **[Discovery Event](../../tests/event_discovery.tests/enumeration.json)** from _Node_ wraps up the device info into a UDMI-normalized format + * "Device `78F936` has points { }, with a public key `XYZZYZ`" +3. **Mapping Event** from the _Mapper_ (recieved by both _Sink_ and _Agent_) + * "Device `78F936` is an `AHU` called `AHU-183`, and `room_temp` is really a `flow_temperatue`" +5. **(Cloud Provision)** from _Agent_ sets up the _Cloud_ layer using the IoT Core API. + * "Device `AHU-183` exists and has public key `XYZZYZ`" +4. **[Discovery Command](../../tests/command_discovery.tests/provision.json)** from the _Agent_ to the discovery _Node_ contains information necessary to provision the device + * "Device `78F936` should call itself `AHU-183` when connecting to the cloud" +5. **(Device Provision)** uses some natively-encoded mechanism for setting up the device with relevant cloud info + * "Device `78F936`, you are celled `AHU-183` when connecting to the cloud" +7. **[Pointset Config](../../tests/config.tests/example.json)** from the _Sink_ can go directly to the _Device_ (after it connects to the cloud) + * "Device `AHU-183`, you should send the `room_temp` data point every `10 minutes`" +8. **[Pointset Events](../../tests/event_pointset.tests/example.json)** sends telemetry events from the _Device_ to _Sink_... business as usual! + * "I am `AHU-183`, and my `room_temp` is `73`" + +## Source +Created using https://textart.io/sequence# +``` +object Device Node Cloud Agent Mapper Sink +Device->Node: (Info) +Node->Mapper: Discovery Event +Mapper->Sink: Mapping Event +Mapper->Agent: Mapping Event +Agent->Cloud: (Cloud Provision) +Agent->Node: Discovery Command +Node->Device: (Device Provision) +Sink->Device: Pointset Config +Device->Sink: Pointset Event +``` diff --git a/docs/specs/readme.md b/docs/specs/readme.md index ef1b3d50fa..5ed3bbeaa0 100644 --- a/docs/specs/readme.md +++ b/docs/specs/readme.md @@ -5,14 +5,16 @@ - [UDMI Compliance](compliance.md) - [Tech Stack](tech_stack.md) - [Discovery](discovery.md) +- [Onboarding](onboarding.md) - [Messages](../messages/) - [Message Walk](message_walk.md) -- [Sequences](sequences/) - [Connection Models](connecting.md) - [IoT Gateway](gateway.md) - [MQTT Client](mqtt_client.md) - [Point Mapping](point_mapping.md) - [Proxy](proxy.md) +- [Sequences](sequences/) (device-to-cloud API) +- [Subblocks](subblocks.md) (core-to-apps API) - [Site Model](site_model.md) - [Metadata](metadata.md) - [Tech Stack](tech_stack.md) diff --git a/docs/specs/subblocks.md b/docs/specs/subblocks.md new file mode 100644 index 0000000000..8184f337de --- /dev/null +++ b/docs/specs/subblocks.md @@ -0,0 +1,98 @@ +[**UDMI**](../../) / [**Docs**](../) / [**Specs**](./) / [Subblocks](#) + +# Subblocks API + +The _Subblocks API_ defines a high-level interface between UDMI core services and ancillary +applications. These messages are similar to those used for device communication, but are +Specifically segmented by designated _subblocks_ that partition functionality into atomic +chunks. Specficialy, the subblock _state_/_config_ are a limited form of the overall +device _state_/_config_, and only expose the relevant pieces. + +The basic mode of this interface is a "read only" subscription to a PubSub topic (normally +`udmi_target`) that then provides a complete view of updates as they flow through the system. +For example, a cloud-to-device _config_ update would be published on this topic as a "update +to device config." This level of visability should be sufficient to completely mirror the +visible state of the system (barring issues like loss-of-message etc...). + +The various _subblocks_ are detailed below. Each _subblock_ (or _subFolder_ if you're looking +at the PubSub _message envelope_), has several basic _subTypes_ that manifest themselves from +different sources: + +* **Model**: Model-based description of this device. Unlike the other messages, this exists + independent of any actual physical device, and will be injected by the syste through something + like the `registrar` tool. The _model_ is typically also refleced in a _site\_model_ as a + static set of files somewhere. +* **Event**: Streaming telemetry. This is essentially a raw feed from the device itself, + and will always be segmented by subblock (e.g. for a + [pointset event](../../tests/event_pointset.tests/example.json)). Streaming telemetry + is sent from the device, so will be _received by_ a client app. +* **State**: Device state for this subblock. Unlike a + [comprehensive device state message](../../tests/state.tests/example.json) + this message contains information _only_ for a single subblock. Used for reporting any 'sticky' + state from a device, so will be _received by_ a client app. +* **Config**: Device config for this subblock. Unlike a + [comprehensive device config message](../../tests/config.tests/example.json) + this message contains information _only_ for a single subblock. Used for writing configuration + changes to a device, so will be _sent from_ a client app. +* **Commands**: Streaming commands from cloud to the device. Generally not used because a model-based + approach using device state is preferred. + +In all cases, the _Subblock API_ messages encode the relevant subblock ID { pointset, discovery, ... } +in the [message envelope's](../../tests/envelope.tests/example.json) _subFolder_ field. +The _subType_ field encodes the relevant type { _event_, _config_, _state_, _model_ }. + +## System + +* **Model** +* **Event** +* **State** +* **Config** + +## [Pointset](../messages/pointset.md) + +A _pointset_ covers the structures necessary to model a device _point_ with associated data readings. +This is typically what is thought of as 'device telemetry' and represents the expected end value of +the device-to-cloud connection. + +* [**Model**](../../tests/model_pointset.tests/example.json): Expected model for what the device should + be reporting. +* [**Event**](../../tests/event_pointset.tests/example.json): Streaming telemetry events from the device + containing the actual data points. +* [**State**](../../tests/state_pointset.tests/example.json): State of the device points, indicating any + sticky errors or status of any cloud-to-device config. +* [**Config**](../../tests/config_pointset.tests/example.json): Configuration of the device points, + indicating the expected points, cloud-to-device control, etc... + +## Discovery + +_Discovery_ covers systems that are actively searching for systems on a network (of some kind), and +returning results about what was discovered and what their capabilities are. This provides a mechanism +for doing things like a BACnet discovery sequence. + +* **Model** +* **Event** +* **State** +* **Config** + +## Audit + +_Audit_ covers an external "black box" audit of a system for vunerabilities or other characteristics. +E.g., doing a port-scan of a device to see what network ports are open would be part of a network +exposure autit. + +* **Model** +* **Event** +* **State** +* **Config** + +## Mapping + +The _mapping_ process covers the determination of a translation from a set of identifiers or points to +a canonical or other set of identifiers or points. E.g., there's a mapping process that goes on to +correlate a BACnet MAC address (such as `9832C2`) with an associated IoT ID (such as `FCU-323`). + +* **Model** +* **Event** +* **State** +* **Config** + diff --git a/etc/sequencer.out b/etc/sequencer.out index 6f806f8352..0d25bea7cc 100644 --- a/etc/sequencer.out +++ b/etc/sequencer.out @@ -1,6 +1,10 @@ RESULT pass broken_config Sequence complete +RESULT pass continuous_scan Sequence complete RESULT pass extra_config Sequence complete +RESULT pass self_enumeration Sequence complete +RESULT pass single_scan Sequence complete RESULT pass system_last_update Sequence complete RESULT pass valid_serial_no Sequence complete RESULT pass valid_serial_no Sequence complete +RESULT pass valid_serial_no Sequence complete RESULT skip writeback_states Missing 'invalid' target specification diff --git a/gencode/docs/event_discovery.html b/gencode/docs/event_discovery.html index 4ca55f153f..0b64ad35b2 100644 --- a/gencode/docs/event_discovery.html +++ b/gencode/docs/event_discovery.html @@ -391,6 +391,40 @@
The primary scan discovery address family
+ + + + + + +Collection of data blobs recognized by this device.
- No Additional Properties - - - - - - -All property whose name matches the following regular expression must respect the following conditions
- Property name regular expression:^[a-z][a-z0-9]*(_[a-z0-9]+)*$
- Object representation for for a single blob enumeration
- - - No Additional Properties - - - - - - -Description of this blob
- - - - - - - -Indicating if this blob is part of the device's firmware set
- - - - - - -RFC 3339 timestamp the metadata was generated
+RFC 3339 timestamp the message was generated
@@ -353,7 +353,7 @@High-level system information about the device. System Metadata Documentation
+High-level system information about the device. System Model Documentation
No Additional Properties @@ -1345,6 +1345,136 @@Discovery target parameters
+ + + No Additional Properties + + + + + + +All property whose name matches the following regular expression must respect the following conditions
+ Property name regular expression:^[a-z][a-z0-9]*(_[a-z0-9]+)*$
+