I've got an idea, but I wonder whether somebody else already has named it.
I'm writing code to control a machine with actuators, motors, etc., and software will be responsible for preventing collisions between some of its moving parts.
It's mostly useful to organize everything as a hierarchy, but collisions are possible between different sub-systems. The need for collision avoidance cuts across the hierarchy.
My idea is to create objects that I will call "hazard recognizers" for the present. Each hazard recognizer watches for one specific hazard by monitoring the machine's sensors and, is injected into the places were each motor and actuator that contributes to the hazard is controlled. The software that controls actuator X will consult a list of recognizers before each time it changes the state of the actuator.
Never mind how I will define the list of recognizers or, how I will ensure that each one is injected into every place where it is needed. My question is, has somebody already given this pattern a name?
Or, Has somebody already given this problem a name? I'd like to learn more about how other people have solved it, but I'm not sure what to search for.