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>
23 #include <zb-custom.h>
29 API int zb_aps_send(zigbee_h handle, nwk_addr addr16, unsigned char aps_frame_ctl,
30 unsigned char src_ep, unsigned char dst_ep, unsigned short cluster_id,
31 unsigned short profile_id, unsigned char zcl_frame_ctl, unsigned short mfg_code,
32 unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
33 zb_aps_send_rsp cb, void *user_data)
35 int ret = ZIGBEE_ERROR_NONE;
36 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
38 ret = zbl_aps_send(addr16, aps_frame_ctl, src_ep, dst_ep, cluster_id, profile_id,
39 zcl_frame_ctl, mfg_code, cmd_id, payload_len, payload, cb, user_data);
40 DBG("zbl_aps_send()=0x%X", ret);
44 API int zb_zcl_send(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
45 unsigned char dst_ep, unsigned short cluster_id, unsigned char zcl_frame_ctl,
46 unsigned char cmd, unsigned short payload_len, unsigned char *payload,
47 zb_zcl_send_rsp cb, void *user_data)
49 int ret = ZIGBEE_ERROR_NONE;
50 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
52 ret = zbl_zcl_send(addr16, src_ep, dst_ep, cluster_id, zcl_frame_ctl,
53 cmd, payload_len, payload, cb, user_data);
54 DBG("zbl_zcl_send()=0x%X", ret);
58 API int zb_send_to_local(zigbee_h handle, unsigned short length, unsigned char *data,
59 zb_send_to_local_rsp cb, void *user_data)
61 int ret = ZIGBEE_ERROR_NONE;
62 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
64 ret = zbl_send_to_local(length, data, cb, user_data);
65 DBG("zbl_send_to_local()=0x%X", ret);