デバイスコネクター - device_connectors#
デバイスコネクター設定の配列
設定項目#
キー |
型 |
説明 |
|---|---|---|
id |
string |
デバイスコネクターを識別するための文字列。 |
service_id |
string |
使用するデバイスコネクターを指定する文字列。 |
enabled |
boolean |
デバイスコネクターが使用するすべての受信用IPC設定・送信用IPC設定の有効( |
service_substitutions |
[string] |
デバイスコネクターに与えるパラメーターのリスト。 |
upstream_ipc_ids |
[string] |
割り当てる アップストリーム用デバイスコネクターIPC のID。 |
downstream_ipc_ids |
[string] |
割り当てる ダウンストリーム用デバイスコネクターIPC のID。 |
設定例#
2つのデバイスコネクターが設定された例です。
"device_connectors": [
{
"id": "can",
"enabled": true,
"upstream_ipc_ids": [
"can"
],
"downstream_ipc_ids": [],
"service_id": "CAN-USB Interface (Upstream)",
"service_substitutions": [
"DC_BAUDRATE=500",
"DC_DEVICE_PATH=/dev/apt-usb/by-id/usb-aptpod__Inc._EXAMPLE",
"DC_LISTENONLY=1",
"DC_TIMESTAMP_MODE=device"
]
},
{
"id": "device-inventory",
"enabled": true,
"upstream_ipc_ids": [
"device-inventory"
],
"downstream_ipc_ids": [],
"service_id": "Device Inventory",
"service_substitutions": [
"DC_SEND_INTERVAL=10"
]
}
]
設定の手順については、 データ送信に関する設定 または データ受信に関する設定 を参照してください。
対応するREST API#
重要
以下のいずれかのAPIコールでデバイスコネクターの設定を変更した場合は、そのあとで変更を決定する操作が必要です。
POST /device_connectors/PATCH /device_connectors/{id}DELETE /device_connectors/{id}
変更を決定するには、以下のAPIコールを行います。
$ curl -sS -w '%{http_code}\n' -u user:$USER_PASS -X POST http://$API_FQDN/api/device_connectors/-/commit