IInputProvider.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. namespace BBIWARG.Input.InputProviding
  3. {
  4. /// <summary>
  5. /// signature for the event that the device started
  6. /// </summary>
  7. /// <param name="sender">sender of the event</param>
  8. /// <param name="e">arguments of the event</param>
  9. public delegate void DeviceStartedEventHandler(object sender, EventArgs e);
  10. /// <summary>
  11. /// signature for the event that a new frame is available
  12. /// </summary>
  13. /// <param name="sender">sender of the event</param>
  14. /// <param name="e">arguments of the event</param>
  15. public delegate void NewFrameEventHandler(object sender, NewFrameEventArgs e);
  16. public interface IInputProvider
  17. {
  18. /// <summary>
  19. /// the id of the current frame
  20. /// </summary>
  21. int CurrentFrameID { get; }
  22. /// <summary>
  23. /// the horizontal field of view angle
  24. /// </summary>
  25. float FieldOfViewHorizontal { get; }
  26. /// <summary>
  27. /// the vertical field of view angle
  28. /// </summary>
  29. float FieldOfViewVertical { get; }
  30. /// <summary>
  31. /// the height of all images
  32. /// </summary>
  33. int ImageHeight { get; }
  34. /// <summary>
  35. /// the width of all images
  36. /// </summary>
  37. int ImageWidth { get; }
  38. /// <summary>
  39. /// true iff the input source provides data
  40. /// </summary>
  41. bool IsActive { get; }
  42. /// <summary>
  43. /// event that the device started
  44. /// </summary>
  45. event DeviceStartedEventHandler DeviceStartedEvent;
  46. /// <summary>
  47. /// event that a new frame is available
  48. /// </summary>
  49. event NewFrameEventHandler NewFrameEvent;
  50. void initialize();
  51. void start();
  52. void stop();
  53. }
  54. }