The documentation also talks about le_sms_setTimeout, but this function does not exist.
le_sms_Send was as expected, blocking, can anyone help with async operation with callback, has anyone got this working?
Jun 12 01:42:39 swi-mdm9x28 user.debug Legato: DBUG | helloWorld[2802]/framework T=main | le_sms_client.c le_sms_Create() 1035 | Sending message to server and waiting for response : 0 bytes sent
Jun 12 01:42:39 swi-mdm9x28 user.debug Legato: DBUG | helloWorld[2802]/framework T=main | le_sms_client.c le_sms_SetDestination() 1214 | Sending message to server and waiting for response : 16 bytes sent
Jun 12 01:42:39 swi-mdm9x28 user.debug Legato: DBUG | helloWorld[2802]/framework T=main | le_sms_client.c le_sms_SetText() 1308 | Sending message to server and waiting for response : 13 bytes sent
Jun 12 01:42:39 swi-mdm9x28 user.debug Legato: DBUG | helloWorld[2802]/framework T=main | le_sms_client.c le_sms_SendAsync() 1877 | Sending message to server and waiting for response : 8 bytes sent
Jun 12 01:42:44 swi-mdm9x28 user.info Legato: INFO | helloWorld[2802]/helloComponent T=main | helloWorld.c CallbackTestHandler() 19 | Message 0x10000001, status 4, ctx (nil)
Thank you for the confirmation. So I had two problems. First I was calling le_sms_Delete(msgRef) after the le_sms_SendAsync and second somehow the le_sms_SendAsync is running on different thread that I created, I think from my own linux timer (non-legato timer).
If I use your code as is, then all works well. I’m struggling to get to grips with a component that has no main loop so created a thread to counteract that, but guess I’m going down wrong path… need to play a bit more, thanks again for confirming. I’ll ask about polling for( ; ; ) on a different post if I don’t come right.