axcs_obl.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*##############################################################################*/
  2. /* axcs_obl.h */
  3. /*##############################################################################*/
  4. /* Contains definitions for handling with the AXCS object list */
  5. /* The axcs header file must be included before !!! */
  6. /* */
  7. /* Programming language: C/C++ ( ANSI ) */
  8. /* */
  9. /*##############################################################################*/
  10. /* 21-Oct-2010 Wi include of axcs header file removed */
  11. /* 07-May-2008 Wi new structure of object description list and trace file */
  12. /* 13-Jan-2000 Wi created */
  13. /* */
  14. /*##############################################################################*/
  15. #ifndef AXCS_OBL_H
  16. #define AXCS_OBL_H
  17. #pragma pack (push, 1)
  18. // definition of a generic object with the maximum length an object can have
  19. //
  20. #define AXCS_MAX_PARAM_LENGTH (MAX_LEN_ACS_OBJ - sizeof(acs_obj_header_t))
  21. typedef struct axcs_raw_obj_t_tag
  22. {
  23. acs_obj_header_t axcs_head;
  24. ACS_BYTE data [AXCS_MAX_PARAM_LENGTH];
  25. } axcs_raw_obj_t;
  26. #define AXCS_MAX_VAR_PARA_COUNT 50 // max. number of parameters in a dynamic block
  27. /***************************************************************
  28. This is the general structure of the object description list:
  29. File header
  30. Object-1
  31. Parameter-1
  32. Parameter-2
  33. Parameter-n
  34. Object-n
  35. Parameter-1
  36. Parameter-n
  37. *****************************************************************/
  38. // Object list: Description of the header part of each list
  39. // The length of the header is always 128 bytes
  40. typedef struct obj_file_head{
  41. ACS_STRING_8 fh_obl_version[2]; // internal version of the list
  42. ACS_STRING_8 fh_data_version[24]; // version of the data
  43. ACS_STRING_8 fh_system[24]; // name of the system
  44. ACS_STRING_8 fh_date[24];
  45. ACS_STRING_8 fh_time[24];
  46. ACS_DUMMY fh_dummy1[30];
  47. } obj_file_header;
  48. // Object list: Description of a parameters
  49. //
  50. typedef struct axcs_obl_para_t_tag
  51. {
  52. ACS_STRING_8 name [32];
  53. ACS_BYTE type;
  54. ACS_DUMMY dummy1;
  55. ACS_WORD array_length;
  56. ACS_LINT min_range;
  57. ACS_LINT max_range;
  58. ACS_STRING_8 value [20];
  59. ACS_STRING_8 dimension [24];
  60. ACS_DUMMY dummy2[8];
  61. } axcs_obl_para_t;
  62. // Object list: Description of an object
  63. // The length is always 64 bytes
  64. typedef struct axcs_obl_obj_t_tag
  65. {
  66. ACS_LINT dont_care_mask;
  67. void* prev; // not used in file
  68. ACS_DUMMY dummy1[8];
  69. ACS_STRING_8 name [32];
  70. acs_obj_header_t head;
  71. ACS_WORD para_count;
  72. ACS_DUMMY dummy2[2];
  73. axcs_obl_para_t* para_anker; // not used in file
  74. } axcs_obl_obj_t;
  75. // Objekt-Liste: Defines fuer para_struct: type
  76. // die oberen zwei Bit werden anderweitig verwendet
  77. // deshalb sollte der Wert dieses defines max. 63 sein
  78. //
  79. #define AXCS_STRING_ASC 0 // string 16
  80. #define AXCS_ENUM_DEC 1
  81. #define AXCS_INT_DEC 2
  82. #define AXCS_WORD_HEX 3
  83. #define AXCS_LINT_DEC 4
  84. #define AXCS_BYTE_HEX 5
  85. #define AXCS_BYTE_CNT 6 // unsigned 8 bit
  86. #define AXCS_SET_HEX 7
  87. #define AXCS_INT_CNT 8 // unsigned 16 bit
  88. #define AXCS_ENUM_HEX 9
  89. #define AXCS_ENUM_BIN 10
  90. #define AXCS_INT_HEX 11
  91. #define AXCS_WORD_DEC 12
  92. #define AXCS_LINT_HEX 13
  93. #define AXCS_BYTE_DEC 14
  94. #define AXCS_BYTE_BIN 15
  95. #define AXCS_SET_DEC 16
  96. #define AXCS_DWORD_DEC 17
  97. #define AXCS_DWORD_HEX 18
  98. #define AXCS_INT8_DEC 19
  99. #define AXCS_STRING8_ASCII 20
  100. /*************************************************************
  101. This is the general structure of the object description list:
  102. file header
  103. object-1
  104. object-2
  105. object-n
  106. For each object 1464 bytes are stored:
  107. 4 bytes the time difference regarding the start time in [ms]
  108. 1460 bytes the normal axcs object
  109. **************************************************************/
  110. #define AXCS_MAX_FILE_TAG_LENGTH 50 // Maximum characters for file tags in an file
  111. typedef struct trace_file_head{
  112. ACS_STRING_8 szFileTag[AXCS_MAX_FILE_TAG_LENGTH];
  113. SYSTEMTIME StartTime; //16 Bytes
  114. ACS_DUMMY szDummy1[14]; // they have to be filled with 0
  115. ACS_STRING_8 sz_TraceFile_VersionKey[16];
  116. ACS_STRING_8 sz_TraceFile_Version[16];
  117. ACS_STRING_8 sz_Obl_VersionKey[8];
  118. ACS_STRING_8 sz_Obl_Version[24];
  119. ACS_STRING_8 sz_Acsos_VersionKey[16];
  120. ACS_STRING_8 sz_Acsos_Version[16];
  121. ACS_STRING_8 sz_DateKey[16];
  122. ACS_STRING_8 sz_Date[16];
  123. ACS_STRING_8 sz_TimeKey[16];
  124. ACS_STRING_8 sz_Time[16];
  125. ACS_STRING_8 sz_SystemKey[8];
  126. ACS_STRING_8 sz_System[24];
  127. ACS_DUMMY szDummy2[1192]; // they have to be filled with 0
  128. } trace_file_head;
  129. // Struktur eines Objekts im AXCS trace file
  130. //
  131. typedef struct axcs_trace_obj_t_tag
  132. {
  133. ACS_LINT time_stamp; // timestamp in milliseconds
  134. axcs_raw_obj_t axcs_object;
  135. } axcs_trace_obj_t;
  136. // New file tag for AXCS trace file
  137. #define AXCS_TRACE_FILE_TAG "AcsosNT Trace File" // every trace starts with this string
  138. #define AXCS_TRACE_FILE_VERSION_KEY "TraceFile-Ver:" // tag from version 2 onwards
  139. #define AXCS_TRACE_FILE_VERSION "2" // version string
  140. #define AXCS_OBL_VERSION_KEY "Obl-Ver:"
  141. #define AXCS_DATE_KEY "Date:"
  142. #define AXCS_TIME_KEY "Time:"
  143. #define AXCS_SYSTEM_KEY "System:"
  144. #pragma pack (pop)
  145. #endif