session.startSession
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يبدأ جلسة تنتهي مهلتها بعد فاصل زمني ثابت. قفل الكاميرا على
يطلب العميل وتتأكد من بقاء الكاميرا في الوضع النشط. يرجى ملاحظة أنه بدءًا من
ينبغي السماح دائمًا بجلسة جديدة. إذا كانت هناك جلسة حالية،
يجب أن يتم إغلاقه تلقائيًا بواسطة الكاميرا قبل بدء الجلسة الجديدة.
تم إيقاف هذا الأمر نهائيًا في المستوى 2 من واجهة برمجة التطبيقات.
المعلمات
- المهلة: (اختيارية) مهلة الجلسة المطلوبة بالثواني.
في حال الحذف (لا يحتوي طلب HTTP على نص)، يجب أن تحدد الكاميرا قيمة
المهلة.
النتائج
- sessionId: معرّف فريد للجلسة من نوع السلسلة.
- المهلة: تم تأكيد مهلة الجلسة بالثواني.
الأخطاء
- spamparamName: لم يتم التعرُّف على اسم معلَمة الإدخال.
- invalidParameterValue: يتم التعرف على اسم معلَمة الإدخال، ولكن
القيمة التي تم تمريرها غير صالحة؛ على سبيل المثال، القيمة خارج النطاق أو بياناتها
النوع غير صحيح.
مفتاح Command I/O |
إدخال الطلب |
{
"parameters": {
"timeout": 50
}
} |
مخرجات الأوامر |
{
"results": {
"sessionId": "12ABC3",
"timeout": 50
}
} |
مخرجات الأوامر (خطأ) |
{
"error": {
"code": "cameraInExclusiveUse",
"message": "Camera already in exclusive use, new
session can't be started."
}
} |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eStarts a session that locks the camera to the requesting client and keeps it awake, timing out after a specified or default interval.\u003c/p\u003e\n"],["\u003cp\u003eA new session can always be started, automatically closing any existing session.\u003c/p\u003e\n"],["\u003cp\u003eThis command, deprecated in API level 2, returns a unique session ID and the confirmed timeout duration.\u003c/p\u003e\n"],["\u003cp\u003ePossible errors include invalid parameter names or values, or the camera already being in exclusive use.\u003c/p\u003e\n"]]],["The core action initiates a timed camera session, locking the camera to the client and ensuring it remains active. A new session is always permitted, automatically ending any existing session. The user can optionally specify a session timeout in seconds; otherwise, the camera sets a default. The output includes a unique session ID and the confirmed timeout. Errors can occur if parameter names or values are invalid. This command has been deprecated after API level 2.\n"],null,["# camera.startSession\n\nStarts a session that times out after a fixed interval. Locks the camera to the\nrequesting client and makes sure the camera stays awake. Please note, starting\na new session should always be allowed. If there is an existing session, it\nshould be closed automatically by the camera before starting the new session.\n**This command was deprecated in API level 2.**\n\nParameters\n----------\n\n- **timeout:** (Optional) Requested session timeout in seconds. If omitted (HTTP request has no body), the camera should determine a reasonable timeout.\n\nResults\n-------\n\n- **sessionId:** Unique session identifier of type string.\n- **timeout:** Confirmed session timeout in seconds.\n\nErrors\n------\n\n- **invalidParameterName:** The input parameter name is unrecognized.\n- **invalidParameterValue:** The input parameter name is recognized, but the passed value is invalid; for example, the value is out of range or its data type is incorrect.\n\n| Command I/O ----------- ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text { \"parameters\": { \"timeout\": 50 } } ``` |\n| **Command Output** | ```text { \"results\": { \"sessionId\": \"12ABC3\", \"timeout\": 50 } } ``` |\n| **Command Output (Error)** | ```povray { \"error\": { \"code\": \"cameraInExclusiveUse\", \"message\": \"Camera already in exclusive use, new session can't be started.\" } } ``` |"]]