DataObj.h 5.4 KB

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