27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
context_hub_module_t Yapı Referansı
#include <
context_hub.h
>
Her donanım modülünde HAL_MODULE_INFO_SYM adlı bir veri yapısı olmalıdır ve bu veri yapısının alanları,
hw_module_t
ile başlamalı ve ardından modüle özgü bilgiler gelmelidir.
Tanımı,
context_hub.h
dosyasının
391. satırı
.
Mevcut tüm hub'ları listeler.Liste "list" olarak döndürülür.
-
İlerlemeler
-
result : listedeki hub'ların sayısı veya hata (negatif)
Bu yöntem, cihazın açılışında çağrılır.
Tanımı,
context_hub.h
dosyasının
400
satırı
int(* send_message)(uint32_t hub_id, const struct
hub_message_t
*msg)
|
Hub'a mesaj gönderme
-
İlerlemeler
-
result : Başarılıysa 0, aksi takdirde hata kodu
Tanımı,
context_hub.h
dosyasının
413
satırı
HAL uygulamasının bağlam merkezi hizmetiyle iletişim kurması için bir geri çağırma işlevi kaydeder.
-
İlerlemeler
-
result : Başarılıysa 0, aksi takdirde hata kodu
Tanımı,
context_hub.h
dosyasının
407
satırı
Bu yapının dokümanları aşağıdaki dosyadan oluşturulmuştur:
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 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)"]]