How to understand "attr_id = param->handle - custs1_env.shdl;" param->handle and custs1_env.shdl in this statement.

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
abc1724
Offline
Last seen:4 months 1 week ago
加入:2019-09-20 12:16
How to understand "attr_id = param->handle - custs1_env.shdl;" param->handle and custs1_env.shdl in this statement.

How to understand "attr_id = param->handle - custs1_env.shdl;" param->handle and custs1_env.shdl in this statement.

How is param->handle and custs1_env.shdl generated?

Device:
PW_Dialog
Offline
Last seen:1 week 3 days ago
工作人员
加入:2019-04-03 02:54
Hi,

Hi,

Can you describe a little more on the environment, which part of code in which project of SDK? Thanks.

abc1724
Offline
Last seen:4 months 1 week ago
加入:2019-09-20 12:16
DA1458x_SDK\5.0.4\projects

DA1458x_SDK\5.0.4\projects\target_apps\ble_examples\ble_app_profile\Keil_5 \ custs1_task

静态int gattc_write_cmd_ind_handler(ke_msg_id_t const msgid,
struct gattc_write_cmd_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)

PM_Dialog
Offline
Last seen:22小时38分钟前
工作人员
加入:2018-02-08 11:03
Hi There,

Hi There,

This is the implemetation of Custom 1 Service. The custs1_env.shdl is the Custom 1 Service Start Handle and the param->handle is the Handle of the attribute that has to be written.

Thanks, PM_Dialog