Automating the Process Of Control Design: Generating control code for mechatronic systems structurally