Hi

Seems like the observation notifications sent by IoTivity Simulator 1.1.1
use illegal reserved sequence values.

I am using Java API on Android to receive the notifications:


*onObserveCompleted
<https://api-docs.iotivity.org/latest-java/org/iotivity/base/OcResource.OnObserveListener.html#onObserveCompleted(java.util.List,%20org.iotivity.base.OcRepresentation,%20int)>*
(java.util.List<OcHeaderOption
<https://api-docs.iotivity.org/latest-java/org/iotivity/base/OcHeaderOption.html>
> headerOptionList, OcRepresentation
<https://api-docs.iotivity.org/latest-java/org/iotivity/base/OcRepresentation.html>
ocRepresentation,
int sequenceNumber)


Looking at sequenceNumber:

I understand that 0 value is reserved for REGISTER, 1 value is reserved for
DEREGISTER.

When a *new resource* is created in Simulator, and  I am registering an
observer from my code:
1. Getting "0" value upon registration - correct
2. Getting "1" value upon 1st update - *WRONG*.

Unfortunately, I cannot just "ignore" the "1" sequence value: the Java
Android library getting crashes in the "native code" upon next notification
arriving!
I tried it multiple times, and it consistently crashes with "1", and did
not crash when "1" value does not arrive.

Is it possible to fix the Simulator, to avoid sending reserved "sequence"
values?
A quick patch will be appreciated.

Thanks and best regards,

Max

Software Architect - Tekoia Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160915/d46d6cad/attachment.html>

Reply via email to