cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SDK data logging

Issue with SDK data logging

Hi all.

I work on C and java SDK. I'm trying to use the examples(SteamSensor) to understand how work the SDK.

I start up SteamSensor and after few second I stop tomcat. I was thinking that data will be saved locally and when tomcat restart, all saved data are pushed. But it doesn't work.

So I want to know if provided examples need more configuration for this or if it's an issue with the SDK.

Thanks.

Regards,

    Julien

2 REPLIES 2

Re: Issue with SDK data logging

Hi,

Here's the information I found page 23 of the Thingworx C SDK Developer's guide:

Handling Offline Messages

The C SDK has multiple options for offline message storage. Offline message

storage will queue up outgoing request messages for later delivery if the network

is down or the duty cycle modulation component of the AlwaysOn protocol

happens to be in the “off” state. If OFFLINE_MSG_STORE is not defined or set

to 0, outbound messages are not queued at all. If OFFLINE_MSG_STORE is set

to 1, messages will be queued up in RAM, up to a limit of OFFLINE_MSG_

QUEUE_SIZE as defined in src/config/twDefaultSettings.h. When

connectivity is re-established, all the messages in this queue will be sent out to the

server...

Highlighted

Re: Issue with SDK data logging

Hi,

Thanks for the answer and guide http://support.ptc.com/WCMS/files/166920/en/ThingWorx_C_SDK_Developer_Guide_v1.2.pdf.

I've set this #define and I encountered a probleme with "stream data" on Thingworx (to save data changes) : it's not working. With a "valuestream" it works better and it send the offline queue content when the connection is back.

Unfortunately, data sent between the time the server is off and the time the SDK detect it are lost. It looks like those data are not added to the queue.

I reduced ping rate time and pong to detect quickly the unavailable server to limite lost data. Do you know if there is a better solution ?

Thanks.

Regards,

    Julien