ダウンストリーム用デバイスコネクターIPC#
ダウンストリーム用デバイスコネクターIPCは複数設定することができます。 そのため設定は配列です。
設定項目#
キー |
型 |
説明 |
|---|---|---|
id |
string |
デバイスコネクターIPC設定の識別子 |
data_name_prefix |
string |
iSCPのデータ名のプレフィックスを指定する文字列。ここで空文字以外のプレフィックスが指定されている場合、以下の処理が行われます。
|
enabled |
bool |
デバイスコネクターIPC設定の有効( |
format |
string |
デバイスコネクターが受信するデータのフォーマット(デバイスコネクターIPCフォーマット)
|
ipc.type |
string |
intdash Edge Agent 2からデバイスコネクターへのデータ送信(IPC)の方法
|
ipc.path |
string |
デバイスコネクターがintdash Edge Agent 2からデータを受信するFIFOのパス。ipc.typeが |
ipc.address |
string |
デバイスコネクターIPCでTCPまたはUDPを使用する場合に必要なアドレスを設定します。この設定は、ipc.typeが
|
write_policy |
string |
デバイスコネクターとのIPC接続がない状態でのデータポイントの扱いを指定します。 接続がない状態は、データポイントの送信試行が失敗することで検知されます。 送信失敗の検知のきっかけとなったデータポイント自体は、いずれの設定でも再送されません。
送信失敗の検知タイミングはIPCの種類によって異なります。FIFOの場合、デバイスコネクターがFIFOをreadするまで書き込みがブロックされるため、書き込み失敗が発生したデータポイントのみが送信されません。TCP/UDPの場合、IPCのオープンや書き込みが成功しても、デバイスコネクターが実際には停止していて送信されない場合があります。 |
launch.cmd |
string |
intdash Edge Agent 2が起動したらそれに連動してデバイスコネクターも起動させたい場合は、デバイスコネクターの実行ファイルのパスを指定します。 この設定を使ってデバイスコネクターを起動した場合、intdash Edge Agent 2を終了すると、デバイスコネクターも終了します。 起動したプロセスの標準出力は、ストリーマーのログ( streamer.log_file で設定された出力先)に送られます。 |
launch.args |
[string] |
デバイスコネクター起動時の引数。 |
launch.environment |
[string] |
デバイスコネクター起動時に追加する環境変数( |
設定コマンド#
設定の確認、変更、削除は intdash-agentctl config コマンドで行います。
- すべてのダウンストリーム用デバイスコネクターIPCの確認
$ intdash-agentctl config list device-connector downstream
- ダウンストリーム用デバイスコネクターIPCの作成
$ intdash-agentctl config create device-connector downstream <config_in_yaml_format>
コマンド例
$ intdash-agentctl config create device-connector downstream ' id: down-dc-test data_name_prefix: 1/ enabled: true format: iscp-v2-compat ipc: type: fifo path: /var/run/intdash/downlink-hello.fifo '
- ダウンストリーム用デバイスコネクターIPCの確認
$ intdash-agentctl config show device-connector downstream <id>
- ダウンストリーム用デバイスコネクターIPCの変更
$ intdash-agentctl config modify device-connector downstream <id> <config_in_yaml_format>
コマンド例
$ intdash-agentctl config modify device-connector downstream down-dc-test 'enabled: false'
- ダウンストリーム用デバイスコネクターIPCの削除
$ intdash-agentctl config delete device-connector downstream <id>
注釈
config サブコマンドの直後に --json オプションを指定すると、YAMLの代わりにJSONで入出力できます。
設定ファイル記載例#
device_connectors_downstream:
- id: down-hello
data_name_prefix: 1/
enabled: true
format: iscp-v2-compat
ipc:
type: fifo
path: /var/run/intdash/down-hello.fifo
launch:
cmd: device-connector-intdash
args:
- --config
- /tmp/down-hello.yaml
environment:
- TEST_VAR=1