@vehicle-sil/gui-client 0.2.0 → 0.3.0
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/README.ja.md +10 -6
- package/README.md +10 -6
- package/dist/index.js +553 -391
- package/package.json +1 -1
- package/types/client.d.ts +3 -1
- package/types/front-actions.d.ts +2 -1
- package/types/front-types.d.ts +18 -1
- package/types/index.d.ts +3 -3
- package/types/protocol/server.d.ts +38 -3
- package/types/session-state.d.ts +15 -2
- package/types/session.d.ts +7 -1
- package/types/variables.d.ts +2 -0
package/README.ja.md
CHANGED
|
@@ -92,11 +92,11 @@ editor.setVisible(true);
|
|
|
92
92
|
|
|
93
93
|
### 正面の口
|
|
94
94
|
|
|
95
|
-
| 種類 | 名前
|
|
96
|
-
| ------ |
|
|
97
|
-
| 関数 | `connect(options?)`、`createFront(options)`、`watch(source, fn)`、`until(source, test, options?)`
|
|
98
|
-
| クラス | `ActionError`(`code`、`message`、`outcome`、`findings`)
|
|
99
|
-
| 型 | `ConnectOptions`(`base_url`、`token`、`origin`、`http`、`socket`、`answer_timeout_ms`、`on_error`)、`Front`(`low`、`status`、`clock`、`controls`、`scenario`、`outside`、`run`、`time`、`variable()`、`scenarios()`、`connections()`、`check()`、`readConfig()`、`describeAgain()`、`saveConfig()`、`close()`)、`FrontStatus`、`FrontResult`、`FrontClock`、`FrontControls`、`Control`、`Reason`、`FrontScenario`、`FrontRun`、`FrontTime`、`FrontVariable`、`VariableView`、`Intent`、`Outside`、`ConnectEntry`、`ConnectTarget`、`ConnectListError`、`Link`、`RunState`、`EndKind`、`Pacing`、`OperationName` |
|
|
95
|
+
| 種類 | 名前 |
|
|
96
|
+
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| 関数 | `connect(options?)`、`createFront(options)`、`watch(source, fn)`、`until(source, test, options?)` |
|
|
98
|
+
| クラス | `ActionError`(`code`、`message`、`outcome`、`findings`) |
|
|
99
|
+
| 型 | `ConnectOptions`(`base_url`、`token`、`origin`、`http`、`socket`、`answer_timeout_ms`、`on_error`)、`Front`(`low`、`status`、`clock`、`controls`、`scenario`、`runtime`、`outside`、`prepare()`、`configs()`、`recording()`、`run`、`time`、`variable()`、`scenarios()`、`connections()`、`check()`、`readConfig()`、`describeAgain()`、`saveConfig()`、`close()`)、`FrontStatus`、`FrontResult`、`FrontClock`、`FrontControls`、`Control`、`Reason`、`FrontScenario`、`FrontRun`、`FrontTime`、`FrontVariable`、`VariableView`、`Intent`、`Outside`、`ConnectEntry`、`ConnectTarget`、`ConnectListError`、`Link`、`RunState`、`EndKind`、`Pacing`、`OperationName`、`RuntimeStatus` |
|
|
100
100
|
|
|
101
101
|
### トークン
|
|
102
102
|
|
|
@@ -326,13 +326,17 @@ try {
|
|
|
326
326
|
| `clock` | `sim_ms`(仮想時間の ms。実行の前は `null`)、`speed`、`actual_speed`(直近のおよそ 1 秒に出た速さ。止まっている間と、始まった直後は `null`)、`pacing`(`not-paced`、`on-time`、`late`)。よく変わるので `status` と分けています |
|
|
327
327
|
| `controls` | 操作ごとの、いま使えるか: `start`、`stop`、`force_stop`、`pause`、`resume`、`step`(`min_ms` と `max_ms` つき)、`run_until`、`speed`(`min`、`max`、`fastest`(数のほかに `'max'` を受けるか)つき)、`save` |
|
|
328
328
|
| `scenario` | いまの(か最後の)実行のシナリオ: `file`、`name`、`status`、`steps`、`timeline_url`。シナリオのない実行では `null` |
|
|
329
|
+
| `runtime` | 常駐 hot / cold 実行の状態: `mode`、`state`、`config`、`reason`、`message` |
|
|
330
|
+
| `prepare(options?)` | 対応していれば `file` 用の常駐ランチャーを事前準備(`POST api/prepare`)し、非対応なら理由つきで `cold` を返す |
|
|
331
|
+
| `configs()` | サーバーの root 配下の構成ファイル一覧を取得する(`GET api/configs`) |
|
|
332
|
+
| `recording()` | いまの(か最後の)実行で反映された書き込みのシナリオ YAML(`GET api/recording`)、なければ `null` を返す |
|
|
329
333
|
| `outside` | 実行の `connect` が実機のバスにつないだネットワーク(下の「ネットワークを外につなぐ」) |
|
|
330
334
|
| `connections({ network }, { file }?)`、`check(intent?, { file }?)` | ネットワークをつなげる先と、始めずに意図を確かめた結果(下の「ネットワークを外につなぐ」) |
|
|
331
335
|
| `readConfig({ file }?)` | 構成ファイルの、保存されているとおりの文と `stamp`(下の「構成ファイルの文を編集する」) |
|
|
332
336
|
| `check(intent?, { file, text }?)` | `text` つきなら、そのファイルの、まだ保存していない文の check(同じ節) |
|
|
333
337
|
| `describeAgain({ file, variant }?)` | 保存したファイルの参加者の説明を保存し直し、その check を返す(同じ節) |
|
|
334
338
|
| `saveConfig({ file, text, stamp })` | 文をそのファイルとして、読んだときの `stamp`(`null` は新しいファイル)つきで保存し、新しい `stamp` を返す(同じ節) |
|
|
335
|
-
| `run` | `start(intent?, { file }?)`、`stop()`、`forceStop()`
|
|
339
|
+
| `run` | `start(intent?, { file, onStarted }?)`、`stop()`、`forceStop()` |
|
|
336
340
|
| `time` | `pause()`、`resume()`、`step(ms)`、`setSpeed(value)`、`runUntil(ms)` |
|
|
337
341
|
| `variable(ref)` | 変数 1 つ。`"ECU.変数"`(最初の点で切る)か `{ peer, name }`(名前に点を含む ECU)で指します |
|
|
338
342
|
| `low`、`close()` | 同じ接続の `GuiClient`。`close()` は切ります(共有している接続は、次の `connect()` がつなぎ直します) |
|
package/README.md
CHANGED
|
@@ -92,11 +92,11 @@ The names that `src/index.ts` exports, by group. Parentheses list the members of
|
|
|
92
92
|
|
|
93
93
|
### Front door
|
|
94
94
|
|
|
95
|
-
| Kind | Name
|
|
96
|
-
| -------- |
|
|
97
|
-
| Function | `connect(options?)`, `createFront(options)`, `watch(source, fn)`, `until(source, test, options?)`
|
|
98
|
-
| Class | `ActionError` (`code`, `message`, `outcome`, `findings`)
|
|
99
|
-
| Type | `ConnectOptions` (`base_url`, `token`, `origin`, `http`, `socket`, `answer_timeout_ms`, `on_error`), `Front` (`low`, `status`, `clock`, `controls`, `scenario`, `outside`, `run`, `time`, `variable()`, `scenarios()`, `connections()`, `check()`, `readConfig()`, `describeAgain()`, `saveConfig()`, `close()`), `FrontStatus`, `FrontResult`, `FrontClock`, `FrontControls`, `Control`, `Reason`, `FrontScenario`, `FrontRun`, `FrontTime`, `FrontVariable`, `VariableView`, `Intent`, `Outside`, `ConnectEntry`, `ConnectTarget`, `ConnectListError`, `Link`, `RunState`, `EndKind`, `Pacing`, `OperationName` |
|
|
95
|
+
| Kind | Name |
|
|
96
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| Function | `connect(options?)`, `createFront(options)`, `watch(source, fn)`, `until(source, test, options?)` |
|
|
98
|
+
| Class | `ActionError` (`code`, `message`, `outcome`, `findings`) |
|
|
99
|
+
| Type | `ConnectOptions` (`base_url`, `token`, `origin`, `http`, `socket`, `answer_timeout_ms`, `on_error`), `Front` (`low`, `status`, `clock`, `controls`, `scenario`, `runtime`, `outside`, `prepare()`, `configs()`, `recording()`, `run`, `time`, `variable()`, `scenarios()`, `connections()`, `check()`, `readConfig()`, `describeAgain()`, `saveConfig()`, `close()`), `FrontStatus`, `FrontResult`, `FrontClock`, `FrontControls`, `Control`, `Reason`, `FrontScenario`, `FrontRun`, `FrontTime`, `FrontVariable`, `VariableView`, `Intent`, `Outside`, `ConnectEntry`, `ConnectTarget`, `ConnectListError`, `Link`, `RunState`, `EndKind`, `Pacing`, `OperationName`, `RuntimeStatus` |
|
|
100
100
|
|
|
101
101
|
### Token
|
|
102
102
|
|
|
@@ -326,13 +326,17 @@ try {
|
|
|
326
326
|
| `clock` | `sim_ms` (the virtual time in ms; `null` before a run), `speed`, `actual_speed` (the speed over about the last second; `null` while paused and right after the start) and `pacing` (`not-paced`, `on-time` or `late`). It changes often, so it is apart from `status` |
|
|
327
327
|
| `controls` | Whether each operation can be used now: `start`, `stop`, `force_stop`, `pause`, `resume`, `step` (with `min_ms` and `max_ms`), `run_until`, `speed` (with `min`, `max` and `fastest`: whether `'max'` is accepted besides the numbers), and `save` |
|
|
328
328
|
| `scenario` | The scenario of the current (or last) run: `file`, `name`, `status`, `steps`, `timeline_url`; `null` for a run without one |
|
|
329
|
+
| `runtime` | Persistent hot / cold runtime status: `mode`, `state`, `config`, `reason`, `message` |
|
|
330
|
+
| `prepare(options?)` | Pre-warms a persistent launcher for `file` (`POST api/prepare`) when eligible, or returns `cold` with `reason` |
|
|
331
|
+
| `configs()` | Lists configuration files under the server root (`GET api/configs`) |
|
|
332
|
+
| `recording()` | Returns applied writes of the current or last run as scenario YAML (`GET api/recording`), or `null` if none |
|
|
329
333
|
| `outside` | The networks that the run's `connect` connected to a real bus ("Connecting a network outside" below) |
|
|
330
334
|
| `connections({ network }, { file }?)`, `check(intent?, { file }?)` | Where a network can be connected, and the check of an intent without starting it ("Connecting a network outside" below) |
|
|
331
335
|
| `readConfig({ file }?)` | The text of a configuration file as it is saved, with its `stamp` ("Editing the text of a configuration file" below) |
|
|
332
336
|
| `check(intent?, { file, text }?)` | With `text`, the check of an unsaved text of the file (the same section) |
|
|
333
337
|
| `describeAgain({ file, variant }?)` | Describes the participants of the saved file again, and returns that check (the same section) |
|
|
334
338
|
| `saveConfig({ file, text, stamp })` | Saves a text as the file, with the `stamp` it was read with (`null`: a new file), and returns the new `stamp` (the same section) |
|
|
335
|
-
| `run` | `start(intent?, { file }?)`, `stop()` and `forceStop()`
|
|
339
|
+
| `run` | `start(intent?, { file, onStarted }?)`, `stop()` and `forceStop()` |
|
|
336
340
|
| `time` | `pause()`, `resume()`, `step(ms)`, `setSpeed(value)` and `runUntil(ms)` |
|
|
337
341
|
| `variable(ref)` | One variable, by `"ECU.variable"` (cut at the first dot) or `{ peer, name }` (for an ECU whose name has a dot) |
|
|
338
342
|
| `low`, `close()` | The `GuiClient` of the same connection; `close()` disconnects (a shared connection is made again by the next `connect()`) |
|