BSA – Importing Source Code

This first version of BSA will not have any capability to create anything than HMI, so we need to be smart about how we integrate source code. And the answer is straight forward:

  • We could parse the source and auto-detect interface functions and events – it is possible, but it will require a good parser and it would still be a challenge to get it right – how do we detect events etc. The Answer could be that we use an API and detect that usage. It is possible.
  • The alternative I like is simpler – I expect the developer to add Interface tags in comments. This is already done by tools like Doxygen, but I want code to be clean and comments to be readable – so what I will do is to parse tags that are formatted as proper comments – and we can generate them as well. This means I parse a definition of an interface from structured, readable comments and leave it up to the developer to ensure the specification and code to be in line.

Now – this will work for my IoT devices as specified in my previous entry and it will work for any manual code the developer want to create or use – they add the interface specification in code.

I am not against parsing source code, but I realize that is a larger task that I prefer to not dig into right now.

Categories: HMI

Leave a Reply