namespace TBF.BenchControl.Generic { public interface IDevice { void Initialize(); /// /// This function is invoked regularly each 1000 ms (once per second) /// just before Start(), Run() and Stop() functions of acrive operations. /// /// It runs in a thread created by class Machine (not the user interface thread). /// The function should not block (otherwise it blocks all other devices) !!! /// In case needed, the device must create its own thread to handle hardware /// without any interference with the rest of the system. /// void RunDeviceBefore(); /// /// This function is invoked regularly each 1000 ms (once per second) /// just before Start(), Run() and Stop() functions of acrive operations. /// /// It runs in a thread created by class Machine (not the user interface thread). /// The function should not block (otherwise it blocks all other devices) !!! /// In case needed, the device must create its own thread to handle hardware /// without any interference with the rest of the system. /// void RunDeviceAfter(); /// /// Should be invoked once before state machine is stopped and program exits. /// Only Stop() operations may be called afterwards (No Start() / Run() operation). /// void StopDevice(); } }