context_hub_module_t Struct Reference

context_hub_module_t Struct Reference

#include < context_hub.h >

Data Fields

struct hw_module_t   common
 
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)
 

Detailed Description

Every hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with hw_module_t followed by module specific information.

Definition at line 391 of file context_hub.h .

Field Documentation

struct hw_module_t common

Definition at line 392 of file context_hub.h .

int(* get_hubs)(struct context_hub_module_t *module, const struct context_hub_t **list)

Enumerate all available hubs.The list is returned in "list".

Returns
result : number of hubs in list or error (negative)

This method shall be called at device bootup.

Definition at line 400 of file context_hub.h .

int(* send_message)(uint32_t hub_id, const struct hub_message_t *msg)

Send a message to a hub

Returns
result : 0 if successful, error code otherwise

Definition at line 413 of file context_hub.h .

int(* subscribe_messages)(uint32_t hub_id, context_hub_callback cbk, void *cookie)

Registers a callback for the HAL implementation to communicate with the context hub service.

Returns
result : 0 if successful, error code otherwise

Definition at line 407 of file context_hub.h .


The documentation for this struct was generated from the following file: