PLCgen: Enable generating PLC code comments from user-added descriptions
When developing a CIF specification for a real-world system, various parts of the specification quite directly relate to real-world concepts such as building blocks in the system or requirements / needs that are covered from functional, legal, or other perspectives.
When generating PLC code from such a specification, it would be useful to be able to annotate such parts in the generated code to make the code more easy to understand and/or review.
As conceptual very sunny-weather idea (that is, ignoring all implementation restrictions):
From
// R1: Ensure at least one pump is working.
requirement pump1.on or pump2.on;
to
case event_pump1_off:
(* R1: Ensure at least one pump is working. *)
IF PUMP2_LP == ON THEN
PUMP1_LP := OFF;
END_IF;
case event_pump2_off:
(* R1: Ensure at least one pump is working. *)
IF PUMP1_LP == ON THEN
PUMP2_LP := OFF;
END_IF;
What needs to be discussed first is what can be done here.
Addresses #397 (closed)