סטטוס
ה-API /osc/commands/status
מחזיר את הסטטוס של פקודות inProgress
הקודמות. ה-API של status
שימושי לדגום את ההתקדמות של פקודה שהונפקה בעבר. לדוגמה, קביעה אם camera.takePicture
השלים.
שם |
סוג |
תיאור |
id |
מחרוזת |
מזהה הפקודה שהוחזר על ידי קריאה קודמת ל-
/osc/commands/execute . |
פלט
הפלט הוא גם אובייקט פקודה (ראו פלט של /osc/commands/execute
)
שגיאה
קוד שגיאה |
תיאור |
missingParameter |
השדה id לא צוין. לפרמטר הזה נדרש מזהה פקודה שהוחזר על ידי קריאה קודמת ל-/osc/commands/execute . |
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" } } |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]