हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
context_hub_module_t स्ट्रक्चर का रेफ़रंस
#include <
context_hub.h
>
हर हार्डवेयर मॉड्यूल में, HAL_MODULE_INFO_SYM नाम का डेटा स्ट्रक्चर होना चाहिए. साथ ही, इस डेटा स्ट्रक्चर के फ़ील्ड,
hw_module_t
से शुरू होने चाहिए. इसके बाद, मॉड्यूल की खास जानकारी होनी चाहिए.
परिभाषा,
context_hub.h
फ़ाइल की पंक्ति
391
पर दी गई है.
सभी उपलब्ध हब की सूची दिखाता है.यह सूची "list" में दिखती है.
-
रिटर्न
-
नतीजा : सूची में मौजूद हब की संख्या या गड़बड़ी (नेगेटिव)
इस तरीके को डिवाइस के बूटअप के समय कॉल किया जाएगा.
परिभाषा,
context_hub.h
फ़ाइल की पंक्ति
400
पर दी गई है.
int(* send_message)(uint32_t hub_id, const struct
hub_message_t
*msg)
|
किसी हब पर मैसेज भेजना
-
रिटर्न
-
नतीजा : अगर बदलाव हो जाता है, तो 0 और अगर नहीं होता है, तो गड़बड़ी कोड
परिभाषा,
context_hub.h
फ़ाइल की पंक्ति
413
पर दी गई है.
संदर्भ हब सेवा के साथ बातचीत करने के लिए, एचएएल लागू करने के लिए कॉलबैक रजिस्टर करता है.
-
रिटर्न
-
नतीजा : अगर बदलाव हो जाता है, तो 0 और अगर नहीं होता है, तो गड़बड़ी कोड
परिभाषा,
context_hub.h
फ़ाइल की लाइन
407
पर दी गई है.
इस स्ट्रक्चर का दस्तावेज़, इस फ़ाइल से जनरेट किया गया था:
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Android Hardware Abstraction Layer: context_hub_module_t Struct Reference\n\ncontext_hub_module_t Struct Reference\n=====================================\n\n[Data Fields](#pub-attribs) \ncontext_hub_module_t Struct Reference \n\n`\n#include \u003c\n`[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)`\n\u003e\n`\n\n|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| struct [hw_module_t](/reference/hal/structhw__module__t) | [common](/reference/hal/structcontext__hub__module__t#a71ea01183b3998cad6a2301a37a42fc7) |\n| ||\n| int(\\* | [get_hubs](/reference/hal/structcontext__hub__module__t#a460328b43bbf62fd021541b547ea05b7) )(struct [context_hub_module_t](/reference/hal/structcontext__hub__module__t) \\*module, const struct [context_hub_t](/reference/hal/structcontext__hub__t) \\*\\*list) |\n| ||\n| int(\\* | [subscribe_messages](/reference/hal/structcontext__hub__module__t#a5a4c5caaa184e7918c86c847dfd507ff) )(uint32_t hub_id, [context_hub_callback](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h) cbk, void \\*cookie) |\n| ||\n| int(\\* | [send_message](/reference/hal/structcontext__hub__module__t#a8ad344fdd7d209b19bff76be0fedca8a) )(uint32_t hub_id, const struct [hub_message_t](/reference/hal/structhub__message__t) \\*msg) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nEvery hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with\n[hw_module_t](/reference/hal/structhw__module__t)\nfollowed by module specific information.\n\n\nDefinition at line\n[391](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\nof file\n[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------|\n| struct [hw_module_t](/reference/hal/structhw__module__t) common |\n\n\nDefinition at line\n[392](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\nof file\n[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\n.\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* get_hubs)(struct [context_hub_module_t](/reference/hal/structcontext__hub__module__t) \\*module, const struct [context_hub_t](/reference/hal/structcontext__hub__t) \\*\\*list) |\n\n\nEnumerate all available hubs.The list is returned in \"list\".\n\n\nReturns\n:\n result : number of hubs in list or error (negative)\n\n\nThis method shall be called at device bootup.\n\n\nDefinition at line\n[400](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\nof file\n[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\n.\n\n|-----------------------------------------------------------------------------------------------------------------|\n| int(\\* send_message)(uint32_t hub_id, const struct [hub_message_t](/reference/hal/structhub__message__t) \\*msg) |\n\n\nSend a message to a hub\n\n\nReturns\n:\n result : 0 if successful, error code otherwise\n\n\nDefinition at line\n[413](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\nof file\n[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\n.\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* subscribe_messages)(uint32_t hub_id, [context_hub_callback](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h) cbk, void \\*cookie) |\n\n\nRegisters a callback for the HAL implementation to communicate with the context hub service.\n\n\nReturns\n:\n result : 0 if successful, error code otherwise\n\n\nDefinition at line\n[407](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\nof file\n[context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [context_hub.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/context_hub.h)"]]