狀態
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
/osc/commands/status
API 會傳回先前 inProgress
命令的狀態。 status
API 很適合用來輪詢先前所發出命令的進度;例如,判斷 camera.takePicture
是否已完成。
輸入
名稱 |
類型 |
描述 |
id |
字串 |
先前呼叫 /osc/commands/execute 而傳回的命令 ID。 |
輸出
輸出也是命令物件(請參閱 /osc/commands/execute
的輸出)
錯誤
錯誤代碼 |
描述 |
missingParameter |
未指定 id 。 此參數需要先前呼叫 /osc/commands/execute 而傳回的命令 ID。 |
invalidParameterName |
無法辨識輸入參數。 |
invalidParameterValue |
辨識出輸入參數,但為無效值;例如,id 值不存在或其類型不正確。 |
範例 |
要求 |
POST /osc/commands/status HTTP/1.1
Host: [camera ip address]:[httpPort]
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: {CONTENT_LENGTH}
X-XSRF-Protected: 1
{
"id": "90ABCD"
} |
回應 |
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: {CONTENT_LENGTH}
X-Content-Type-Options: nosniff
{
"name": "camera.takePicture",
"state": "done",
"results": {
"fileUri": "ABC.JPG"
}
} |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2017-04-06 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]