DataObj.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. /* Automation Studio generated header file */
  2. /* Do not edit ! */
  3. #ifndef _DATAOBJ_
  4. #define _DATAOBJ_
  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 doTEMP 65U
  17. #define doFIXRAM 5U
  18. #define doMEMCARD 4U
  19. #define doUSRRAM 3U
  20. #define doUSRROM 2U
  21. #define doNO_CS 1U
  22. #define doSYSROM 0U
  23. #define doERR_MODULDELETE_SYSROM 20615U
  24. #define doERR_BURNINGOBJECT 20614U
  25. #define doERR_ILLSTATE 20611U
  26. #define doERR_NOMEMORY 20603U
  27. #define doERR_BRINSTALL 20604U
  28. #define doERR_DUPOBJECT 20601U
  29. #define doERR_ILLOBJECT 20605U
  30. #define doERR_WRONGTIME 20610U
  31. #define doERR_ILLMEMTYPE 20602U
  32. #define doERR_ILLOBJTYPE 20606U
  33. #define doERR_WRONGOFFSET 20607U
  34. #define doERR_ILLPARAMETER 20600U
  35. #define doERR_STARTHANDLER 20612U
  36. #define doERR_ILLEGALLENGTH 20608U
  37. #define doERR_MODULNOTFOUND 20609U
  38. #define doERR_CHECKSUM_WARNING 20630U
  39. #define doERR_TOOLONG_MODULNAME 20613U
  40. #else
  41. #ifndef _GLOBAL_CONST
  42. #define _GLOBAL_CONST _WEAK const
  43. #endif
  44. _GLOBAL_CONST unsigned char doTEMP;
  45. _GLOBAL_CONST unsigned char doFIXRAM;
  46. _GLOBAL_CONST unsigned char doMEMCARD;
  47. _GLOBAL_CONST unsigned char doUSRRAM;
  48. _GLOBAL_CONST unsigned char doUSRROM;
  49. _GLOBAL_CONST unsigned char doNO_CS;
  50. _GLOBAL_CONST unsigned char doSYSROM;
  51. _GLOBAL_CONST unsigned short doERR_MODULDELETE_SYSROM;
  52. _GLOBAL_CONST unsigned short doERR_BURNINGOBJECT;
  53. _GLOBAL_CONST unsigned short doERR_ILLSTATE;
  54. _GLOBAL_CONST unsigned short doERR_NOMEMORY;
  55. _GLOBAL_CONST unsigned short doERR_BRINSTALL;
  56. _GLOBAL_CONST unsigned short doERR_DUPOBJECT;
  57. _GLOBAL_CONST unsigned short doERR_ILLOBJECT;
  58. _GLOBAL_CONST unsigned short doERR_WRONGTIME;
  59. _GLOBAL_CONST unsigned short doERR_ILLMEMTYPE;
  60. _GLOBAL_CONST unsigned short doERR_ILLOBJTYPE;
  61. _GLOBAL_CONST unsigned short doERR_WRONGOFFSET;
  62. _GLOBAL_CONST unsigned short doERR_ILLPARAMETER;
  63. _GLOBAL_CONST unsigned short doERR_STARTHANDLER;
  64. _GLOBAL_CONST unsigned short doERR_ILLEGALLENGTH;
  65. _GLOBAL_CONST unsigned short doERR_MODULNOTFOUND;
  66. _GLOBAL_CONST unsigned short doERR_CHECKSUM_WARNING;
  67. _GLOBAL_CONST unsigned short doERR_TOOLONG_MODULNAME;
  68. #endif
  69. /* Datatypes and datatypes of function blocks */
  70. typedef struct DatObjCreate
  71. {
  72. /* VAR_INPUT (analog) */
  73. unsigned char grp;
  74. unsigned long pName;
  75. unsigned long len;
  76. unsigned char MemType;
  77. unsigned long Option;
  78. unsigned long pCpyData;
  79. /* VAR_OUTPUT (analog) */
  80. unsigned short status;
  81. unsigned long ident;
  82. unsigned long pDatObjMem;
  83. /* VAR (analog) */
  84. unsigned long i_state;
  85. unsigned long i_result;
  86. unsigned char i_spare[105];
  87. unsigned long i_spare_1;
  88. unsigned short i_spare_2;
  89. unsigned long i_spare_3;
  90. unsigned char i_spare_4;
  91. /* VAR_INPUT (digital) */
  92. plcbit enable;
  93. } DatObjCreate_typ;
  94. typedef struct DatObjWrite
  95. {
  96. /* VAR_INPUT (analog) */
  97. unsigned long ident;
  98. unsigned long Offset;
  99. unsigned long pSource;
  100. unsigned long len;
  101. /* VAR_OUTPUT (analog) */
  102. unsigned short status;
  103. /* VAR_INPUT (digital) */
  104. plcbit enable;
  105. } DatObjWrite_typ;
  106. typedef struct DatObjRead
  107. {
  108. /* VAR_INPUT (analog) */
  109. unsigned long ident;
  110. unsigned long Offset;
  111. unsigned long pDestination;
  112. unsigned long len;
  113. /* VAR_OUTPUT (analog) */
  114. unsigned short status;
  115. /* VAR_INPUT (digital) */
  116. plcbit enable;
  117. } DatObjRead_typ;
  118. typedef struct DatObjDelete
  119. {
  120. /* VAR_INPUT (analog) */
  121. unsigned long ident;
  122. /* VAR_OUTPUT (analog) */
  123. unsigned short status;
  124. /* VAR (analog) */
  125. unsigned long i_state;
  126. unsigned long i_result;
  127. unsigned char i_spare;
  128. /* VAR_INPUT (digital) */
  129. plcbit enable;
  130. } DatObjDelete_typ;
  131. typedef struct DatObjMove
  132. {
  133. /* VAR_INPUT (analog) */
  134. unsigned long ident;
  135. unsigned char MemType;
  136. unsigned long Option;
  137. /* VAR_OUTPUT (analog) */
  138. unsigned short status;
  139. unsigned long identNew;
  140. unsigned long pDatObjMem;
  141. /* VAR (analog) */
  142. unsigned long i_state;
  143. unsigned long i_result;
  144. unsigned char i_spare[41];
  145. unsigned long i_spare_1;
  146. unsigned char i_spare_2;
  147. /* VAR_INPUT (digital) */
  148. plcbit enable;
  149. } DatObjMove_typ;
  150. typedef struct DatObjCopy
  151. {
  152. /* VAR_INPUT (analog) */
  153. unsigned long ident;
  154. unsigned long pNameTarget;
  155. unsigned char MemTypeTarget;
  156. unsigned long OptionTarget;
  157. /* VAR_OUTPUT (analog) */
  158. unsigned short status;
  159. unsigned long identNew;
  160. unsigned long pDatObjMemNew;
  161. /* VAR (analog) */
  162. unsigned long i_state;
  163. unsigned long i_result;
  164. unsigned char i_spare[41];
  165. unsigned long i_spare_1;
  166. unsigned char i_spare_2;
  167. /* VAR_INPUT (digital) */
  168. plcbit enable;
  169. } DatObjCopy_typ;
  170. typedef struct DatObjInfo
  171. {
  172. /* VAR_INPUT (analog) */
  173. unsigned long pName;
  174. /* VAR_OUTPUT (analog) */
  175. unsigned short status;
  176. unsigned long ident;
  177. unsigned long pDatObjMem;
  178. unsigned long len;
  179. unsigned char MemType;
  180. unsigned long Option;
  181. plcdt ChangeDate;
  182. /* VAR_INPUT (digital) */
  183. plcbit enable;
  184. } DatObjInfo_typ;
  185. typedef struct DatObjChangeDate
  186. {
  187. /* VAR_INPUT (analog) */
  188. unsigned long pName;
  189. plcdt SetDate;
  190. /* VAR_OUTPUT (analog) */
  191. unsigned short status;
  192. /* VAR_INPUT (digital) */
  193. plcbit enable;
  194. } DatObjChangeDate_typ;
  195. typedef struct DatObjAttach
  196. {
  197. /* VAR_INPUT (analog) */
  198. unsigned long ident;
  199. /* VAR_OUTPUT (analog) */
  200. unsigned short status;
  201. /* VAR_INPUT (digital) */
  202. plcbit enable;
  203. } DatObjAttach_typ;
  204. typedef struct DatObjDetach
  205. {
  206. /* VAR_INPUT (analog) */
  207. unsigned long ident;
  208. /* VAR_OUTPUT (analog) */
  209. unsigned short status;
  210. /* VAR_INPUT (digital) */
  211. plcbit enable;
  212. } DatObjDetach_typ;
  213. /* Prototyping of functions and function blocks */
  214. _BUR_PUBLIC void DatObjCreate(struct DatObjCreate* inst);
  215. _BUR_PUBLIC void DatObjWrite(struct DatObjWrite* inst);
  216. _BUR_PUBLIC void DatObjRead(struct DatObjRead* inst);
  217. _BUR_PUBLIC void DatObjDelete(struct DatObjDelete* inst);
  218. _BUR_PUBLIC void DatObjMove(struct DatObjMove* inst);
  219. _BUR_PUBLIC void DatObjCopy(struct DatObjCopy* inst);
  220. _BUR_PUBLIC void DatObjInfo(struct DatObjInfo* inst);
  221. _BUR_PUBLIC void DatObjChangeDate(struct DatObjChangeDate* inst);
  222. _BUR_PUBLIC void DatObjAttach(struct DatObjAttach* inst);
  223. _BUR_PUBLIC void DatObjDetach(struct DatObjDetach* inst);
  224. #ifdef __cplusplus
  225. };
  226. #endif
  227. #endif /* _DATAOBJ_ */