Revision history [back]

click to hide/show revision 1
initial version

Let me start off by saying that the code generator (ajcodegen.py) is somewhat out of date and needs some loving care by a developer in the near future. Hopefully, this can be done in the R16.04 time frame.

context

The practices around interface definition are very much in flux right now.

ajxmlcop has grown out of best practices that emerged from the work in the Interface Review Board (a subcommittee of the TSC that works to make sure standardized interfaces are of high quality and similar style). If you follow ajxmlcop's recommendations, you're well on your way to define a high quality interface yourself.

The AllJoyn Code Generator (ajcodegen.py) is currently lagging w.r.t. these best practices. It hasn't really seen any new functionality in the last year, and hence it does not yet incorporate (or even support) some of the best practices ajxmlcop encourages you to follow.

suggestion

For your concrete example here, I'd say the following applies:

  • the ajxmlcop output were WARNINGs and INFOs, not ERRORs. Hence, they can be ignored if you have a good reason. Not wanting to standardize your interface (it's a toy example anyway) is one, wanting to use the code generator can be another.
  • the ajcodegen output you see tells you that:
    • the <description> elements are ignored -> that's not that bad, the descriptions are informational only
    • the secure annotation is ignored -> that's worse, it basically means that your formal interface description tells the world it's supposed to be used in a secure way, while the code generated by ajcodegen.py will expose the interface in an insecure way.

So what I'd do, is leave the <description> elements in, but remove the secure annotation for now. If you do want to use secured interfaces, don't use the code generator, as it doesn't generate the right code for them.