variable length notification

4 posts / 0 new
Last post
Rony
Offline
Last seen:4 years 8 months ago
Master
加入:2014-05-15 15:02
variable length notification

Given that I set the characteristic data length to 20 bytes when creating the profile, is there a way in which i can dynamically change the length of the data to be transmitted?
The application gathers data for 10 milliseconds but the amount is variable.
Thanks

sklin
Offline
Last seen:5 years 8 months ago
Expert
加入:2014-08-12 08:01
Hi Rony

Hi Rony
Although the length of characteristc is 20 bytes,you can send the value with the length dynamically.
The length of the data is equal to the value you set when calling the below function.
attmdb_att_set_value(sample128_env.sample128_shdl+SAMPLE_CHAR4_VAL,
length,/*1~20*/
(uint8_t *)¶m->value);
if(sample128_env.char4_feature & PRF_CLI_START_NTF)
{
prf_server_send_event((prf_env_struct *)&sample128_env, false,
sample128_env.sample128_shdl + SAMPLE_CHAR4_VAL);
}

lyncxy119
Offline
Last seen:1 year 9 months ago
加入:2015-05-14 03:23
我怎么能知道更多呢

我怎么能知道更多呢information about some function like attmdb_att_set_value?

Rony
Offline
Last seen:4 years 8 months ago
Master
加入:2014-05-15 15:02
Thanks

Thanks
Exactly what I was looking for