smartheim / wakaamaNode

lwM2M library based on Wakaama for PlattformIO/cmake with easy object API
https://openhab-nodes.github.io/wakaamaNode/
MIT License
27 stars 18 forks source link

Changes for pull request #18

Closed taubel closed 6 years ago

taubel commented 6 years ago

A few issues I have noticed while building the program on a freertos platform.

First of all, "timeouts.h" seems to be not needed by the application, only by the source files in "/test" and "/contrib". In my case, the header "timeouts.h" isn't even included in the platform's I am working on framework.

The next problem is with trying to find out the size of a string with the "sizeof()" method. In this case the string is a pointer, so the method only returns the size of a pointer, which depends on the platform, not the actual length of the string.

Also, I have had problems with object templates in the "objects.h" file. I can't tell if this is a problem with Wakama library, or the framework. Compiling code included from any of the object header's (for example 3312.h) causes the "delete" method in objects.h:255 to be called, because there can't be found a template for instance resources "int Dimmer" and "int OnTime", even though there is a template for "int32_t" types in objects.h:354. This might be caused because of "int" type ambiguity in different platforms, but I am not sure.

davidgraeff commented 6 years ago

Thanks for the changes. I was on vacation and only now had time to review.

I will add a freertos example to the CI set and hopefully can catch some of your mentioned weirdnesses