Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
1.9 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 24/04/2000
  5. // Last modification: 08/10/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Queue for target
  8. // FILE: EventQueue.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CTargetQueue
  13. //----------------------------------------------------------------------------
  14. #ifndef __SEVENT__QUEUE__H__INCLUDED__
  15. #define __SEVENT__QUEUE__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19. #include "..\lglib\templ.h"
  20. #define MAX_EVENT_TEXT 100
  21. struct TARGET_DESCRIPTION
  22. {
  23. SYSTEMTIME time;
  24. double angle;
  25. double range;
  26. char master;
  27. __int32 device;
  28. LONG width;
  29. };
  30. typedef TARGET_DESCRIPTION* LPTARGET_DESCRIPTION;
  31. struct TARGET
  32. {
  33. LARGE_INTEGER time;
  34. __int32 type;
  35. float angle;
  36. float range;
  37. __int32 device;
  38. LONG width;
  39. TCHAR pError[MAX_EVENT_TEXT];
  40. TARGET();
  41. TARGET(const LARGE_INTEGER&, const double&, const double&, __int32, __int32, LPCTSTR, LONG );// 21/05/2001
  42. };
  43. inline
  44. TARGET::TARGET()
  45. {
  46. time.QuadPart = 0;;
  47. type = 0;
  48. angle = 0;
  49. range = 0;
  50. device = 0;
  51. width = 0;
  52. pError[0] = 0;
  53. }
  54. inline
  55. TARGET::TARGET(const LARGE_INTEGER& tm, const double& ang,
  56. const double& ran, __int32 tp, __int32 dv, LPCTSTR pText, LONG nWidth )
  57. {
  58. time = tm;
  59. angle = ang;
  60. range = ran;
  61. type = tp;
  62. device = dv;
  63. width = nWidth;
  64. if( pText )
  65. strncpy( pError, pText, MAX_EVENT_TEXT );
  66. }
  67. typedef TARGET* LPTARGET;
  68. class CTargetQueue :
  69. public CLgQueueP<TARGET,100>
  70. {
  71. public:
  72. BOOL PostEvent(__int32 type, const double& angle, const double& range, __int32 dv, LPCTSTR pText, LONG pWidth );// By reference23/04/2001
  73. };
  74. #endif