Durum
/osc/commands/status
API, önceki inProgress
komutların durumunu döndürür. status
API, önceden yayınlanmış bir komutun ilerleme durumunu yoklamak için kullanışlıdır. örneğin camera.takePicture
adlı projenin tamamlanıp tamamlanmadığını belirleyebilirsiniz.
Ad |
Tür |
Açıklama |
id |
Dize |
/osc/commands/execute 'e daha önce yapılan bir çağrı tarafından döndürülen komut kimliği. |
Çıkış
Çıkış, aynı zamanda bir komut nesnesidir (/osc/commands/execute
ürününün Çıkışı'na bakın).
Hata
Hata kodu |
Açıklama |
missingParameter |
id belirtilmemiş. Bu parametre için daha önce /osc/commands/execute üzerinde yapılan bir çağrı tarafından döndürülen bir komut kimliği gerekir. |
invalidParameterName |
Giriş parametresi tanınmıyor. |
invalidParameterValue |
Giriş parametresi tanındı ancak değeri geçersiz; örneğin, id değeri mevcut değil veya türü yanlış. |
Örnek |
İstek |
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" } |
Yanıt |
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" } } |
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-08-21 UTC.
[null,null,["Son güncelleme tarihi: 2024-08-21 UTC."],[[["The `/osc/commands/status` API is used to check the status of previously executed commands, like `camera.takePicture`, that were in progress."],["It requires the `id` of the command, obtained from the `/osc/commands/execute` API, to retrieve the status."],["The API response provides details like command name, state (e.g., \"done\"), and any results, such as a file URI."],["Potential errors include missing or invalid `id` parameters."]]],["The `/osc/commands/status` API retrieves the status of prior `inProgress` commands, using a command ID from `/osc/commands/execute`. Input requires the `id` parameter; output mirrors the command object format of `/osc/commands/execute`. Errors include `missingParameter` (no ID), `invalidParameterName`, or `invalidParameterValue` (incorrect ID type/value). An example shows a POST request with ID \"90ABCD\" and a successful response indicating \"camera.takePicture\" is \"done\" with the file URI.\n"]]