context_hub_module_t 구조 참조
context_hub_module_t 구조 참조
#include < context_hub.h >
데이터 필드 | |
구조체 hw_module_t | 흔한 |
int (* | get_hubs ) (struct context_hub_module_t * 모듈, 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 번째 라인에서 정의되었습니다.
현장 문서
구조체 hw_module_t 공통 |
context_hub.h 파일의 392 번째 줄에서 정의되었습니다.
int (* get_hubs) (struct context_hub_module_t * 모듈, const struct context_hub_t ** 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 / include / hardware / context_hub.h