brsystem.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /* Automation Studio generated header file */
  2. /* Do not edit ! */
  3. #ifndef _BRSYSTEM_
  4. #define _BRSYSTEM_
  5. #ifdef __cplusplus
  6. extern "C"
  7. {
  8. #endif
  9. #include <bur/plctypes.h>
  10. #include <runtime.h>
  11. #ifndef _IEC_CONST
  12. #define _IEC_CONST _WEAK const
  13. #endif
  14. /* Constants */
  15. #ifdef _REPLACE_CONST
  16. #define brX2X 10U
  17. #define brPP 255U
  18. #define brCPU 1U
  19. #define brKEY 8U
  20. #define brDRAM 0U
  21. #define br2003 2U
  22. #define br2005 1U
  23. #define br2010 0U
  24. #define brC200 9U
  25. #define brC300 8U
  26. #define brADDON 7U
  27. #define brPANEL 6U
  28. #define brGLOBAL_REMANENT_PV 5U
  29. #define brLOCAL_REMANENT_PV 4U
  30. #define brUSRROM 3U
  31. #define brSYSROM 2U
  32. #define brUSRRAM 1U
  33. #define brACOPOS 7U
  34. #define brCAN_IO 5U
  35. #define brBASE_IO 3U
  36. #define brPRODUCT 0U
  37. #define brETHER_IO 6U
  38. #define brNO_FAMILY 255U
  39. #define brREMOTE_IO 4U
  40. #define brBATTERY_OK 1U
  41. #define brPOWERPANEL 5U
  42. #define brBATTERY_LOW 0U
  43. #define brLOGICSCANNER 3U
  44. #define brPLUGIN_MODULE 10U
  45. #define brSYSTEM_MODULE 2U
  46. #define brBATTERY_NOTEST 2U
  47. #define TARGET_BIG_ENDIAN 2U
  48. #define brBATTERY_MISSING 3U
  49. #define INIT_REASON_UNKNOWN (-1)
  50. #define INIT_REASON_DOWNLOAD 3
  51. #define TARGET_LITTLE_ENDIAN 1U
  52. #define brAUTOMATION_RUNTIME 4U
  53. #define brERR_INVALID_DEVICE 27250U
  54. #define INIT_REASON_COLDSTART 2
  55. #define INIT_REASON_WARMSTART 1
  56. #define brSYSCONF_SET_VOLATILE 0
  57. #define brERR_INVALID_PARAMETER 27251U
  58. #define brSYSCONF_SET_NON_VOLATILE 1
  59. #else
  60. _IEC_CONST unsigned char brX2X = 10U;
  61. _IEC_CONST unsigned char brPP = 255U;
  62. _IEC_CONST unsigned char brCPU = 1U;
  63. _IEC_CONST unsigned char brKEY = 8U;
  64. _IEC_CONST unsigned long brDRAM = 0U;
  65. _IEC_CONST unsigned char br2003 = 2U;
  66. _IEC_CONST unsigned char br2005 = 1U;
  67. _IEC_CONST unsigned char br2010 = 0U;
  68. _IEC_CONST unsigned char brC200 = 9U;
  69. _IEC_CONST unsigned char brC300 = 8U;
  70. _IEC_CONST unsigned char brADDON = 7U;
  71. _IEC_CONST unsigned char brPANEL = 6U;
  72. _IEC_CONST unsigned long brGLOBAL_REMANENT_PV = 5U;
  73. _IEC_CONST unsigned long brLOCAL_REMANENT_PV = 4U;
  74. _IEC_CONST unsigned long brUSRROM = 3U;
  75. _IEC_CONST unsigned long brSYSROM = 2U;
  76. _IEC_CONST unsigned long brUSRRAM = 1U;
  77. _IEC_CONST unsigned char brACOPOS = 7U;
  78. _IEC_CONST unsigned char brCAN_IO = 5U;
  79. _IEC_CONST unsigned char brBASE_IO = 3U;
  80. _IEC_CONST unsigned char brPRODUCT = 0U;
  81. _IEC_CONST unsigned char brETHER_IO = 6U;
  82. _IEC_CONST unsigned char brNO_FAMILY = 255U;
  83. _IEC_CONST unsigned char brREMOTE_IO = 4U;
  84. _IEC_CONST unsigned char brBATTERY_OK = 1U;
  85. _IEC_CONST unsigned char brPOWERPANEL = 5U;
  86. _IEC_CONST unsigned char brBATTERY_LOW = 0U;
  87. _IEC_CONST unsigned char brLOGICSCANNER = 3U;
  88. _IEC_CONST unsigned char brPLUGIN_MODULE = 10U;
  89. _IEC_CONST unsigned char brSYSTEM_MODULE = 2U;
  90. _IEC_CONST unsigned char brBATTERY_NOTEST = 2U;
  91. _IEC_CONST unsigned char TARGET_BIG_ENDIAN = 2U;
  92. _IEC_CONST unsigned char brBATTERY_MISSING = 3U;
  93. _IEC_CONST signed char INIT_REASON_UNKNOWN = -1;
  94. _IEC_CONST signed char INIT_REASON_DOWNLOAD = 3;
  95. _IEC_CONST unsigned char TARGET_LITTLE_ENDIAN = 1U;
  96. _IEC_CONST unsigned char brAUTOMATION_RUNTIME = 4U;
  97. _IEC_CONST unsigned short brERR_INVALID_DEVICE = 27250U;
  98. _IEC_CONST signed char INIT_REASON_COLDSTART = 2;
  99. _IEC_CONST signed char INIT_REASON_WARMSTART = 1;
  100. _IEC_CONST plcbit brSYSCONF_SET_VOLATILE = 0;
  101. _IEC_CONST unsigned short brERR_INVALID_PARAMETER = 27251U;
  102. _IEC_CONST plcbit brSYSCONF_SET_NON_VOLATILE = 1;
  103. #endif
  104. /* Datatypes and datatypes of function blocks */
  105. typedef struct MEMInfo
  106. {
  107. /* VAR_OUTPUT (analog) */
  108. unsigned short status;
  109. unsigned long FreeUSR_Ram;
  110. unsigned long FreeSYSTEM;
  111. unsigned long FreeUSR_Prom;
  112. unsigned long FreeSYS_Prom;
  113. unsigned long FreeFIX_Ram;
  114. unsigned long FreeTMP_Ram;
  115. unsigned long FreeMEMCARD;
  116. /* VAR_INPUT (digital) */
  117. plcbit enable;
  118. } MEMInfo_typ;
  119. typedef struct SysInfo
  120. {
  121. /* VAR_OUTPUT (analog) */
  122. unsigned char init_reason;
  123. unsigned char init_count;
  124. unsigned long tick_count;
  125. unsigned long version;
  126. /* VAR_INPUT (digital) */
  127. plcbit enable;
  128. } SysInfo_typ;
  129. typedef struct RTInfo
  130. {
  131. /* VAR_OUTPUT (analog) */
  132. unsigned short status;
  133. unsigned long cycle_time;
  134. signed char init_reason;
  135. signed char task_class;
  136. /* VAR_INPUT (digital) */
  137. plcbit enable;
  138. } RTInfo_typ;
  139. typedef struct TARGETInfo
  140. {
  141. /* VAR_INPUT (analog) */
  142. unsigned long pOSVersion;
  143. /* VAR_OUTPUT (analog) */
  144. unsigned short status;
  145. unsigned char DataFormat;
  146. /* VAR_INPUT (digital) */
  147. plcbit enable;
  148. } TARGETInfo_typ;
  149. typedef struct HWInfo
  150. {
  151. /* VAR_INPUT (analog) */
  152. unsigned long pName;
  153. /* VAR_OUTPUT (analog) */
  154. unsigned short status;
  155. unsigned char family;
  156. unsigned char usetype;
  157. unsigned long module_typ;
  158. unsigned char master_no;
  159. unsigned char slave_no;
  160. unsigned char module_adr;
  161. unsigned char slot_no;
  162. /* VAR (analog) */
  163. unsigned long next_vw_p;
  164. unsigned long last_modul_p;
  165. unsigned long next_entry_p;
  166. unsigned char next_entry_ix;
  167. unsigned char next_slot_ix;
  168. unsigned char last_rio_master;
  169. /* VAR_INPUT (digital) */
  170. plcbit enable;
  171. plcbit first;
  172. } HWInfo_typ;
  173. typedef struct PMemGet
  174. {
  175. /* VAR_INPUT (analog) */
  176. unsigned long offset;
  177. unsigned long len;
  178. unsigned long adress;
  179. /* VAR_OUTPUT (analog) */
  180. unsigned short status;
  181. /* VAR_INPUT (digital) */
  182. plcbit enable;
  183. } PMemGet_typ;
  184. typedef struct PMemPut
  185. {
  186. /* VAR_INPUT (analog) */
  187. unsigned long offset;
  188. unsigned long len;
  189. unsigned long adress;
  190. /* VAR_OUTPUT (analog) */
  191. unsigned short status;
  192. /* VAR_INPUT (digital) */
  193. plcbit enable;
  194. } PMemPut_typ;
  195. typedef struct PMemSize
  196. {
  197. /* VAR_OUTPUT (analog) */
  198. unsigned short status;
  199. unsigned long size;
  200. /* VAR_INPUT (digital) */
  201. plcbit enable;
  202. } PMemSize_typ;
  203. /* Prototyping of functions and function blocks */
  204. void MEMInfo(struct MEMInfo* inst);
  205. void SysInfo(struct SysInfo* inst);
  206. void RTInfo(struct RTInfo* inst);
  207. void TARGETInfo(struct TARGETInfo* inst);
  208. void HWInfo(struct HWInfo* inst);
  209. void PMemGet(struct PMemGet* inst);
  210. void PMemPut(struct PMemPut* inst);
  211. void PMemSize(struct PMemSize* inst);
  212. #ifdef __cplusplus
  213. };
  214. #endif
  215. #endif /* _BRSYSTEM_ */