context_hub_module_t構造体リファレンス
context_hub_module_t構造体リファレンス
#include < context_hub.h >
データフィールド | |
struct hw_module_t | 一般 |
int(* | get_hubs )(struct context_hub_module_t * module、const struct context_hub_t ** list) |
int(* | subscribe_messages )(uint32_t hub_id、 context_hub_callback cbk、void * cookie) |
int(* | send_message )(uint32_t hub_id、const struct hub_message_t * msg) |
詳細な説明
すべてのハードウェアモジュールにはHAL_MODULE_INFO_SYMという名前のデータ構造が必要であり、このデータ構造のフィールドはhw_module_tで始まり、その後にモジュール固有の情報が続く必要があります。
ファイルcontext_hub.hの391行で定義されています。
フィールドドキュメント
struct hw_module_t common |
ファイルcontext_hub.hの392行で定義されています。
int(* get_hubs)(struct context_hub_module_t * module、const struct context_hub_t ** list) |
使用可能なすべてのハブを列挙します。リストは「list」で返されます。
- 戻り値
- 結果:リスト内のハブの数またはエラー(負)
このメソッドは、デバイスの起動時に呼び出されます。
ファイルcontext_hub.hの400行で定義されています。
int(* send_message)(uint32_t hub_id、const struct hub_message_t * msg) |
int(* subscribe_messages)(uint32_t hub_id、 context_hub_callback cbk、void * cookie) |
コンテキストハブサービスと通信するためのHAL実装のコールバックを登録します。
- 戻り値
- 結果:成功した場合は0、それ以外の場合はエラーコード
ファイルcontext_hub.hの407行で定義されています。
この構造体のドキュメントは、次のファイルから生成されました。
- ハードウェア/ libhardware /含める/ハードウェア/ context_hub.h