الحالة
تعرض واجهة برمجة التطبيقات /osc/commands/status
حالة أوامر inProgress
السابقة. تكون واجهة برمجة التطبيقات 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 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]