brsystem.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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 _BUR_PUBLIC
  12. #define _BUR_PUBLIC
  13. #endif
  14. /* Constants */
  15. #ifdef _REPLACE_CONST
  16. #define brWINDOWS_BLUESCREEN 1U
  17. #define brWINDOWS_OK 0U
  18. #define brX2X 10U
  19. #define brPP 255U
  20. #define brCPU 1U
  21. #define brKEY 8U
  22. #define brDRAM 0U
  23. #define br2003 2U
  24. #define br2005 1U
  25. #define br2010 0U
  26. #define brC200 9U
  27. #define brC300 8U
  28. #define brADDON 7U
  29. #define brPANEL 6U
  30. #define brGLOBAL_REMANENT_PV 5U
  31. #define brLOCAL_REMANENT_PV 4U
  32. #define brUSRROM 3U
  33. #define brSYSROM 2U
  34. #define brUSRRAM 1U
  35. #define brACOPOS 7U
  36. #define brCAN_IO 5U
  37. #define brBASE_IO 3U
  38. #define brPRODUCT 0U
  39. #define brETHER_IO 6U
  40. #define brNO_FAMILY 255U
  41. #define brREMOTE_IO 4U
  42. #define brBATTERY_OK 1U
  43. #define brPOWERPANEL 5U
  44. #define brBATTERY_LOW 0U
  45. #define brLOGICSCANNER 3U
  46. #define brPLUGIN_MODULE 10U
  47. #define brSYSTEM_MODULE 2U
  48. #define brBATTERY_NOTEST 2U
  49. #define TARGET_BIG_ENDIAN 2U
  50. #define brBATTERY_MISSING 3U
  51. #define INIT_REASON_UNKNOWN (-1)
  52. #define INIT_REASON_DOWNLOAD 3
  53. #define TARGET_LITTLE_ENDIAN 1U
  54. #define brAUTOMATION_RUNTIME 4U
  55. #define brERR_INVALID_DEVICE 27250U
  56. #define INIT_REASON_COLDSTART 2
  57. #define INIT_REASON_WARMSTART 1
  58. #define brSYSCONF_SET_VOLATILE 0
  59. #define brERR_INVALID_PARAMETER 27251U
  60. #define brERR_NON_CYCLIC_CONTEXT 27252U
  61. #define brSYSCONF_SET_NON_VOLATILE 1
  62. #else
  63. #ifndef _GLOBAL_CONST
  64. #define _GLOBAL_CONST _WEAK const
  65. #endif
  66. _GLOBAL_CONST unsigned long brWINDOWS_BLUESCREEN;
  67. _GLOBAL_CONST unsigned long brWINDOWS_OK;
  68. _GLOBAL_CONST unsigned char brX2X;
  69. _GLOBAL_CONST unsigned char brPP;
  70. _GLOBAL_CONST unsigned char brCPU;
  71. _GLOBAL_CONST unsigned char brKEY;
  72. _GLOBAL_CONST unsigned long brDRAM;
  73. _GLOBAL_CONST unsigned char br2003;
  74. _GLOBAL_CONST unsigned char br2005;
  75. _GLOBAL_CONST unsigned char br2010;
  76. _GLOBAL_CONST unsigned char brC200;
  77. _GLOBAL_CONST unsigned char brC300;
  78. _GLOBAL_CONST unsigned char brADDON;
  79. _GLOBAL_CONST unsigned char brPANEL;
  80. _GLOBAL_CONST unsigned long brGLOBAL_REMANENT_PV;
  81. _GLOBAL_CONST unsigned long brLOCAL_REMANENT_PV;
  82. _GLOBAL_CONST unsigned long brUSRROM;
  83. _GLOBAL_CONST unsigned long brSYSROM;
  84. _GLOBAL_CONST unsigned long brUSRRAM;
  85. _GLOBAL_CONST unsigned char brACOPOS;
  86. _GLOBAL_CONST unsigned char brCAN_IO;
  87. _GLOBAL_CONST unsigned char brBASE_IO;
  88. _GLOBAL_CONST unsigned char brPRODUCT;
  89. _GLOBAL_CONST unsigned char brETHER_IO;
  90. _GLOBAL_CONST unsigned char brNO_FAMILY;
  91. _GLOBAL_CONST unsigned char brREMOTE_IO;
  92. _GLOBAL_CONST unsigned char brBATTERY_OK;
  93. _GLOBAL_CONST unsigned char brPOWERPANEL;
  94. _GLOBAL_CONST unsigned char brBATTERY_LOW;
  95. _GLOBAL_CONST unsigned char brLOGICSCANNER;
  96. _GLOBAL_CONST unsigned char brPLUGIN_MODULE;
  97. _GLOBAL_CONST unsigned char brSYSTEM_MODULE;
  98. _GLOBAL_CONST unsigned char brBATTERY_NOTEST;
  99. _GLOBAL_CONST unsigned char TARGET_BIG_ENDIAN;
  100. _GLOBAL_CONST unsigned char brBATTERY_MISSING;
  101. _GLOBAL_CONST signed char INIT_REASON_UNKNOWN;
  102. _GLOBAL_CONST signed char INIT_REASON_DOWNLOAD;
  103. _GLOBAL_CONST unsigned char TARGET_LITTLE_ENDIAN;
  104. _GLOBAL_CONST unsigned char brAUTOMATION_RUNTIME;
  105. _GLOBAL_CONST unsigned short brERR_INVALID_DEVICE;
  106. _GLOBAL_CONST signed char INIT_REASON_COLDSTART;
  107. _GLOBAL_CONST signed char INIT_REASON_WARMSTART;
  108. _GLOBAL_CONST plcbit brSYSCONF_SET_VOLATILE;
  109. _GLOBAL_CONST unsigned short brERR_INVALID_PARAMETER;
  110. _GLOBAL_CONST unsigned short brERR_NON_CYCLIC_CONTEXT;
  111. _GLOBAL_CONST plcbit brSYSCONF_SET_NON_VOLATILE;
  112. #endif
  113. /* Datatypes and datatypes of function blocks */
  114. typedef struct MEMInfo
  115. {
  116. /* VAR_OUTPUT (analog) */
  117. unsigned short status;
  118. unsigned long FreeUSR_Ram;
  119. unsigned long FreeSYSTEM;
  120. unsigned long FreeUSR_Prom;
  121. unsigned long FreeSYS_Prom;
  122. unsigned long FreeFIX_Ram;
  123. unsigned long FreeTMP_Ram;
  124. unsigned long FreeMEMCARD;
  125. /* VAR_INPUT (digital) */
  126. plcbit enable;
  127. } MEMInfo_typ;
  128. typedef struct MEMxInfo
  129. {
  130. /* VAR_INPUT (analog) */
  131. unsigned long mem_typ;
  132. /* VAR_OUTPUT (analog) */
  133. unsigned short status;
  134. unsigned long MemSize;
  135. unsigned long FreeMemSize;
  136. unsigned long BiggestFreeBlockSize;
  137. /* VAR (analog) */
  138. unsigned short i_state;
  139. unsigned short i_result;
  140. unsigned long i_tmp;
  141. /* VAR_INPUT (digital) */
  142. plcbit enable;
  143. } MEMxInfo_typ;
  144. typedef struct SysInfo
  145. {
  146. /* VAR_OUTPUT (analog) */
  147. unsigned char init_reason;
  148. unsigned char init_count;
  149. unsigned long tick_count;
  150. unsigned long version;
  151. /* VAR_INPUT (digital) */
  152. plcbit enable;
  153. } SysInfo_typ;
  154. typedef struct RTInfo
  155. {
  156. /* VAR_OUTPUT (analog) */
  157. unsigned short status;
  158. unsigned long cycle_time;
  159. signed char init_reason;
  160. signed char task_class;
  161. /* VAR_INPUT (digital) */
  162. plcbit enable;
  163. } RTInfo_typ;
  164. typedef struct TARGETInfo
  165. {
  166. /* VAR_INPUT (analog) */
  167. unsigned long pOSVersion;
  168. /* VAR_OUTPUT (analog) */
  169. unsigned short status;
  170. unsigned char DataFormat;
  171. /* VAR_INPUT (digital) */
  172. plcbit enable;
  173. } TARGETInfo_typ;
  174. typedef struct HWInfo
  175. {
  176. /* VAR_INPUT (analog) */
  177. unsigned long pName;
  178. /* VAR_OUTPUT (analog) */
  179. unsigned short status;
  180. unsigned char family;
  181. unsigned char usetype;
  182. unsigned long module_typ;
  183. unsigned char master_no;
  184. unsigned char slave_no;
  185. unsigned char module_adr;
  186. unsigned char slot_no;
  187. /* VAR (analog) */
  188. unsigned long next_vw_p;
  189. unsigned long last_modul_p;
  190. unsigned long next_entry_p;
  191. unsigned char next_entry_ix;
  192. unsigned char next_slot_ix;
  193. unsigned char last_rio_master;
  194. /* VAR_INPUT (digital) */
  195. plcbit enable;
  196. plcbit first;
  197. } HWInfo_typ;
  198. typedef struct SysconfInfo
  199. {
  200. /* VAR_INPUT (analog) */
  201. unsigned long pEntry;
  202. unsigned long pValue;
  203. unsigned long value_len;
  204. /* VAR_OUTPUT (analog) */
  205. unsigned short status;
  206. /* VAR_INPUT (digital) */
  207. plcbit enable;
  208. } SysconfInfo_typ;
  209. typedef struct SysconfSet
  210. {
  211. /* VAR_INPUT (analog) */
  212. unsigned long pEntry;
  213. unsigned long pNewValue;
  214. unsigned char option;
  215. /* VAR_OUTPUT (analog) */
  216. unsigned short status;
  217. /* VAR_INPUT (digital) */
  218. plcbit enable;
  219. } SysconfSet_typ;
  220. typedef struct BatteryInfo
  221. {
  222. /* VAR_INPUT (analog) */
  223. unsigned long pDevice;
  224. /* VAR_OUTPUT (analog) */
  225. unsigned short status;
  226. unsigned char state;
  227. /* VAR_INPUT (digital) */
  228. plcbit enable;
  229. } BatteryInfo_typ;
  230. typedef struct EXCInfo
  231. {
  232. /* VAR_OUTPUT (analog) */
  233. unsigned short status;
  234. unsigned long task_class;
  235. unsigned long task_ident;
  236. /* VAR_INPUT (digital) */
  237. plcbit enable;
  238. } EXCInfo_typ;
  239. typedef struct ZYKVLenable
  240. {
  241. /* VAR_OUTPUT (analog) */
  242. unsigned short status;
  243. /* VAR_INPUT (digital) */
  244. plcbit enable;
  245. plcbit mode;
  246. } ZYKVLenable_typ;
  247. typedef struct PMemGet
  248. {
  249. /* VAR_INPUT (analog) */
  250. unsigned long offset;
  251. unsigned long len;
  252. unsigned long adress;
  253. /* VAR_OUTPUT (analog) */
  254. unsigned short status;
  255. /* VAR_INPUT (digital) */
  256. plcbit enable;
  257. } PMemGet_typ;
  258. typedef struct PMemPut
  259. {
  260. /* VAR_INPUT (analog) */
  261. unsigned long offset;
  262. unsigned long len;
  263. unsigned long adress;
  264. /* VAR_OUTPUT (analog) */
  265. unsigned short status;
  266. /* VAR_INPUT (digital) */
  267. plcbit enable;
  268. } PMemPut_typ;
  269. typedef struct PMemSize
  270. {
  271. /* VAR_OUTPUT (analog) */
  272. unsigned short status;
  273. unsigned long size;
  274. /* VAR_INPUT (digital) */
  275. plcbit enable;
  276. } PMemSize_typ;
  277. typedef struct ARwinWindowsInfo
  278. {
  279. /* VAR_OUTPUT (analog) */
  280. unsigned short status;
  281. unsigned long windowsStatus;
  282. /* VAR_INPUT (digital) */
  283. plcbit enable;
  284. } ARwinWindowsInfo_typ;
  285. typedef struct ARwinEthWinInfo
  286. {
  287. /* VAR_OUTPUT (analog) */
  288. unsigned short status;
  289. plcstring IPAddr[16];
  290. plcstring SubnetMask[16];
  291. plcbyte MacAddr[6];
  292. /* VAR_INPUT (digital) */
  293. plcbit enable;
  294. } ARwinEthWinInfo_typ;
  295. /* Prototyping of functions and function blocks */
  296. _BUR_PUBLIC void MEMInfo(struct MEMInfo* inst);
  297. _BUR_PUBLIC void MEMxInfo(struct MEMxInfo* inst);
  298. _BUR_PUBLIC void SysInfo(struct SysInfo* inst);
  299. _BUR_PUBLIC void RTInfo(struct RTInfo* inst);
  300. _BUR_PUBLIC void TARGETInfo(struct TARGETInfo* inst);
  301. _BUR_PUBLIC void HWInfo(struct HWInfo* inst);
  302. _BUR_PUBLIC void SysconfInfo(struct SysconfInfo* inst);
  303. _BUR_PUBLIC void SysconfSet(struct SysconfSet* inst);
  304. _BUR_PUBLIC void BatteryInfo(struct BatteryInfo* inst);
  305. _BUR_PUBLIC void EXCInfo(struct EXCInfo* inst);
  306. _BUR_PUBLIC void ZYKVLenable(struct ZYKVLenable* inst);
  307. _BUR_PUBLIC void PMemGet(struct PMemGet* inst);
  308. _BUR_PUBLIC void PMemPut(struct PMemPut* inst);
  309. _BUR_PUBLIC void PMemSize(struct PMemSize* inst);
  310. _BUR_PUBLIC void ARwinWindowsInfo(struct ARwinWindowsInfo* inst);
  311. _BUR_PUBLIC void ARwinEthWinInfo(struct ARwinEthWinInfo* inst);
  312. #ifdef __cplusplus
  313. };
  314. #endif
  315. #endif /* _BRSYSTEM_ */