Skip to content

Commit

Permalink
Merge branch 'master' into documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Mar 7, 2024
2 parents 8cac4f1 + cea66e3 commit 3f659b8
Show file tree
Hide file tree
Showing 44 changed files with 5,817 additions and 1,517 deletions.
42 changes: 19 additions & 23 deletions .gencode_hash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
158e714e54b2a6d0b90bfca00d178369b04508dc4fa84a979690a813ca2dd724 gencode/docs/command_mapping.html
4e2480661fabd32eba35d3ae9a4af94f08eb7cfdd62e75b45ade560078fe389c gencode/docs/config.html
22bfb3fd7c0e73dac4cbd830aa7983714917ec6da813f6bf5768ce3aa9786fb2 gencode/docs/config_mapping.html
34f7010414e11ec69ec8ea7161c9044f4a26486561fd898f7d37d984c080782d gencode/docs/configuration_endpoint.html
d36ef9ba6e469a43fc337147102982a56eb0e0de1358a608b27bdf427270a5bf gencode/docs/configuration_execution.html
ec08d3fed08e247537ed9b364dd29276b860dfaf4d79c332c9909a046f3e6f2d gencode/docs/configuration_pod.html
1da095c59e872de279d423be81e406e35f762287a82e0b315240cdf3c3451618 gencode/docs/configuration_pubber.html
14058fe7266ccd7a5747f99485a212f57a08eaf70e082a0db42d228ebce78548 gencode/docs/configuration_endpoint.html
1cf54abf2d62bc8e9fd36ffa506cb68f05e2ad7f87884c11a19a9c14ff0154e6 gencode/docs/configuration_execution.html
a76b0665d740b608d72bcbd6631ff1f35f4cb164af71fe7ed8c6018215319179 gencode/docs/configuration_pod.html
4c830ff76095aee3c1345757ec0b7931d32412442acb31ee8e97e581cbf9f8e3 gencode/docs/configuration_pubber.html
f24d15e549f1b143b50d6011f2f7fd03286e1cd128a3e25591195b25f8efc472 gencode/docs/data_template.html
69c8b50030bc0bdf266f0fbfb7b42b1b8a83d93a3e6d6cd0d9e5052292a52dd0 gencode/docs/event.html
650307c3419833aff9db3b0304258489ef84db1fbff5fbb3ceb3011eabdda961 gencode/docs/event_discovery.html
2a8d51c8bc21af55a1ed973b1b2f27c356d6c660f28bab13cdecf5285d13373b gencode/docs/event.html
b36a53e81b65975f741bfc84563d8db188f6c6181fe8e0309cb40165f33d6b22 gencode/docs/event_discovery.html
b9dde27aceea28283a4c51f8f9b74db72b305a06ff4f68c625b035dc86267f8c gencode/docs/event_mapping.html
f6ca85990e940f109a48e35b25102d8860e5707a7b2145412046f44d599ef635 gencode/docs/event_pointset.html
f849ebe1085d81fb0f16654b7c9d3d14c59b56b1c75154e100b85398694657fd gencode/docs/event_system.html
a4a99c4be9483e889c2d0d180d72d2ed332d587ac9305c7615da0e70fd55a56d gencode/docs/event_validation.html
f322770ed1b3d4c75a824739db79ad1b66dcd081506f5cbca3fa1cd6c639ed5d gencode/docs/metadata.html
b85cba5453c6cd7fe576c418d9119d494e9fa85b9d171c5389cd8fab6b299786 gencode/docs/metadata.html
93bfecd5facd0ead4c75a90f350fa715e6fb8bdab71d81b1f3e46994f03c1c2e gencode/docs/monitoring.html
c7f9d53dcf8a192556a8dd9a3d0f3bab57c0bfe71552da7627ceabd9a55c6fe8 gencode/docs/persistent_device.html
5973d5653584078a947b1cbfba0b2b9ab39881b63ecc66bae2a30d1a8eba28c4 gencode/docs/persistent_device.html
5d039d607af9ec75ee552dfe36b16c702687ea16f5663f41fc49b4533b86e00d gencode/docs/properties.html
6590dd7c0a4ec1b94273435e8f60b50b7789427f30c41d6d2051048fa897b81b gencode/docs/query_cloud.html
17926cbeea31e21766680be7c6e503897929cdf3f779db3ada9e41f2cd765cdb gencode/docs/query_cloud.html
55115bf72d62f7fc2f5deabc3133b7a2b39081c43ff2fa900029f6927597f70a gencode/docs/readme.md
741b880216be3743f6747800a042f2dbd89f3b0344c6b0a965f4bc010f03a930 gencode/docs/schema_doc.css
878ea88206c974f40643c3cc430875f9c4e8c5e3fd6bcd6358bd3eb6d48699a9 gencode/docs/schema_doc.min.js
Expand All @@ -40,22 +40,21 @@ fcbed49f1af8b791d8c52bcbe18f65521a79d9ac3eb33ec3afd9b342ab2bfc56 gencode/java/u
0a4f6bcd5065418c1cdc6c05b900b3de31744847d25b6ab6de7aabb1e724710e gencode/java/udmi/schema/BuildingTranslation.java
0c133f64013d5f2c4be203708def7ae11be631e90d5992222d6b4c97eef2573e gencode/java/udmi/schema/CapabilityValidationState.java
ec164962f2f00924ecb41ae07c2e01d6bf027951ccc605e0210988370b987973 gencode/java/udmi/schema/Category.java
f6a557eb73dfa077d7c5daf897bde345c7403232808608c39e24a0cbee2755c9 gencode/java/udmi/schema/CloudModel.java
39e093249eacaf4ebda318123bf509c42250a03f2a93e41c907fffe06c7d925a gencode/java/udmi/schema/CloudQuery.java
0b7001efbd1729710f91f4feaaa7707bb39e3b5f4486d88fcbf9463597b0660b gencode/java/udmi/schema/CloudModel.java
5fe3c216af47f0dcfad7030280548de00859d1788233ccbbfd5bf1885c7ed973 gencode/java/udmi/schema/CloudQuery.java
377eb78de936317676faaf7ec5a32ad17f2c2c54a3280df87f5fcc2d36c7014d gencode/java/udmi/schema/Config.java
cf9762392e02b5d04c6498963222cc0c00f7be6c3cd82bde3d063a5eceba2b65 gencode/java/udmi/schema/Connections.java
8164e93ccc76d78548d456890e064df8427a09bbcd50686b37a10d3ff5ad429f gencode/java/udmi/schema/Credential.java
a88865e2260d532380323e4679be87f50fa0f48d48b337ded2213060ecf7470f gencode/java/udmi/schema/DeviceDiscovery.java
10d67bf2080403fd196f63097e4ce2151edaafe3cf4ac77598ef83e06f94cb05 gencode/java/udmi/schema/DeviceMappingConfig.java
5ffb3bf92436c469eee16fe1e472efc89d1c466785be6ce30148188439314afe gencode/java/udmi/schema/DeviceMappingState.java
9b3e011019ecd3bd2c7b64714c6c30d765e879d7ab00f9cddb212dd3f51502eb gencode/java/udmi/schema/DevicePersistent.java
d4a82e132b2d223c4a82384d22455283c0b64aba3100fc210e72f9700b9df2d0 gencode/java/udmi/schema/DeviceValidationEvent.java
73399ed2459902c3d81e95fde2caa5033c76f8cfd89e96338c8923529763e52c gencode/java/udmi/schema/DiscoveryCommand.java
8a92ae5440b6beeb5965c836a36207bc0db0c8d5af4bc4d297c414703815db78 gencode/java/udmi/schema/DiscoveryConfig.java
b318d39cc2fbd62ec23bb2ade8741920f0b3014a1156bd407c6ff6d1dfc76a86 gencode/java/udmi/schema/DiscoveryEvent.java
ff327fb6ec2831b1087ff97a2ad72515afabc3bd6f10d70ab1928c8dedf34215 gencode/java/udmi/schema/DiscoveryEvent.java
ea90103e88db5d2413bfd2f87bf13dbb9024a8028504766af828e95ceec38b7e gencode/java/udmi/schema/DiscoveryModel.java
b632725290607273c7796d0b73ad8cead3a249217b1c158897c40acd224d7cda gencode/java/udmi/schema/DiscoveryState.java
485c99987dd08638d439dea785758a06b902d29ba628bb68beb3f1ff45a47386 gencode/java/udmi/schema/EndpointConfiguration.java
2c0dfcd05efc27247cd851121b267dbde1c956cda48d06b43e595f61f11034b0 gencode/java/udmi/schema/EndpointConfiguration.java
dc25e685886e11a741418be9191a478e13c0244647b5a0cac65d6c1e55055578 gencode/java/udmi/schema/Entry.java
aa39553b6498bcc2876a525b24b7797c860a4d6deb5c3b4b48312383333d6270 gencode/java/udmi/schema/Enumerate.java
8a51984458d96d1798d067005902defa57410167a27dcfb0b730ea38a3326011 gencode/java/udmi/schema/Envelope.java
Expand Down Expand Up @@ -106,7 +105,6 @@ ca2e7566106818ca7e5190c8041eb86f0c9b3251b0bda8c3ea7ce11a0c891a0a gencode/java/u
3df66bb1a37a9e0b2b6cf392f8c64d404a73c83e5e13c02bb4844f09b9a04b70 gencode/java/udmi/schema/Properties.java
d5e11dc354995681b894bcb62e4e21da7f0be68aaa3643a3dc5aa13610741f29 gencode/java/udmi/schema/PubberConfiguration.java
8e0490eed4499749b422ffde98a9588a597e8860b74dedae979abdb22f94c38a gencode/java/udmi/schema/PubberOptions.java
eebd8dcf8a37b85fc5c3c8c0f4d164f6b58fd7822cba595d9a2f31c228144300 gencode/java/udmi/schema/RegistryDiscovery.java
01df260ecaa5c396045931756ff02f8ec65321908bd08b25cecd7d6086825fef gencode/java/udmi/schema/SchemaValidationState.java
77067279077ed48dddfd53f930ba37567b5bc2555e1a4a7808eeba82d211584f gencode/java/udmi/schema/SequenceValidationState.java
9da49b22341a65580d085fd9d00eaadcaefcf7b813988ef844c617aa4b8a9a4f gencode/java/udmi/schema/SetupUdmiConfig.java
Expand All @@ -115,7 +113,7 @@ d67a313587648034d5423dc7ea0c6d6a46149a33086a4deec79ee3eb3af65410 gencode/java/u
47ad54328160a1aabce719a3263d4bfea903e8e8255e04a54ace86eb095b0f0c gencode/java/udmi/schema/StateSystemHardware.java
c9b920d355e5f6350fa6eb978afbfe55dd1438df171d2ea215845d5ac0b3e7e9 gencode/java/udmi/schema/StateSystemOperation.java
93d8e8acf53b3c84c8169003f405165893546ddb8ccf8750d061ecf3f9999b57 gencode/java/udmi/schema/SystemConfig.java
6f7b213970bfe2b1ac3056b83da8c8f5b4c50eac221dc1d6c6887e193e8bf40c gencode/java/udmi/schema/SystemDiscoveryEvent.java
d7354f654c0735596ba27b0d0bccdf7a6e3f1aaac3cac3c5773268838427298b gencode/java/udmi/schema/SystemDiscoveryData.java
0f67f25404460b8dc39486bab8a538f362979e15ace015ca53a931d934f11c31 gencode/java/udmi/schema/SystemEvent.java
2cf23174ef4e2876511fb471d3f9fcb5cefe2fde324db844c2d0d505fd2c8844 gencode/java/udmi/schema/SystemHardware.java
e657fce78cbce01fa4747f1da62dc0442b20ec2d1c196b6e56f3dd465c078ad4 gencode/java/udmi/schema/SystemModel.java
Expand All @@ -129,7 +127,7 @@ e657fce78cbce01fa4747f1da62dc0442b20ec2d1c196b6e56f3dd465c078ad4 gencode/java/u
d54631f8bada01ffecf34361891ee52d41786b1289ce56a9edb696b6ad2d3ace gencode/java/udmi/schema/ValidationState.java
e007ddd1ceeae3603c85110c33e1bb4a418ff9c7a791ca0df25b7ea3caeafd36 gencode/java/udmi/schema/ValidationSummary.java
b77d953fd22e655c0f10ae32deeaa222769d971f8c38b3379eba45720fb910cc gencode/java/udmi/schema/VirtualEquipmentLinks.java
fe4cf4ca2f2db0da2818ef47a9ba2deef79cc763806e959123e419d7bccbcec9 gencode/python/udmi/schema/__init__.py
2c9b1ae1068b0df64dc2b9f91ff95dcdb8c4ad25b8986f57626a2159eca645fc gencode/python/udmi/schema/__init__.py
25ae570fe5a988fd98a112fde81ceea440efb16b93dee58619fa532d98270879 gencode/python/udmi/schema/access_iot.py
4b25dd95f863059b761269f93adcae7049507924a1c6e74d6856849203c179db gencode/python/udmi/schema/ancillary_properties.py
dab4f5fca272ec48c2881bca2b6bc43786ada47fa1f6dd935c35f7ce0eb6b0f6 gencode/python/udmi/schema/building_translation.py
Expand All @@ -151,23 +149,21 @@ ac3facbd96f7cb2f7e387e7497d6a36af379a2687329571f250c5670f9933244 gencode/python
7da3bdb37f338260d5f3829fa5fcbb9bbf9f146b514a68319c314a96c6b8ac12 gencode/python/udmi/schema/config_system.py
cce623b34fd694880039a1c080214c33e00acaef5bc72276cf11a3bb2de40000 gencode/python/udmi/schema/config_system_testing.py
30b1809e364cb3f7070002bb4a9954b11b25543b099b4bbe450d280001e4de55 gencode/python/udmi/schema/config_udmi.py
0e3a99d1ad748319b31b8d88d85dbcdfb7ae060612b5740e64492eac4271ca3c gencode/python/udmi/schema/configuration_endpoint.py
f8c663748b6ea1c9542c789fed90a3b6d123dc20a35588da3f84545ab1908741 gencode/python/udmi/schema/configuration_endpoint.py
14fd646b9a8638b87e4c421c9dadfb7ed2e66ad02b256217423e3b5dd6c39fd1 gencode/python/udmi/schema/configuration_execution.py
afc89a204d7099791303cf9231b19cc6ba320d1de95a921381f5e47bbafac842 gencode/python/udmi/schema/configuration_pod.py
c61ee66daa7e632850bc2705370baa8c057e7a34792c6a29b9e4ca00c0eb195b gencode/python/udmi/schema/configuration_pod_base.py
ef61eea743cc2629893b18411636672cdfec0e209e58eb7918b33b43edab5196 gencode/python/udmi/schema/configuration_pod_bridge.py
bed77c13436a192047a0dcdcaea7c5d7175e99a76c6c40409cce9e232ab5bc12 gencode/python/udmi/schema/configuration_pubber.py
b44731d5c3067577b3dfe941bd7d578b3c96aa36c7b55bdf4034a1e38d934317 gencode/python/udmi/schema/data_template.py
23aec441e0761f9067030fa1a757c3921c4dd2906758b9e1f00b67b903be7be4 gencode/python/udmi/schema/discovery_device.py
80fc56594a2a0696d325e5e2ac1b4e3058c1533267e87181177356c9b99e7085 gencode/python/udmi/schema/discovery_family.py
eebb10ed73e4046ee2c5a271219b9547751835a15069968790ab44580a7225f7 gencode/python/udmi/schema/discovery_feature.py
bd132b930f41bbcfbb4726627d14361d4a73ecc3b44782b62c7940774a8095b7 gencode/python/udmi/schema/discovery_point.py
7ad6dc56aaa013f76186a64841db082e3e72fd7dea535fed794c4ee9bcf83dba gencode/python/udmi/schema/discovery_registry.py
fbb4b2c04c170c0da5cdd868612429fe920e44b591fcad2522b2e047d580d537 gencode/python/udmi/schema/entry.py
5b9982e15ff770bc5af75b7891285aec956e873c9a855a29ea2122314a2b76c0 gencode/python/udmi/schema/envelope.py
ed8ace0196c5e99d20778cb4210aa88cfe44a5e4539af98a1e194b9a71fa538e gencode/python/udmi/schema/equipment_translation.py
1eb9019b9d0b4ff7de2df8beb625a4f89292d636ece0c02f160495c537bd6c2c gencode/python/udmi/schema/event.py
887f21dcc3a36fe8f3dd4cbd0cece1f28dfa33c6230fc6d6e9f888b3015ed263 gencode/python/udmi/schema/event_discovery.py
6f39279859a11162f1bbed2743793bc9c923b49b19e356d7f8f948a883f1767f gencode/python/udmi/schema/event_discovery.py
dd30f748b5321223933c272d58f5fa6dc319912737255170322f0df3244732a7 gencode/python/udmi/schema/event_mapping.py
6163270aa726ef29bc9285d224ec5c2611aab5d19f6ed09d711e6c816fc7e467 gencode/python/udmi/schema/event_mapping_entities.py
3652a73a7df2d9df18a45b72d948c38a84a61e008d7543d006dad1832640c54f gencode/python/udmi/schema/event_mapping_entity.py
Expand All @@ -177,7 +173,7 @@ dd30f748b5321223933c272d58f5fa6dc319912737255170322f0df3244732a7 gencode/python
4361f48caba6a948a5916f67c8168215721cb3cc2384649f0336804785f01f1d gencode/python/udmi/schema/event_validation.py
633c85b0999d969310918bb03e9a40a08960f420b862340045a0290f8f5c4fe5 gencode/python/udmi/schema/event_validation_device.py
0936dcf3fdd01ef7e7a4d9938dae46acc109e3894acdbe0f4fb700bdbae78405 gencode/python/udmi/schema/metadata.py
8324124d37edc203800ec722b6eb2d4b3baef836bd4bd72c221b499b8a4bd125 gencode/python/udmi/schema/model_cloud.py
edf4d3cc34ba480f8850e619f8e3c23d2acd8cdcc591e65de85fda9bad400c30 gencode/python/udmi/schema/model_cloud.py
387e3f68dad9ddd6211a4e10d25c35026a4c0083b606819fdb4e338be9e135ca gencode/python/udmi/schema/model_discovery.py
cead43bbefcc2d957bf8316560edf849d74df9270f9473d87c2a3bdf61f08332 gencode/python/udmi/schema/model_discovery_family.py
bef91798566798ec70b2fe10ae52c909090de9095b92e2567da3cbdcec29cd2c gencode/python/udmi/schema/model_features.py
Expand All @@ -195,7 +191,7 @@ b48ae013d203eb31cc388a084c0cc6f93d4d5534336d4da2ecbccd84a085ea2b gencode/python
26da2bca967fc7d5179e41e07cfa5da8b1019dd28bf55b68d89193b831b064cd gencode/python/udmi/schema/options_pubber.py
6c5f3dd1c5ca9d821e3c48298af118fc7eafd97af9265dfd34b2ed8642efca77 gencode/python/udmi/schema/persistent_device.py
a58f8c98e837a5b56126ca0f410e02f1e9cfcd80a8cb429e0ef522defab1f690 gencode/python/udmi/schema/properties.py
09e521dc53b8435a34dd5439f9818e0db08c80da8e1800fac522c884de14fc93 gencode/python/udmi/schema/query_cloud.py
a84e00db471b2038a473c2c83d72ea59b02c3d2bab56d38bc22435309f01e763 gencode/python/udmi/schema/query_cloud.py
e604cf0280fe772de5f4e5ecf10dc6c564b6177eeff9cd9fb8b385af8fe10a95 gencode/python/udmi/schema/state.py
4a908cee3fb8afb559bcbfa594e57dbc515a35e4468e02600751b2fcce05a238 gencode/python/udmi/schema/state_blobset.py
182e07b534403dcc121d980672e41b0fa2ee55c4da1f5c56f0dad5d599450c80 gencode/python/udmi/schema/state_blobset_blob.py
Expand Down
47 changes: 0 additions & 47 deletions bin/pull_message

This file was deleted.

48 changes: 48 additions & 0 deletions bin/pull_messages
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash -e
#
# For simple debugging, just run in a shell loop:
# while true; do bin/pull_message PROJECT_ID; done
#

ROOT=$(realpath $(dirname $0)/..)

kubectl config current-context | tr _ ' ' > /tmp/namespace_tmp
# Result is something like: gke bos-platform-dev us-central1 main grafnu
read < /tmp/namespace_tmp gcp project_id region cluster namespace

subscription=$namespace~debug
tmp_file=/tmp/captured.json

while true; do
gcloud --format=json --project=$project_id pubsub subscriptions pull $subscription --auto-ack > $tmp_file || true

subType=$(jq -r '.[0].message.attributes.subType' $tmp_file 2> /dev/null)
subFolder=$(jq -r '.[0].message.attributes.subFolder' $tmp_file 2> /dev/null)
deviceId=$(jq -r '.[0].message.attributes.deviceId' $tmp_file 2> /dev/null)
registryId=$(jq -r '.[0].message.attributes.deviceRegistryId' $tmp_file 2> /dev/null)
timestamp=$(jq -r '.[0].message.publishTime' $tmp_file 2> /dev/null)
raw_data=$(jq -r .[0].message.data $tmp_file)
# There's two different base64 formats, so replace - with + to handle both.
data=$(echo $raw_data | tr - + | base64 --decode)

if [[ $raw_data == null ]]; then
continue
fi

if [[ -z $data ]]; then
echo Bad/empty message data: $raw_data
fi

if [[ $subType == null ]]; then
subType=event
fi

if [[ $subFolder != null ]]; then
out_file=$ROOT/out/registries/$registryId/devices/$deviceId/${timestamp}_${subFolder}_${subType}.json
echo $out_file
mkdir -p $(dirname $out_file)
echo $data | jq . > $out_file
else
echo No matching messages found.
fi
done
6 changes: 5 additions & 1 deletion common/src/main/java/com/google/udmi/util/GeneralUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,11 @@ public static void setClockSkew(Duration skew) {
}

public static Date getNow() {
return Date.from(Instant.now().plus(clockSkew));
return Date.from(instantNow());
}

public static Instant instantNow() {
return Instant.now().plus(clockSkew);
}

public static String getTimestamp() {
Expand Down
34 changes: 34 additions & 0 deletions gencode/docs/configuration_endpoint.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3f659b8

Please sign in to comment.