Proximity - TakayukiHoshi1984/DeviceConnect-Spec GitHub Wiki
スマートデバイスの近接センサーの物/人の検知を通知するAPI。
| API | 概要 |
|---|---|
| GET /gotapi/proximity/onDeviceProximity | スマートデバイスの近接センサーが物体を検知した値を取得する。 |
| PUT /gotapi/proximity/onDeviceProximity | スマートデバイスの近接センサーが物体を検知したことを通知するイベントを開始する。 |
| DELETE /gotapi/proximity/onDeviceProximity | スマートデバイスの近接センサーが物体を検知したことを通知するイベントを停止する。 |
| GET /gotapi/proximity/onUserProximity | スマートデバイスの近接センサーが人体を検知した値を取得する。 |
| PUT /gotapi/proximity/onUserProximity | スマートデバイスの近接センサーが人体を検知したことを通知するイベントを開始する。 |
| DELETE /gotapi/proximity/onUserProximity | スマートデバイスの近接センサーの人体を検知したことを通知するイベントを停止する。 |
one-shot
スマートデバイスの近接センサーが物体を検知した値を取得する。
スマートデバイスの近接センサーの情報を 近接距離最小/最大値の範囲で連続的にイベント発行する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| 論理名 | 物理名 | データ型 | 必須 | 説明 | |
|---|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
|
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 | |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 | |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
|
| 近接イベント | proximity | object | Yes | ||
| 近接距離 | value | integer | No | cm単位の距離。 | |
| 近接距離最小値 | min | integer | No | cm単位の距離。 | |
| 近接距離最大値 | max | integer | No | cm単位の距離。 | |
| 閾値 | threshold | integer | No | cm単位の距離の閾値。 | |
| 距離識別子 | range | string | No | 距離を示す文字列。 | |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0",
"proximity" : {
"value" : 12.3456,
"min" : 1.23456,
"max" : 123.456,
"threshold" : 12.3456,
"range" : "NEAR"
}
}
event
スマートデバイスの近接センサーが物体を検知したことを通知するイベントを開始する。
スマートデバイスの近接センサーの情報を 近接距離最小/最大値の範囲で連続的にイベント発行する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| interval | long | No | デバイスプラグインがイベントを送信する間隔。 |
| 論理名 | 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0"
}
| 論理名 | 物理名 | データ型 | 必須 | 説明 | |
|---|---|---|---|---|---|
| サービスID | serviceId | string | Yes | イベントを送信したサービスのID | |
| プロファイル名 | profile | string | Yes | プロファイル名。 | |
| インターフェース名 | interface | string | Yes | インターフェース名。 | |
| アトリビュート名 | attribute | string | Yes | アトリビュート名。 | |
| 近接イベント | proximity | object | Yes | ||
| 近接距離 | value | integer | No | cm単位の距離。 | |
| 近接距離最小値 | min | integer | No | cm単位の距離。 | |
| 近接距離最大値 | max | integer | No | cm単位の距離。 | |
| 閾値 | threshold | integer | No | cm単位の距離の閾値。 | |
| 距離識別子 | range | string | No | 距離を示す文字列。 | |
{
"serviceId" : "Host.exampleId.localhost.deviceconnect.org",
"profile" : "proximity",
"attribute" : "ondeviceproximity",
"proximity" : {
"value" : 12.3456,
"min" : 1.23456,
"max" : 123.456,
"threshold" : 12.3456,
"range" : "NEAR"
}
}
event
スマートデバイスの近接センサーが物体を検知したことを通知するイベントを停止する。
スマートデバイスの近接センサーの情報を 近接距離最小/最大値の範囲で連続的にイベント発行する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| 論理名 | 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0"
}
one-shot
スマートデバイスの近接センサーが人体を検知した値を取得する。
ユーザ検知とは、例えば通話時にスマートフォンの画面を耳元に近接させた場合等に 発生する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| 論理名 | 物理名 | データ型 | 必須 | 説明 | |
|---|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
|
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 | |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 | |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
|
| 近接イベント | proximity | object | Yes | ||
| 近接の有無 | near | boolean | Yes | ユーザがデバイスに近接しているかどうか。 true: 近接している false: 近接していない' |
|
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0",
"proximity" : {
"near" : true
}
}
event
スマートデバイスの近接センサーが人体を検知したことを通知するイベントを開始する。
ユーザ検知とは、例えば通話時にスマートフォンの画面を耳元に近接させた場合等に 発生する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| interval | long | No | デバイスプラグインがイベントを送信する間隔。 |
| 論理名 | 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0"
}
| 論理名 | 物理名 | データ型 | 必須 | 説明 | |
|---|---|---|---|---|---|
| サービスID | serviceId | string | Yes | イベントを送信したサービスのID | |
| プロファイル名 | profile | string | Yes | プロファイル名。 | |
| インターフェース名 | interface | string | Yes | インターフェース名。 | |
| アトリビュート名 | attribute | string | Yes | アトリビュート名。 | |
| 近接イベント | proximity | object | Yes | ||
| 近接の有無 | near | boolean | Yes | ユーザがデバイスに近接しているかどうか。 true: 近接している false: 近接していない' |
|
{
"serviceId" : "Host.exampleId.localhost.deviceconnect.org",
"profile" : "proximity",
"attribute" : "onuserproximity",
"proximity" : {
"near" : true
}
}
event
スマートデバイスの近接センサーの人体を検知したことを通知するイベントを停止する。
ユーザ検知とは、例えば通話時にスマートフォンの画面を耳元に近接させた場合等に 発生する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。取得対象スマートデバイス |
| 論理名 | 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0: 正常応答 0以外: 異常応答 |
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0"
}