Introducing the foundations of a general framework for closed-loop control in additive manufacturing via in situ measurements and semantic annotations