Hi all, we are investigating https://jira.iotivity.org/browse/IOT-1828 and can 
use some input.

Currently code that uses ocstack needs to periodically call OCProcess( ) (most 
call it every 10 ms).
The OCProcess( ) performs 4 functions: (1) process received packets, (2) handle 
presence, (3) handle gateway routing, and (4) handle TCP keepalive.

Waking up often is not great for applications running on battery operated 
devices.  We think calling OCProcess() should only be needed on single threaded 
platforms, like Arduino (i.e. when SINGLE_THREAD is defined).

Looking at camessagehandler.c, it seems like the IoTivity code was at some 
point able to handle its own send & receive.   Then SINGLE_HANDLE flag was set 
permanently and function (1) is now handled by periodic OCProcess( ) instead.   
 Does anyone know the history of SINGLE_HANDLE?

We want to propose making OCProcess( ) needed only on single threaded platform. 
 To do that we'll re-enable the receive thread, remove all references to 
SINGLE_HANDLE, and subsequently add new thread(s) to perform function 2 to 4.

Can anyone think why this won't work?   Thanks!



-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170310/4d224a1a/attachment.html>

Reply via email to