hi: I want to get a handle value data, which it is't in cache. please tell me how to do. thanks.
Hi,
First make sure that you have actually received the handle-value pair you are trying to access. If you suddenly no longer can find the handle-value pair, it could have fallen out of the “data cache”. If a value falls out of the "data cache", the device stops retransmitting it and you no longer have access to the value through the rbc_mesh_value_get() function. This can happen if you receive so many new handle-value pairs, that you no longer have enough memory for the old handle-value pair.
If you want to ensure that a handle-value pair is not forgotten, you can use the function rbc_mesh_persistence_set() to achieve this. Note that setting too many persistent values in the cache will reduce the framework's ability to retransmit non-persistent values, it is therefore recommended to be conservative about the usage of this flag. But, It is recommended that all values that the device intends to write to later are marked as persistent.
How many handle-value pair have you added? If you don't want it to fall out of the "data cache" just make it persistent with the rbc_mesh_persistence_set()
function. That is the easiest approach.
If you don't want to do that, you could manually add it the mesh again with the function rbc_mesh_value_enable(...)
, and add the value with rbc_mesh_value_set(...)
from a device that have the data you want to transmit.