2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include <zb-common.h>
28 API int zb_aps_send(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char aps_fc,
29 unsigned char src_ep, unsigned char dst_ep, unsigned short clusterid,
30 unsigned short profileid, unsigned char zcl_fc, unsigned short mfg_code,
31 unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
32 zb_aps_send_cb cb, void *user_data)
34 CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
36 int ret = ZIGBEE_ERROR_NONE;
37 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
39 ret = zbl_aps_send(addr16, aps_fc, src_ep, dst_ep, clusterid, profileid,
40 zcl_fc, mfg_code, cmd_id, payload_len, payload, cb, user_data);
41 DBG("zbl_aps_send()=0x%X", ret);
45 API int zb_zcl_send(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
46 unsigned char dst_ep, zb_cluster_id clusterid, unsigned char zcl_fc,
47 unsigned char cmd, unsigned short payload_len, unsigned char *payload,
48 zb_zcl_send_cb cb, void *user_data)
50 CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
52 int ret = ZIGBEE_ERROR_NONE;
53 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
55 ret = zbl_zcl_send(addr16, src_ep, dst_ep, clusterid, zcl_fc,
56 cmd, payload_len, payload, cb, user_data);
57 DBG("zbl_zcl_send()=0x%X", ret);
61 API int zb_send_to_local(zb_zigbee_h handle, unsigned short length,
62 unsigned char *data, zb_send_to_local_cb cb, void *user_data)
64 CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
66 int ret = ZIGBEE_ERROR_NONE;
67 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
69 ret = zbl_send_to_local(length, data, cb, user_data);
70 DBG("zbl_send_to_local()=0x%X", ret);