• Home
  • Raw
  • Download

Lines Matching refs:op_code

51 uint32_t gatt_sr_enqueue_cmd(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code,  in gatt_sr_enqueue_cmd()  argument
67 if ((p_cmd->op_code == 0) || in gatt_sr_enqueue_cmd()
68 (op_code == GATT_HANDLE_VALUE_CONF)) /* no pending request */ in gatt_sr_enqueue_cmd()
70 if (op_code == GATT_CMD_WRITE || op_code == GATT_SIGN_CMD_WRITE || in gatt_sr_enqueue_cmd()
71 op_code == GATT_REQ_MTU || op_code == GATT_HANDLE_VALUE_CONF) { in gatt_sr_enqueue_cmd()
75 p_cmd->op_code = op_code; in gatt_sr_enqueue_cmd()
96 if (cid == tcb.att_lcid) return (tcb.sr_cmd.op_code == 0); in gatt_sr_cmd_empty()
101 return (channel->server_outstanding_cmd_.op_code == 0); in gatt_sr_cmd_empty()
276 uint8_t op_code, tGATT_STATUS status, in gatt_sr_process_app_rsp() argument
286 if ((op_code == GATT_REQ_READ_MULTI) || in gatt_sr_process_app_rsp()
287 (op_code == GATT_REQ_READ_MULTI_VAR)) { in gatt_sr_process_app_rsp()
292 if (op_code == GATT_REQ_PREPARE_WRITE && status == GATT_SUCCESS) in gatt_sr_process_app_rsp()
295 if (op_code == GATT_REQ_EXEC_WRITE && status != GATT_SUCCESS) in gatt_sr_process_app_rsp()
302 sr_res_p->p_rsp_msg = attp_build_sr_msg(tcb, (uint8_t)(op_code + 1), in gatt_sr_process_app_rsp()
314 ret_code = gatt_send_error_rsp(tcb, sr_res_p->cid, status, op_code, in gatt_sr_process_app_rsp()
336 void gatt_process_exec_write_req(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code, in gatt_process_exec_write_req() argument
344 if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code) { in gatt_process_exec_write_req()
371 trans_id = gatt_sr_enqueue_cmd(tcb, cid, op_code, 0); in gatt_process_exec_write_req()
402 void gatt_process_read_multi_req(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code, in gatt_process_read_multi_req() argument
414 multi_req->variable_len = (op_code == GATT_REQ_READ_MULTI_VAR); in gatt_process_read_multi_req()
418 if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code) { in gatt_process_read_multi_req()
460 trans_id = gatt_sr_enqueue_cmd(tcb, cid, op_code, multi_req->handles[0]); in gatt_process_read_multi_req()
474 tcb, cid, it->p_db, op_code, handle, 0, p_msg->attr_value.value, in gatt_process_read_multi_req()
479 gatt_sr_process_app_rsp(tcb, it->gatt_if, trans_id, op_code, in gatt_process_read_multi_req()
492 gatt_send_error_rsp(tcb, cid, err, op_code, handle, false); in gatt_process_read_multi_req()
506 BT_HDR* p_msg, tGATT_TCB& tcb, uint16_t cid, uint8_t op_code, in gatt_build_primary_service_rsp() argument
525 if (op_code == GATT_REQ_READ_BY_GRP_TYPE) in gatt_build_primary_service_rsp()
530 *p++ = op_code + 1; in gatt_build_primary_service_rsp()
534 if (op_code == GATT_REQ_READ_BY_GRP_TYPE) { in gatt_build_primary_service_rsp()
545 if (op_code == GATT_REQ_FIND_TYPE_VALUE && value != *p_uuid) continue; in gatt_build_primary_service_rsp()
558 if (op_code == GATT_REQ_READ_BY_GRP_TYPE) in gatt_build_primary_service_rsp()
640 static tGATT_STATUS gatts_validate_packet_format(uint8_t op_code, uint16_t& len, in gatts_validate_packet_format() argument
651 uint16_t uuid_len = (op_code == GATT_REQ_FIND_TYPE_VALUE) ? 2 : len; in gatts_validate_packet_format()
673 uint8_t op_code, uint16_t len, in gatts_process_primary_service_req() argument
679 gatts_validate_packet_format(op_code, len, p_data, &uuid, s_hdl, e_hdl); in gatts_process_primary_service_req()
681 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_primary_service_req()
686 if (op_code == GATT_REQ_READ_BY_GRP_TYPE) { in gatts_process_primary_service_req()
687 gatt_send_error_rsp(tcb, cid, GATT_UNSUPPORT_GRP_TYPE, op_code, s_hdl, in gatts_process_primary_service_req()
695 gatt_send_error_rsp(tcb, cid, GATT_NOT_FOUND, op_code, s_hdl, false); in gatts_process_primary_service_req()
703 if (op_code == GATT_REQ_FIND_TYPE_VALUE) { in gatts_process_primary_service_req()
705 gatt_send_error_rsp(tcb, cid, GATT_INVALID_PDU, op_code, s_hdl, false); in gatts_process_primary_service_req()
714 reason = gatt_build_primary_service_rsp(p_msg, tcb, cid, op_code, s_hdl, in gatts_process_primary_service_req()
718 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_primary_service_req()
736 uint8_t op_code, uint16_t len, in gatts_process_find_info() argument
741 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_find_info()
753 *p++ = op_code + 1; in gatts_process_find_info()
774 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_find_info()
853 uint8_t op_code, uint16_t len, in gatts_process_read_by_type_req() argument
858 gatts_validate_packet_format(op_code, len, p_data, &uuid, s_hdl, e_hdl); in gatts_process_read_by_type_req()
861 if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code) { in gatts_process_read_by_type_req()
873 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_read_by_type_req()
883 *p++ = op_code + 1; in gatts_process_read_by_type_req()
895 tcb, cid, el.p_db, op_code, p_msg, s_hdl, e_hdl, uuid, &buf_len, in gatts_process_read_by_type_req()
917 gatt_send_error_rsp(tcb, cid, reason, op_code, s_hdl, false); in gatts_process_read_by_type_req()
930 uint8_t op_code, uint16_t len, in gatts_process_write_req() argument
941 switch (op_code) { in gatts_process_write_req()
947 gatt_send_error_rsp(tcb, cid, GATT_INVALID_PDU, op_code, handle, false); in gatts_process_write_req()
955 if (op_code == GATT_SIGN_CMD_WRITE) { in gatts_process_write_req()
962 if (op_code == GATT_REQ_WRITE || op_code == GATT_REQ_PREPARE_WRITE) in gatts_process_write_req()
975 status = gatts_write_attr_perm_check(el.p_db, op_code, handle, in gatts_process_write_req()
980 trans_id = gatt_sr_enqueue_cmd(tcb, cid, op_code, handle); in gatts_process_write_req()
1009 (op_code == GATT_REQ_PREPARE_WRITE || op_code == GATT_REQ_WRITE)) { in gatts_process_write_req()
1010 gatt_send_error_rsp(tcb, cid, status, op_code, handle, false); in gatts_process_write_req()
1019 tGATT_SRV_LIST_ELEM& el, uint8_t op_code, in gatts_process_read_req() argument
1027 if (op_code == GATT_REQ_READ_BLOB && len < sizeof(uint16_t)) { in gatts_process_read_req()
1032 gatt_send_error_rsp(tcb, cid, GATT_INVALID_PDU, op_code, 0, false); in gatts_process_read_req()
1038 if (op_code == GATT_REQ_READ_BLOB) STREAM_TO_UINT16(offset, p_data); in gatts_process_read_req()
1041 *p++ = op_code + 1; in gatts_process_read_req()
1050 tcb, cid, el.p_db, op_code, handle, offset, p, &value_len, in gatts_process_read_req()
1060 gatt_send_error_rsp(tcb, cid, reason, op_code, handle, false); in gatts_process_read_req()
1078 void gatts_process_attribute_req(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code, in gatts_process_attribute_req() argument
1094 if (gatt_cb.enable_err_rsp && gatt_cb.req_op_code == op_code) { in gatts_process_attribute_req()
1110 switch (op_code) { in gatts_process_attribute_req()
1113 gatts_process_read_req(tcb, cid, el, op_code, handle, len, p); in gatts_process_attribute_req()
1120 gatts_process_write_req(tcb, cid, el, handle, op_code, len, p, in gatts_process_attribute_req()
1135 if (status != GATT_SUCCESS && op_code != GATT_CMD_WRITE && in gatts_process_attribute_req()
1136 op_code != GATT_SIGN_CMD_WRITE) in gatts_process_attribute_req()
1137 gatt_send_error_rsp(tcb, cid, status, op_code, handle, false); in gatts_process_attribute_req()
1227 void gatts_process_value_conf(tGATT_TCB& tcb, uint16_t cid, uint8_t op_code) { in gatts_process_value_conf() argument
1244 uint32_t trans_id = gatt_sr_enqueue_cmd(tcb, cid, op_code, handle); in gatts_process_value_conf()
1254 uint8_t op_code, uint16_t len, in gatts_process_db_out_of_sync() argument
1262 switch (op_code) { in gatts_process_db_out_of_sync()
1268 tGATT_STATUS reason = gatts_validate_packet_format(op_code, len, p_data, in gatts_process_db_out_of_sync()
1315 gatt_send_error_rsp(tcb, cid, GATT_DATABASE_OUT_OF_SYNC, op_code, 0x0000, in gatts_process_db_out_of_sync()
1319 << ", op_code=" << loghex((uint16_t)op_code) in gatts_process_db_out_of_sync()
1329 uint8_t op_code, uint16_t len, in gatt_server_handle_client_req() argument
1332 if (!gatt_sr_cmd_empty(tcb, cid) && op_code != GATT_HANDLE_VALUE_CONF) return; in gatt_server_handle_client_req()
1343 if (op_code != GATT_CMD_WRITE && op_code != GATT_SIGN_CMD_WRITE && in gatt_server_handle_client_req()
1344 op_code != GATT_HANDLE_VALUE_CONF) { in gatt_server_handle_client_req()
1345 gatt_send_error_rsp(tcb, cid, GATT_INVALID_PDU, op_code, 0, false); in gatt_server_handle_client_req()
1350 if (gatts_process_db_out_of_sync(tcb, cid, op_code, len, p_data)) return; in gatt_server_handle_client_req()
1352 switch (op_code) { in gatt_server_handle_client_req()
1355 gatts_process_primary_service_req(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()
1359 gatts_process_find_info(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()
1365 gatts_process_read_by_type_req(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()
1374 gatts_process_attribute_req(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()
1378 gatts_process_value_conf(tcb, cid, op_code); in gatt_server_handle_client_req()
1386 gatt_process_exec_write_req(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()
1391 gatt_process_read_multi_req(tcb, cid, op_code, len, p_data); in gatt_server_handle_client_req()