-
Notifications
You must be signed in to change notification settings - Fork 8
Dice Profile
TakayukiHoshi1984 edited this page Mar 27, 2017
·
4 revisions
| API | 機能概要 |
|---|---|
| Magnetometer Event API | 磁力センサー値を通知する。 |
| Dice Event API | ダイスの目を通知する。 |
Dice+が搭載しているいくつかのセンサー検知を通知するAPI。
なし
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Magnetometer Event API | 2.0.0 | 非同期I/F(イベントI/F) |
磁力センサー値を通知する。
| イベント名 | Content-Type |
|---|---|
| /gotapi/dice/magnetometer/onMagnetometer | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 | |
| オブジェクト | magnetometer | object | - | 磁力センサーオブジェクト | |
| マイクロテスラのX軸の値 | x | number | - | マイクロテスラのX軸の値 (単位:μT) |
|
| マイクロテスラのY軸の値 | y | number | - | マイクロテスラのY軸の値 (単位:μT) |
|
| マイクロテスラのZ軸の値 | z | number | - | マイクロテスラのZ軸の値 (単位:μT) |
|
| フィルタタイプ | filter | number | - | この磁力計の読み出しのためのフィルタタイプ 1:RawFilter 2:LowPassFilter |
|
| インターバル | interval | number | - | 計測のインターバル (単位: ミリ秒) |
|
{
"product":"Device Connect Manager",
"version":"x.x",
"serviceId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"dice",
"interface":"magnetometer",
"attribute":"onMagnetometer",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"magnetometer" : {
"x": 1.402,
"y": 1.033,
"z" : 0.5,
"filter":2,
"interval":500
}
}
| インターフェース名称 | Version | 種別 |
|---|---|---|
| Dice Event API | 2.0.0 | 非同期I/F(イベントI/F) |
ダイスの目を通知する。
| イベント名 | Content-Type |
|---|---|
| /gotapi/dice/onDice | application/json |
| 論理名 | 物理名 | データ型 | 省略 | 設定値 | |
| オブジェクト | dice | object | - | ダイスオブジェクト | |
| ダイスの目 | pip | number | - | ダイスの目 | |
{
"product":"Device Connect Manager",
"version":"x.x",
"serviceId":"localhost.deviceconnect.org",
"api" : "gotapi",
"profile":"dice",
"attribute":"onDice",
"sessionKey":"0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
"dice":{
"pip":1
}
}