Strange compilation problem

Started by Jak


I tried to access NocanMessage member "dlen" in my program because that is what I saw in github in nocan_ll.h. The compiler said 'no member "dlen" in struct NocanMessage'. I was puzzled for a while thinking there was some strange visibility issue. I finally tried to access data_len, because this seemed to fit your pattern of naming. The compiler liked it. I'm thinking that the zip of your library does not match the checked in source code. Was data_len ever called dlen?

I'm still figuring out "best practices" and coding style on Arduino. Normally, I'd prefer accessors for internal data fields. I suppose it is a waste of memory on a small processor.



Hi Jak,
Ironically, I believe that data_len was called dlen a long time ago, but I don't think that's the issue here.
NocanMessage is defined in "nocan.h", not "nocan_ll.h". As far as I can see, the definition of NocanMessage on GitHub has data_len. nocan_ll.h/c is a lower level library that is called by nocan.h/c and is typically not invoked directly in the Arduino environment. A mismatch on Github is always possible, so if you still see something weird, let us know what urls on Github are affected.

You can find a more human readable documentation here:

A description of NocanMessage is provided here:

Hope this helps.