I am a bit confused how that handler thing works in Legato. I read Legato concept part as well but that did not help me to understand it. Can anyone explain how to set up properly data connection API le_data_AddConnectionStateHandler
Documentation says: Add handler function for EVENT ‘le_data_ConnectionState’ - Ok, I guess that means I have to great my own function and pass it to the le_data_AddConnectionStateHandler() as a first parameter([in] handlerPtr). Is it so?
How should that function look like?
What is this [in]contextPtr? Why we need this and what is the proper way to get/great the reference?