A framework for implementing real time control systems