I am attempting to implement a solution for our robotic liquid handlers. The problem is that we have many different vendor liquid handlers in our company and even liquid handlers from the same company can differ. So I want to create a multi layer abstraction to simplify the programming. We cannot use open source projects hence why I need to do this internally. We have also not found any good open source options anyway.
As a high level overview: You have a liquid handler that picks up tips and performs pipetting operations, this robot also has a plate arm that pickup and move plates around the pipetting deck. Nothing in the physical world is perfect so of course the liquid handler will occasionally run into errors. Also, even if the liquid handler is working perfectly user may incorrectly load something on the deck that could also cause an error. What I want to do is create a multi layer abstraction to help with programming but also to simplify error handling.
Per programming design I want to compose the layers in a way which is as decoupled as possible, and therein lies my problem:
- My driver layer is for raw command execution. Lots of low level errors can occur here.
- My HAL layer is for simplified execution and the for the majority of error handling. Some errors will require user input (a UI dialogue or similar) and a retry (repeat the action or cleanup and then repeat).
- My API layer will group HAL devices and commands together to create very complex behaviors.
So my question is this: How can I design a system in such a way that I can handle the UI portion at such a low level without implementing UI components in the HAL or API layer? According to everything I have read the UI should be implemented in a UI layer or even dependency injection for even more flexibility.
I can add additional information as requested!
Thanks!