@things-factory/integration-base 6.2.44 → 6.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/engine/connector/operato-connector.js +10 -7
- package/dist-server/engine/connector/operato-connector.js.map +1 -1
- package/dist-server/engine/types.js.map +1 -1
- package/dist-server/service/scenario-instance/scenario-instance-mutation.js +15 -9
- package/dist-server/service/scenario-instance/scenario-instance-mutation.js.map +1 -1
- package/dist-server/service/scenario-instance/scenario-instance-type.js +2 -1
- package/dist-server/service/scenario-instance/scenario-instance-type.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/integration/connector/graphql-connector.ja.md +23 -0
- package/helps/integration/connector/graphql-connector.ko.md +23 -0
- package/helps/integration/connector/graphql-connector.ms.md +23 -0
- package/helps/integration/connector/graphql-connector.zh.md +23 -0
- package/helps/integration/connector/mqtt-connector.ja.md +17 -0
- package/helps/integration/connector/mqtt-connector.ko.md +17 -0
- package/helps/integration/connector/mqtt-connector.ms.md +17 -0
- package/helps/integration/connector/mqtt-connector.zh.md +17 -0
- package/helps/integration/connector/mssql-connector.ja.md +38 -0
- package/helps/integration/connector/mssql-connector.ko.md +38 -0
- package/helps/integration/connector/mssql-connector.ms.md +38 -0
- package/helps/integration/connector/mssql-connector.zh.md +38 -0
- package/helps/integration/connector/postgresql-connector.ja.md +34 -0
- package/helps/integration/connector/postgresql-connector.ko.md +34 -0
- package/helps/integration/connector/postgresql-connector.ms.md +34 -0
- package/helps/integration/connector/postgresql-connector.zh.md +34 -0
- package/helps/integration/connector/sqlite-connector.ja.md +17 -0
- package/helps/integration/connector/sqlite-connector.ko.md +17 -0
- package/helps/integration/connector/sqlite-connector.ms.md +17 -0
- package/helps/integration/connector/sqlite-connector.zh.md +17 -0
- package/helps/integration/task/book-up-scenario.ja.md +27 -0
- package/helps/integration/task/book-up-scenario.ko.md +27 -0
- package/helps/integration/task/book-up-scenario.md +21 -21
- package/helps/integration/task/book-up-scenario.ms.md +27 -0
- package/helps/integration/task/book-up-scenario.zh.md +27 -0
- package/helps/integration/task/csv-readline.ja.md +10 -0
- package/helps/integration/task/csv-readline.ko.md +10 -0
- package/helps/integration/task/csv-readline.md +5 -6
- package/helps/integration/task/csv-readline.ms.md +9 -0
- package/helps/integration/task/csv-readline.zh.md +9 -0
- package/helps/integration/task/data-mapper.ja.md +14 -0
- package/helps/integration/task/data-mapper.ko.md +14 -0
- package/helps/integration/task/data-mapper.md +11 -11
- package/helps/integration/task/data-mapper.ms.md +14 -0
- package/helps/integration/task/data-mapper.zh.md +14 -0
- package/helps/integration/task/database-query.ja.md +1 -1
- package/helps/integration/task/database-query.ko.md +1 -1
- package/helps/integration/task/database-query.md +1 -1
- package/helps/integration/task/database-query.ms.md +1 -1
- package/helps/integration/task/database-query.zh.md +1 -1
- package/helps/integration/task/empty-check.ja.md +10 -0
- package/helps/integration/task/empty-check.ko.md +10 -0
- package/helps/integration/task/empty-check.md +7 -7
- package/helps/integration/task/empty-check.ms.md +10 -0
- package/helps/integration/task/empty-check.zh.md +10 -0
- package/helps/integration/task/end.ja.md +7 -0
- package/helps/integration/task/end.ko.md +3 -0
- package/helps/integration/task/end.md +6 -2
- package/helps/integration/task/end.ms.md +7 -0
- package/helps/integration/task/end.zh.md +7 -0
- package/helps/integration/task/floating-point.ja.md +34 -0
- package/helps/integration/task/floating-point.ko.md +34 -0
- package/helps/integration/task/floating-point.md +1 -1
- package/helps/integration/task/floating-point.ms.md +34 -0
- package/helps/integration/task/floating-point.zh.md +34 -0
- package/helps/integration/task/goto.ja.md +8 -0
- package/helps/integration/task/goto.ko.md +8 -0
- package/helps/integration/task/goto.md +4 -4
- package/helps/integration/task/goto.ms.md +8 -0
- package/helps/integration/task/goto.zh.md +8 -0
- package/helps/integration/task/graphql-mutate.ja.md +1 -1
- package/helps/integration/task/graphql-mutate.ko.md +1 -1
- package/helps/integration/task/graphql-mutate.md +1 -1
- package/helps/integration/task/graphql-mutate.ms.md +1 -1
- package/helps/integration/task/graphql-mutate.zh.md +1 -1
- package/helps/integration/task/graphql-query.ja.md +1 -1
- package/helps/integration/task/graphql-query.ko.md +1 -1
- package/helps/integration/task/graphql-query.md +1 -1
- package/helps/integration/task/graphql-query.ms.md +1 -1
- package/helps/integration/task/graphql-query.zh.md +1 -1
- package/helps/integration/task/headless-scrap.ja.md +13 -0
- package/helps/integration/task/headless-scrap.ko.md +13 -0
- package/helps/integration/task/headless-scrap.md +10 -10
- package/helps/integration/task/headless-scrap.ms.md +13 -0
- package/helps/integration/task/headless-scrap.zh.md +13 -0
- package/helps/integration/task/http-get.ja.md +1 -1
- package/helps/integration/task/http-get.ko.md +1 -1
- package/helps/integration/task/http-get.md +1 -1
- package/helps/integration/task/http-get.ms.md +1 -1
- package/helps/integration/task/http-get.zh.md +1 -1
- package/helps/integration/task/http-post.ja.md +1 -1
- package/helps/integration/task/http-post.ko.md +1 -1
- package/helps/integration/task/http-post.md +1 -1
- package/helps/integration/task/http-post.ms.md +1 -1
- package/helps/integration/task/http-post.zh.md +1 -1
- package/helps/integration/task/local-graphql-mutate.ja.md +43 -0
- package/helps/integration/task/local-graphql-mutate.ko.md +44 -0
- package/helps/integration/task/local-graphql-mutate.md +10 -14
- package/helps/integration/task/local-graphql-mutate.ms.md +40 -0
- package/helps/integration/task/local-graphql-mutate.zh.md +40 -0
- package/helps/integration/task/local-graphql-query.ja.md +42 -0
- package/helps/integration/task/local-graphql-query.ko.md +44 -0
- package/helps/integration/task/local-graphql-query.md +10 -14
- package/helps/integration/task/local-graphql-query.ms.md +41 -0
- package/helps/integration/task/local-graphql-query.zh.md +40 -0
- package/helps/integration/task/log.ja.md +1 -1
- package/helps/integration/task/log.ko.md +1 -1
- package/helps/integration/task/log.md +1 -1
- package/helps/integration/task/log.ms.md +1 -1
- package/helps/integration/task/log.zh.md +1 -1
- package/helps/integration/task/mqtt-publish.ja.md +10 -0
- package/helps/integration/task/mqtt-publish.ko.md +10 -0
- package/helps/integration/task/mqtt-publish.md +7 -7
- package/helps/integration/task/mqtt-publish.ms.md +10 -0
- package/helps/integration/task/mqtt-publish.zh.md +10 -0
- package/helps/integration/task/mqtt-subscribe.ja.md +15 -0
- package/helps/integration/task/mqtt-subscribe.ko.md +15 -0
- package/helps/integration/task/mqtt-subscribe.md +12 -12
- package/helps/integration/task/mqtt-subscribe.ms.md +15 -0
- package/helps/integration/task/mqtt-subscribe.zh.md +15 -0
- package/helps/integration/task/oracle-procedure.ja.md +1 -1
- package/helps/integration/task/oracle-procedure.ko.md +1 -1
- package/helps/integration/task/oracle-procedure.md +1 -1
- package/helps/integration/task/oracle-procedure.ms.md +1 -1
- package/helps/integration/task/oracle-procedure.zh.md +1 -1
- package/helps/integration/task/pick-pending-scenario.ja.md +13 -0
- package/helps/integration/task/pick-pending-scenario.ko.md +13 -0
- package/helps/integration/task/pick-pending-scenario.md +10 -10
- package/helps/integration/task/pick-pending-scenario.ms.md +13 -0
- package/helps/integration/task/pick-pending-scenario.zh.md +13 -0
- package/helps/integration/task/publish.ja.md +16 -0
- package/helps/integration/task/publish.ko.md +16 -0
- package/helps/integration/task/publish.md +10 -10
- package/helps/integration/task/publish.ms.md +16 -0
- package/helps/integration/task/publish.zh.md +16 -0
- package/helps/integration/task/random.ja.md +13 -0
- package/helps/integration/task/random.ko.md +13 -0
- package/helps/integration/task/random.md +9 -9
- package/helps/integration/task/random.ms.md +13 -0
- package/helps/integration/task/random.zh.md +13 -0
- package/helps/integration/task/script.ja.md +1 -1
- package/helps/integration/task/script.ko.md +1 -1
- package/helps/integration/task/script.md +1 -1
- package/helps/integration/task/script.ms.md +1 -1
- package/helps/integration/task/script.zh.md +1 -1
- package/helps/integration/task/set-domain.ja.md +25 -0
- package/helps/integration/task/set-domain.ko.md +25 -0
- package/helps/integration/task/set-domain.md +12 -12
- package/helps/integration/task/set-domain.ms.md +25 -0
- package/helps/integration/task/set-domain.zh.md +25 -0
- package/helps/integration/task/sleep.ja.md +8 -0
- package/helps/integration/task/sleep.ko.md +8 -0
- package/helps/integration/task/sleep.md +5 -5
- package/helps/integration/task/sleep.ms.md +8 -0
- package/helps/integration/task/sleep.zh.md +8 -0
- package/helps/integration/task/state-read.ja.md +1 -1
- package/helps/integration/task/state-read.ms.md +1 -1
- package/helps/integration/task/state-read.zh.md +1 -1
- package/helps/integration/task/state-write.ja.md +1 -1
- package/helps/integration/task/state-write.ms.md +1 -1
- package/helps/integration/task/state-write.zh.md +1 -1
- package/helps/integration/task/throw.ja.md +12 -0
- package/helps/integration/task/throw.ko.md +12 -0
- package/helps/integration/task/throw.md +10 -10
- package/helps/integration/task/throw.ms.md +12 -0
- package/helps/integration/task/throw.zh.md +12 -0
- package/helps/integration/task/variables.ja.md +37 -0
- package/helps/integration/task/variables.ko.md +37 -0
- package/helps/integration/task/variables.md +11 -11
- package/helps/integration/task/variables.ms.md +37 -0
- package/helps/integration/task/variables.zh.md +37 -0
- package/package.json +7 -7
- package/server/engine/connector/operato-connector.ts +23 -5
- package/server/engine/types.ts +1 -0
- package/server/service/scenario-instance/scenario-instance-mutation.ts +28 -9
- package/server/service/scenario-instance/scenario-instance-type.ts +2 -1
- /package/helps/integration/connector/{operato-connector.kr.md → operato-connector.ko.md} +0 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# book-up-scenario
|
2
|
+
|
3
|
+
Ini adalah tugasan untuk menambahkan senario yang ditangguhkan ke dalam [barisan menunggu](../concept/pending-queue.md).
|
4
|
+
|
5
|
+
## Parameter
|
6
|
+
|
7
|
+
- Senario
|
8
|
+
- Input yang diperlukan
|
9
|
+
- Pilih senario yang ditangguhkan untuk ditambahkan ke dalam [barisan menunggu](../concept/pending-queue.md).
|
10
|
+
- Tangguh
|
11
|
+
|
12
|
+
- Input yang diperlukan
|
13
|
+
- Tetapkan masa tangguh dalam satuan saat. Jika ditetapkan sebagai -1, ia boleh segera [diambil](./pick-pending-scenario.md) tanpa tangguh.
|
14
|
+
- Pembolehubah boleh digunakan pada nilai ini.
|
15
|
+
- Contoh
|
16
|
+
- -1 => Tiada tangguh
|
17
|
+
- 100 => 100 saat
|
18
|
+
- #{recipe} => Nilai hasil langkah 'resipi'
|
19
|
+
- #{pizza.cookingTime} => Nilai masa memasak data hasil langkah 'pizza'
|
20
|
+
|
21
|
+
- Keutamaan
|
22
|
+
- Tetapkan keutamaan senario yang ditangguh. Nilai lalai adalah 0.
|
23
|
+
- Pembolehubah
|
24
|
+
- Tetapkan nilai [pencapai](../concept/data-accessor.md) yang akan dipindahkan sebagai pembolehubah ke dalam senario.
|
25
|
+
- Tag
|
26
|
+
- Tetapkan tag yang melekat pada senario.
|
27
|
+
- Kerana senario yang dipesan dikelompokkan oleh nilai tag ini, mereka boleh dicari dalam fungsi pemantauan barisan senario dengan nilai tag ini.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# book-up-scenario
|
2
|
+
|
3
|
+
这是一个将延迟场景添加到[挂起队列](../concept/pending-queue.md)的任务。
|
4
|
+
|
5
|
+
## 参数
|
6
|
+
|
7
|
+
- 场景
|
8
|
+
- 必填项
|
9
|
+
- 选择要添加到[挂起队列](../concept/pending-queue.md)的延迟场景。
|
10
|
+
- 延迟
|
11
|
+
|
12
|
+
- 必填项
|
13
|
+
- 以秒为单位指定延迟时间。如果设置为-1,则可以立即[pickup](./pick-pending-scenario.md)而无需延迟。
|
14
|
+
- 此值可以应用变量。
|
15
|
+
- 例子
|
16
|
+
- -1 => 无延迟
|
17
|
+
- 100 => 100秒
|
18
|
+
- #{recipe} => 'recipe'步骤的结果值
|
19
|
+
- #{pizza.cookingTime} => 'pizza'步骤结果数据的cookingTime值
|
20
|
+
|
21
|
+
- 优先级
|
22
|
+
- 指定延迟场景的优先级。默认值为0。
|
23
|
+
- 变量
|
24
|
+
- 设置作为场景变量传递的[访问器](../concept/data-accessor.md)的值。
|
25
|
+
- 标签
|
26
|
+
- 设置附加到场景的标签。
|
27
|
+
- 由于预订的场景是根据此标签值分组的,因此可以在场景队列监控功能中使用此标签值查询。
|
@@ -1,10 +1,9 @@
|
|
1
|
-
# csv-readline
|
1
|
+
# csv-readline
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
다음 스텝에서는 empty-check같은 태스크로 데이터가 더 이상 반환되지 않는 경우에 시나리오를 종료하는 등의 시나리오 구성을 할 수 있다.
|
3
|
+
This is a task that reads a given file in CSV format, one record at a time, and returns it as data.
|
4
|
+
Since no data is returned after the last line, in the next step, you can configure scenarios such as ending the scenario with tasks like empty-check when no more data is returned.
|
6
5
|
|
7
|
-
##
|
6
|
+
## Parameters
|
8
7
|
|
9
8
|
- path
|
10
|
-
-
|
9
|
+
- Enter the path information of the CSV file.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# csv-readline
|
2
|
+
|
3
|
+
Ini adalah tugasan yang membaca fail dalam format CSV yang diberikan, satu rekod pada satu masa, dan mengembalikannya sebagai data.
|
4
|
+
Kerana tiada data yang dikembalikan selepas baris terakhir, pada langkah seterusnya, anda boleh menyusun senario seperti mengakhiri senario dengan tugasan seperti pemeriksaan-kosong apabila tiada data lagi yang dikembalikan.
|
5
|
+
|
6
|
+
## Parameter
|
7
|
+
|
8
|
+
- path
|
9
|
+
- Masukkan maklumat laluan fail CSV.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# data-mapper
|
2
|
+
|
3
|
+
特定のアクセサの結果値を新しいデータに変換する機能を提供します。
|
4
|
+
既存データが単一オブジェクトであれば、新しいデータも単一オブジェクト形式に変換され、
|
5
|
+
既存データがオブジェクトの配列形式であれば、新しいデータもオブジェクトの配列形式で返されます。
|
6
|
+
|
7
|
+
## パラメータ
|
8
|
+
|
9
|
+
- [アクセサ](../concept/data-accessor.md)
|
10
|
+
- 変換したい対象データを設定します。
|
11
|
+
- マッピングルール
|
12
|
+
- 既存データを基に新しいデータを作成するルールを設定します。
|
13
|
+
- キー部分に設定された値は新しく作られるデータのキーになります。
|
14
|
+
- バリュー部分には既存データのキーを入力します。既存データのキーに対応する値が新しいデータの値になります。
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# data-mapper
|
2
|
+
|
3
|
+
특정 accessor의 결과 값을 새로운 데이터로 변환하는 기능을 제공한다.
|
4
|
+
기존 데이터가 단일 오브젝트이면 새로운 데이터도 단일 오브젝트 형태로 변환되며,
|
5
|
+
기존 데이터가 오브젝트의 배열 형태이면 새로운 데이터도 오브젝트의 배열 형태로 반환된다.
|
6
|
+
|
7
|
+
## parameters
|
8
|
+
|
9
|
+
- [accessor](../concept/data-accessor.md)
|
10
|
+
- 변환하고자 하는 대상 데이터를 설정한다.
|
11
|
+
- 매핑 규칙(mapping-rule)
|
12
|
+
- 기존 데이터를 기반으로 새로운 데이터를 만드는 규칙을 설정한다.
|
13
|
+
- key 부분에 설정된 값들은 새로 만들어질 데이터의 key들이 된다.
|
14
|
+
- value 부분에는 기존 데이터의 key를 입력한다. 기존 데이터의 key에 해당되는 값이 새로운 데이터의 값이 된다.
|
@@ -1,14 +1,14 @@
|
|
1
|
-
# data-mapper
|
1
|
+
# data-mapper
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Provides functionality to transform the result value of a specific accessor into new data.
|
4
|
+
If the existing data is a single object, the new data is also transformed into a single object form.
|
5
|
+
If the existing data is in the form of an array of objects, the new data is returned in the form of an array of objects as well.
|
6
6
|
|
7
|
-
##
|
7
|
+
## Parameters
|
8
8
|
|
9
|
-
- [
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
- key
|
14
|
-
- value
|
9
|
+
- [Accessor](../concept/data-accessor.md)
|
10
|
+
- Set the target data to be transformed.
|
11
|
+
- Mapping Rule
|
12
|
+
- Set the rule for creating new data based on existing data.
|
13
|
+
- The values set in the key part become the keys of the newly created data.
|
14
|
+
- In the value part, enter the key of the existing data. The value corresponding to the key of the existing data becomes the value of the new data.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# data-mapper
|
2
|
+
|
3
|
+
Menyediakan fungsi untuk menukar nilai hasil accessor tertentu ke dalam data baru.
|
4
|
+
Jika data sedia ada adalah objek tunggal, data baru juga ditukar menjadi bentuk objek tunggal.
|
5
|
+
Jika data sedia ada dalam bentuk rangkaian objek, data baru juga dikembalikan dalam bentuk rangkaian objek.
|
6
|
+
|
7
|
+
## Parameter
|
8
|
+
|
9
|
+
- [Accessor](../concept/data-accessor.md)
|
10
|
+
- Tetapkan data sasaran yang hendak ditransformasikan.
|
11
|
+
- Peraturan Pemetaan
|
12
|
+
- Tetapkan peraturan untuk membuat data baru berdasarkan data sedia ada.
|
13
|
+
- Nilai yang ditetapkan dalam bahagian kunci menjadi kunci data yang baru dibuat.
|
14
|
+
- Dalam bahagian nilai, masukkan kunci data sedia ada. Nilai yang sepadan dengan kunci data sedia ada menjadi nilai data baru.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# data-mapper
|
2
|
+
|
3
|
+
提供将特定访问器的结果值转换为新数据的功能。
|
4
|
+
如果现有数据是单一对象,则新数据也将转换为单一对象形式。
|
5
|
+
如果现有数据是对象数组形式,则新数据也将以对象数组形式返回。
|
6
|
+
|
7
|
+
## 参数
|
8
|
+
|
9
|
+
- [访问器](../concept/data-accessor.md)
|
10
|
+
- 设置要转换的目标数据。
|
11
|
+
- 映射规则
|
12
|
+
- 设置基于现有数据创建新数据的规则。
|
13
|
+
- 在键部分设置的值将成为新创建数据的键。
|
14
|
+
- 在值部分输入现有数据的键。与现有数据键相对应的值将成为新数据的值。
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# empty-check
|
1
|
+
# empty-check
|
2
2
|
|
3
|
-
|
3
|
+
This is a task that determines whether the result value of a specific accessor is empty, and if it is empty, jumps to the step specified by the 'goto' parameter.
|
4
4
|
|
5
|
-
##
|
5
|
+
## Parameters
|
6
6
|
|
7
|
-
- [
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
7
|
+
- [Accessor](../concept/data-accessor.md)
|
8
|
+
- Specify the target for determining whether it is empty.
|
9
|
+
- Goto
|
10
|
+
- Specify the name of the step to move to.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# empty-check
|
2
|
+
|
3
|
+
Ini adalah tugasan yang menentukan sama ada nilai hasil accessor tertentu kosong, dan jika kosong, melompat ke langkah yang ditentukan oleh parameter 'goto'.
|
4
|
+
|
5
|
+
## Parameter
|
6
|
+
|
7
|
+
- [Accessor](../concept/data-accessor.md)
|
8
|
+
- Tetapkan sasaran untuk menentukan sama ada kosong.
|
9
|
+
- Pergi ke
|
10
|
+
- Tetapkan nama langkah untuk berpindah.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# floating-point
|
2
|
+
|
3
|
+
IEEE 浮動小数点演算の標準 (IEEE 754)は、1985年に電気電子技術者協会 (IEEE) によって制定された浮動小数点演算の技術標準です。この標準は、信頼性が低く、移植性が低かったさまざまな浮動小数点の実装에서見られる多くの問題に対処しています。多くのハードウェア浮動小数点ユニットは IEEE 754 標準を使用しています。
|
4
|
+
|
5
|
+
## パラメータ
|
6
|
+
|
7
|
+
- [アクセサ](../concept/data-accessor.md)
|
8
|
+
- 処理する値を指定します。
|
9
|
+
- operation
|
10
|
+
- read : バッファから IEEE754 浮動小数点数を読み取る
|
11
|
+
- write : バッファに IEEE754 浮動小数点数を書き込む
|
12
|
+
- endian
|
13
|
+
- little : リトルエンディアン
|
14
|
+
- big : ビッグエンディアン
|
15
|
+
- float type
|
16
|
+
- float : 4バイトの単精度浮動小数点
|
17
|
+
- double : 8バイトの倍精度浮動小数点
|
18
|
+
|
19
|
+
## 疑似コード
|
20
|
+
|
21
|
+
```
|
22
|
+
const isLittleEndian = endian === 'little'
|
23
|
+
const nBytes = floatType === 'float' ? 4 : 8
|
24
|
+
const mantissa = floatType === 'float' ? 23 : 52
|
25
|
+
|
26
|
+
var result
|
27
|
+
|
28
|
+
if(operation == 'write') {
|
29
|
+
result = Buffer.alloc(nBytes)
|
30
|
+
ieee754.write(result, value, 0, isLittleEndian, mantissa, nBytes)
|
31
|
+
} else {
|
32
|
+
result = ieee754.read(value, 0, isLittleEndian, mantissa, nBytes)
|
33
|
+
}
|
34
|
+
```
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# floating-point
|
2
|
+
|
3
|
+
IEEE 부동 소수점 산술 표준 (IEEE 754)은 1985년에 IEEE (전기 전자 기술자 협회)에 의해 제정된 부동 소수점 산술 기술 표준입니다. 이 표준은 신뢰성 있고 이식성 있게 사용하기 어려운 다양한 부동 소수점 구현에서 발견된 많은 문제에 대해 다룹니다. 많은 하드웨어 부동 소수점 장치가 IEEE 754 표준을 사용합니다.
|
4
|
+
|
5
|
+
## 매개변수
|
6
|
+
|
7
|
+
- [Accessor](../concept/data-accessor.md)
|
8
|
+
- 처리할 값 지정
|
9
|
+
- operation
|
10
|
+
- read : 버퍼에서 IEEE754 부동 소수점 숫자 읽기
|
11
|
+
- write : 버퍼에 IEEE754 부동 소수점 숫자 쓰기
|
12
|
+
- endian
|
13
|
+
- little : 리틀 엔디안
|
14
|
+
- big : 빅 엔디안
|
15
|
+
- float type
|
16
|
+
- float : 4바이트 단일 정밀도 부동 소수점
|
17
|
+
- double : 8바이트 배정도 부동 소수점
|
18
|
+
|
19
|
+
## 의사 코드
|
20
|
+
|
21
|
+
```
|
22
|
+
const isLittleEndian = endian === 'little'
|
23
|
+
const nBytes = floatType === 'float' ? 4 : 8
|
24
|
+
const mantissa = floatType === 'float' ? 23 : 52
|
25
|
+
|
26
|
+
var result
|
27
|
+
|
28
|
+
if(operation == 'write') {
|
29
|
+
result = Buffer.alloc(nBytes)
|
30
|
+
ieee754.write(result, value, 0, isLittleEndian, mantissa, nBytes)
|
31
|
+
} else {
|
32
|
+
result = ieee754.read(value, 0, isLittleEndian, mantissa, nBytes)
|
33
|
+
}
|
34
|
+
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# floating-point
|
2
2
|
|
3
3
|
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portably. Many hardware floating-point units use the IEEE 754 standard.
|
4
4
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# floating-point
|
2
|
+
|
3
|
+
Piawai IEEE untuk Aritmetik Titik Terapung (IEEE 754) adalah piawai teknikal untuk aritmetik titik terapung yang ditetapkan pada tahun 1985 oleh Institut Jurutera Elektrik dan Elektronik (IEEE). Piawai ini menangani banyak masalah yang ditemui dalam pelbagai pelaksanaan titik terapung yang membuat penggunaan mereka sukar dipercayai dan mudah alih. Banyak unit titik terapung perkakasan menggunakan piawai IEEE 754.
|
4
|
+
|
5
|
+
## parameter
|
6
|
+
|
7
|
+
- [Accessor](../concept/data-accessor.md)
|
8
|
+
- tentukan nilai yang akan diproses
|
9
|
+
- operasi
|
10
|
+
- baca: Baca nombor titik terapung IEEE754 dari Buffer
|
11
|
+
- tulis: Tulis nombor titik terapung IEEE754 ke dalam Buffer
|
12
|
+
- endian
|
13
|
+
- little: little endian
|
14
|
+
- big: big endian
|
15
|
+
- jenis titik terapung
|
16
|
+
- float: 4 bait titik terapung presisi tunggal
|
17
|
+
- double: 8 bait titik terapung presisi berganda
|
18
|
+
|
19
|
+
## kod tiruan
|
20
|
+
|
21
|
+
```
|
22
|
+
const isLittleEndian = endian === 'little'
|
23
|
+
const nBytes = floatType === 'float' ? 4 : 8
|
24
|
+
const mantissa = floatType === 'float' ? 23 : 52
|
25
|
+
|
26
|
+
var result
|
27
|
+
|
28
|
+
if(operation == 'write') {
|
29
|
+
result = Buffer.alloc(nBytes)
|
30
|
+
ieee754.write(result, value, 0, isLittleEndian, mantissa, nBytes)
|
31
|
+
} else {
|
32
|
+
result = ieee754.read(value, 0, isLittleEndian, mantissa, nBytes)
|
33
|
+
}
|
34
|
+
```
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# floating-point
|
2
|
+
|
3
|
+
IEEE浮点数算术标准(IEEE 754)是由电气和电子工程师学会(IEEE)于1985年制定的浮点数算术技术标准。该标准解决了许多浮点实现中存在的问题,使它们难以可靠和可移植地使用。许多硬件浮点单元使用IEEE 754标准。
|
4
|
+
|
5
|
+
## 参数
|
6
|
+
|
7
|
+
- [访问器](../concept/data-accessor.md)
|
8
|
+
- 指定要处理的值
|
9
|
+
- 操作
|
10
|
+
- 读取:从缓冲区读取IEEE 754浮点数
|
11
|
+
- 写入:将IEEE 754浮点数写入缓冲区
|
12
|
+
- 字节序
|
13
|
+
- 小端:小端序
|
14
|
+
- 大端:大端序
|
15
|
+
- 浮点数类型
|
16
|
+
- float:4字节单精度浮点数
|
17
|
+
- double:8字节双精度浮点数
|
18
|
+
|
19
|
+
## 伪代码
|
20
|
+
|
21
|
+
```javascript
|
22
|
+
const isLittleEndian = endian === 'little'
|
23
|
+
const nBytes = floatType === 'float' ? 4 : 8
|
24
|
+
const mantissa = floatType === 'float' ? 23 : 52
|
25
|
+
|
26
|
+
var result
|
27
|
+
|
28
|
+
if(operation == 'write') {
|
29
|
+
result = Buffer.alloc(nBytes)
|
30
|
+
ieee754.write(result, value, 0, isLittleEndian, mantissa, nBytes)
|
31
|
+
} else {
|
32
|
+
result = ieee754.read(value, 0, isLittleEndian, mantissa, nBytes)
|
33
|
+
}
|
34
|
+
```
|