55[ ![ License: MIT] ( https://img.shields.io/github/license/fiware/tutorials.Short-Term-History.svg )] ( https://opensource.org/licenses/MIT )
66[ ![ NGSI v1] ( https://img.shields.io/badge/NGSI-v1-ff69b4.svg )] ( http://forge.fiware.org/docman/view.php/7/3213/FI-WARE_NGSI_RESTful_binding_v1.0.zip )
77[ ![ Support badge] ( https://img.shields.io/badge/tag-fiware-orange.svg?logo=stackoverflow )] ( https://stackoverflow.com/questions/tagged/fiware )
8- <br />
9- [ ![ Documentation] ( https://img.shields.io/readthedocs/fiware-tutorials.svg )] ( https://fiware-tutorials.rtfd.io )
8+ <br /> [ ![ Documentation] ( https://img.shields.io/readthedocs/fiware-tutorials.svg )] ( https://fiware-tutorials.rtfd.io )
109
1110<!-- prettier-ignore -->
1211
@@ -25,7 +24,7 @@ IoT センサをアクティブにし、それらのセンサからの測定値
2524
2625[ ![ Run in Postman] ( https://run.pstmn.io/button.svg )] ( https://app.getpostman.com/run-collection/4824d3171f823935dcab )
2726
28- ## 内容
27+ ## コンテンツ
2928
3029<details >
3130<summary >詳細 <b >(クリックして拡大)</b ></summary >
@@ -243,7 +242,7 @@ Broker に接続されます。使用しているアーキテクチャとプロ
243242
244243** Docker Compose** は、マルチコンテナ Docker アプリケーションを定義して実行する
245244ためのツールです
246- 。[ YAML file] ( https://github.com/FIWARE/tutorials.Short-Term-History/tree/master /docker-compose )
245+ 。[ YAML file] ( https://github.com/FIWARE/tutorials.Short-Term-History/tree/NGSI-v2 /docker-compose )
247246ファイルは、アプリケーションのために必要なサービスを構成するために使用します。つ
248247まり、すべてのコンテナ・サービスは 1 つのコマンドで呼び出すことができます
249248。Docker Compose は、デフォルトで Docker for Windows と Docker for Mac の一部と
@@ -259,7 +258,7 @@ docker-compose -v
259258docker version
260259```
261260
262- Docker バージョン 18.03 以降と Docker Compose 1.29 以上を使用していることを確認
261+ Docker バージョン 20.10 以降と Docker Compose 1.29 以上を使用していることを確認
263262し、必要に応じてアップグレードしてください。
264263
265264<a name =" cygwin-for-windows " ></a >
@@ -550,8 +549,7 @@ curl -iX POST \
550549 },
551550 "attrs": [
552551 "luminosity"
553- ],
554- "attrsFormat": "legacy"
552+ ]
555553 },
556554 "throttling": 5
557555}'
@@ -1057,7 +1055,8 @@ curl -X GET \
10571055 "offset": 22,
10581056 "samples": 5,
10591057 "min": 1855
1060- }, ..etc
1058+ },
1059+ ...etc
10611060 ]
10621061 }
10631062 ]
@@ -1400,12 +1399,11 @@ curl -iX POST \
14001399 },
14011400 "notification": {
14021401 "http": {
1403- "url": "http://cygnus:5050 /notify"
1402+ "url": "http://cygnus:5051 /notify"
14041403 },
14051404 "attrs": [
14061405 "count"
1407- ],
1408- "attrsFormat": "legacy"
1406+ ]
14091407 }
14101408}'
14111409` ` `
@@ -1455,12 +1453,11 @@ curl -iX POST \
14551453 },
14561454 "notification": {
14571455 "http": {
1458- "url": "http://cygnus:5050 /notify"
1456+ "url": "http://cygnus:5051 /notify"
14591457 },
14601458 "attrs": [
14611459 "luminosity"
1462- ],
1463- "attrsFormat": "legacy"
1460+ ]
14641461 },
14651462 "throttling": 5
14661463}'
@@ -1498,9 +1495,8 @@ curl -iX POST \
14981495
14991496` ` ` javascript
15001497function readCometLampLuminosity(id, aggMethod) {
1501- return new Promise(function(resolve, reject) {
1502- const url =
1503- "http://sth-comet:8666/STH/v1/contextEntities/type/Lamp/id/Lamp:001/attributes/luminosity";
1498+ return new Promise(function (resolve, reject) {
1499+ const url = "http://sth-comet:8666/STH/v1/contextEntities/type/Lamp/id/Lamp:001/attributes/luminosity";
15041500 const options = {
15051501 method: "GET",
15061502 url: url,
@@ -1523,12 +1519,10 @@ function cometToTimeSeries(cometResponse, aggMethod) {
15231519 const data = [];
15241520 const labels = [];
15251521
1526- const values =
1527- cometResponse.contextResponses[0].contextElement.attributes[0]
1528- .values[0];
1522+ const values = cometResponse.contextResponses[0].contextElement.attributes[0].values[0];
15291523 let date = moment(values._id.origin);
15301524
1531- _.forEach(values.points, element => {
1525+ _.forEach(values.points, ( element) => {
15321526 data.push({ t: date.valueOf(), y: element[aggMethod] });
15331527 labels.push(date.format("HH:mm"));
15341528 date = date.clone().add(1, "m");
@@ -1552,10 +1546,10 @@ function cometToTimeSeries(cometResponse, aggMethod) {
15521546高度な機能を追加することで、アプリケーションに複雑さを加える方法を知りたいですか
15531547?このシリーズ
15541548の[他のチュートリアル](https://www.letsfiware.jp/fiware-tutorials)を読むことで見
1555- つけることができます :
1549+ つけることができます
15561550
15571551---
15581552
15591553# # License
15601554
1561- [MIT](LICENSE) © 2018-2020 FIWARE Foundation e.V.
1555+ [MIT](LICENSE) © 2018-2022 FIWARE Foundation e.V.
0 commit comments