ZigBee module operations. More...
#include <zigbee/artik_zigbee.h>
Data Fields | |
| artik_error(* | reset_local )(void) |
| Reset local device attribute, binding list and initialize network. More... | |
| artik_error(* | set_local_endpoint )(artik_zigbee_local_endpoint_info *endpoint_info) |
| Set local endpoints, they are saved locally and used to create device when initialize() is called. More... | |
| artik_error(* | get_local_endpoint )(artik_zigbee_local_endpoint_info *endpoint_info) |
| Get local endpoints which are saved locally when last function set_local_endpoint() is called. More... | |
| artik_error(* | initialize )(artik_zigbee_client_callback callback, void *user_data) |
| Initialize zigbee module This function will not change network setting, and the others device in current network will still hold old endpoints information. Can let remote devices update saved endpoints information by: More... | |
| void(* | deinitialize )(void) |
| Deinitialize, release the data allocated in artik-sdk. | |
| artik_error(* | network_start )(artik_zigbee_network_state *state) |
| Resume network operation after a reboot. More... | |
| artik_error(* | network_form )(void) |
| Form a new network as a coordinator. More... | |
| artik_error(* | network_form_manually )(const artik_zigbee_network_info *network_info) |
| Form a new network as a coordinator. More... | |
| artik_error(* | network_permitjoin )(int duration_sec) |
| Permit joining to the formed network from other nodes. More... | |
| artik_error(* | network_leave )(void) |
| Leave from the joined network. More... | |
| artik_error(* | network_join )(void) |
| Join to the existing network by other coordinator automatically. If we were searching for a joinable network and have successfully joined, we give the application some time to determine if this is the correct network. If so, we'll eventually time out (1 minute) and clean up the state machine. If not, user can call network_leave to leave current network, and we'll continue searching and joining automatically. Besides, user can call network_stop_scan to stop auto network searching and joining. More... | |
| artik_error(* | network_stop_scan )(void) |
| Stop the network scanning. When 'network form', 'network join' and 'network find' are called, network scanning is conducted in zigbeed side, this api is provided to stop network scanning. More... | |
| artik_error(* | network_join_manually )(const artik_zigbee_network_info *network_info) |
| Join to the formed network by other coordinator. More... | |
| artik_error(* | network_find )(void) |
| artik_error(* | network_request_my_network_status )(artik_zigbee_network_state *state) |
| Request my current network status. More... | |
| artik_error(* | device_discover )(void) |
| Request device/service discovery Device/service discovery is a cyclic call, and the default cyclic duration is 1 minute, for the cyclic duration setting, please check api 'set_discover_cycle_time'. If current api 'device_discover' is called, the discovery is triggered immediately. More... | |
| artik_error(* | set_discover_cycle_time )(unsigned int time_minutes) |
| Set the cyclic duaration of device discovery cycle. More... | |
| artik_error(* | get_discovered_device_list )(artik_zigbee_device_info *device_info) |
| Get device info from zigbee daemon. More... | |
| artik_error(* | device_request_my_node_type )(artik_zigbee_node_type *type) |
| Request my current device type. More... | |
| void(* | device_find_by_cluster )(artik_zigbee_endpoint_list *endpoints, int cluster_id, int is_server) |
| Find endpoint list to filtered by cluster ID and SERVER/CLIENT. More... | |
| void(* | raw_request )(const char *command) |
| Send Command Line Interface(CLI) command This is normally used for certification testing. More... | |
Detailed Description
Structure containing all the exposed operations exposed by the ZigBee module
- Examples:
- zigbee_test/artik_zigbee_cli.c, zigbee_test/artik_zigbee_test.c, zigbee_test/artik_zigbee_test_common.c, and zigbee_test/artik_zigbee_test_common.h.
Definition at line 1371 of file artik_zigbee.h.
Field Documentation
| artik_error(* artik_zigbee_module::device_discover) (void) |
- Returns
- Result of operation, S_OK when succeeded The result will be delivered through callback function. Callback function is called for notifying the result. -Response type : ARTIK_ZIGBEE_RESPONSE_DEVICE_DISCOVER -Response payload : pointer of artik_zigbee_device_discovery. artik_zigbee_device_discovery_status will be sent in different phases.
Initialization phase: ARTIK_ZIGBEE_DEVICE_DISCOVERY_START, ARTIK_ZIGBEE_DEVICE_DISCOVERY_IN_PROGRESS. Discovery phase: ARTIK_ZIGBEE_DEVICE_DISCOVERY_FOUND, ARTIK_ZIGBEE_DEVICE_DISCOVERY_ERROR. Complete phase: ARTIK_ZIGBEE_DEVICE_DISCOVERY_DONE, ARTIK_ZIGBEE_DEVICE_DISCOVERY_NO_DEVICE.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1555 of file artik_zigbee.h.
| void(* artik_zigbee_module::device_find_by_cluster) (artik_zigbee_endpoint_list *endpoints, int cluster_id, int is_server) |
- Parameters
-
[out] endpoints Endpoint list that are matched by other parameters [in] cluster_id Cluster ID that is defined in artik-cluster-id.h [in] is_server 1 for SERVER, 0 for CLIENT
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1594 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::device_request_my_node_type) (artik_zigbee_node_type *type) |
- Parameters
-
[out] type current device type
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_cli.c, and zigbee_test/artik_zigbee_test.c.
Definition at line 1583 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::get_discovered_device_list) (artik_zigbee_device_info *device_info) |
- Parameters
-
[out] device_info the memory pointer for return device info list.
- Returns
- Result of operation, S_OK when succeeded, E_ZIGBEE_NO_DEVICE when no discovered device info returned, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1574 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::get_local_endpoint) (artik_zigbee_local_endpoint_info *endpoint_info) |
- Parameters
-
[out] endpoint_info The local endpoints to be returned
- Returns
- Result of operation, S_OK on success, error code otherwise.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1400 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::initialize) (artik_zigbee_client_callback callback, void *user_data) |
- remote device re-discover devices and update devices info by invoke function device_discover().
- local device leave current network and re-join it.
- Parameters
-
[in] callback User callback function for receiving such a command results [in] user_data Send user data
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_cli.c, and zigbee_test/artik_zigbee_test.c.
Definition at line 1418 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_find) (void) |
/brief Scan existing networks
- Returns
- Result of operation, S_OK when succeeded, otherwise failed. The result will be delivered through callback function. Callback function is called for notifying the result. -Response type : ARTIK_ZIGBEE_RESPONSE_NETWORK_FIND -Response payload : the pointer of struct zigbee_network_find
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1516 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_form) (void) |
- Returns
- Result of operation, S_OK when succeeded, otherwise failed. This begins a search for an unused Channel and Pan Id. Then this will automatically form a network on the first unused Channel and Pan Id it finds. Callback function is called for notifying the result. -Response type : ARTIK_RESPONSE_NETWORK_NOTIFICATION -Response payload : ARTIK_NETWORK_FIND_FORM (succeeded)
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1447 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_form_manually) (const artik_zigbee_network_info *network_info) |
- Parameters
-
[in] network_info Network information for forming network including channel, tx power, pan ID
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1455 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_join) (void) |
- Returns
- Result of operation, S_OK when succeeded, otherwise failed. Callback function is called for notifying the result. -Response type : ARTIK_RESPONSE_NETWORK_NOTIFICATION -Response payload : ARTIK_NETWORK_FIND_JOIN (succeeded) ARTIK_NETWORK_FIND_JOIN_FAILED (failed)
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1488 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_join_manually) (const artik_zigbee_network_info *network_info) |
- Parameters
-
[in] network_info Network information for joining network including channel, tx power, pan ID
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1504 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_leave) (void) |
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1469 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_permitjoin) (int duration_sec) |
- Parameters
-
[in] duration Second value to permit joining, 0xff is unlimited
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1464 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_request_my_network_status) (artik_zigbee_network_state *state) |
- Parameters
-
[out] state ARTIK_ZIGBEE_JOINED_NETWORK when succeeded IGBEE_NO_NETWORK if the node is not part of a network
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_cli.c, and zigbee_test/artik_zigbee_test.c.
Definition at line 1526 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_start) (artik_zigbee_network_state *state) |
This should be called on startup whether or not the node was previously part of a network.
- Parameters
-
[out] state ARTIK_ZIGBEE_JOINED_NETWORK when succeeded ARTIK_ZIGBEE_NO_NETWORK if the node is not part of a network
- Returns
- Result of operation, S_OK on success, error code otherwise.
- Examples:
- zigbee_test/artik_zigbee_cli.c, and zigbee_test/artik_zigbee_test.c.
Definition at line 1435 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::network_stop_scan) (void) |
- Returns
- Result of operation, S_OK when succeeded, otherwise failed.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1497 of file artik_zigbee.h.
| void(* artik_zigbee_module::raw_request) (const char *command) |
- Parameters
-
[in] command String of CLI command
- Examples:
- zigbee_test/artik_zigbee_cli.c.
Definition at line 1601 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::reset_local) (void) |
- Returns
- Result of operation, S_OK on success, error code otherwise.
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1378 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::set_discover_cycle_time) (unsigned int time_minutes) |
- Parameters
-
[in] time_minutes The cyclic duaration, in minutes, positive value. The default cyclic duration is 1 minute. If the value is equal to 0 , the loop timer is stopped.
- Returns
- Result of operation, S_OK when succeeded
- Examples:
- zigbee_test/artik_zigbee_test.c.
Definition at line 1564 of file artik_zigbee.h.
| artik_error(* artik_zigbee_module::set_local_endpoint) (artik_zigbee_local_endpoint_info *endpoint_info) |
- Parameters
-
[in] endpoint_info The local endpoints to be saved
- Returns
- Result of operation, S_OK on success, error code otherwise.
- Examples:
- zigbee_test/artik_zigbee_cli.c, and zigbee_test/artik_zigbee_test.c.
Definition at line 1388 of file artik_zigbee.h.
The documentation for this struct was generated from the following file:
- inc/zigbee/artik_zigbee.h