FileIO.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. /* Automation Studio generated header file */
  2. /* Do not edit ! */
  3. #ifndef _FILEIO_
  4. #define _FILEIO_
  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 SET_RECURSIVE 1U
  17. #define FILE_RW 2U
  18. #define FILE_W 1U
  19. #define FILE_R 0U
  20. #define FILE_OW_ONCE 3U
  21. #define FILE_OW_DETMEM 2U
  22. #define FILE_DETMEM 1U
  23. #define FILE_ONCE 0U
  24. #define FILE_FILE 0U
  25. #define FILE_DIR 1U
  26. #define FILE_ALL 2U
  27. #define DIR_OW 1U
  28. #define ATTR_VOL_LABEL 8U
  29. #define ATTR_SYSTEM 4U
  30. #define ATTR_RDONLY 1U
  31. #define ATTR_HIDDEN 2U
  32. #define ATTR_DIRECTORY 16U
  33. #define ATTR_ARCHIVE 32U
  34. #define fiERR_SYSTEM 20799U
  35. #define fiERR_DEVICE_MANAGER 20798U
  36. #define fiERR_DEVICE_DRIVER 20797U
  37. #define fiERR_INIT 20796U
  38. #define fiERR_NETIO_PARAMETERS 20736U
  39. #define fiERR_INVALID_NBYTES 20735U
  40. #define fiERR_NETIO_USER 20734U
  41. #define fiERR_NETIO_PORT 20733U
  42. #define fiERR_NETIO_IP_UNEQUAL 20732U
  43. #define fiERR_DEVICE_INVALID_HANDLE 20731U
  44. #define fiERR_DEVICE_ALREADY_EXIST 20730U
  45. #define fiERR_PARAMETER 20729U
  46. #define fiERR_DIR_INVALID_HANDLE 20728U
  47. #define fiERR_NOT_ENOUGH_FREEMEM 20727U
  48. #define fiERR_DETMEMINFO 20726U
  49. #define fiERR_DIR_ALREADY_EXIST 20725U
  50. #define fiERR_DIR_NOT_EMPTY 20724U
  51. #define fiERR_DIR_NOT_EXIST 20723U
  52. #define fiERR_INVALID_DIRECTORY 20722U
  53. #define fiERR_FILE_NOT_OPENED 20721U
  54. #define fiERR_ASYNC_MANAGER 20720U
  55. #define fiERR_DATA 20719U
  56. #define fiERR_COM_FILE_IOCTL 20718U
  57. #define fiERR_COM_FILE_WRITE 20717U
  58. #define fiERR_COM_FILE_READ 20716U
  59. #define fiERR_COM_FILE_CLOSE 20715U
  60. #define fiERR_COM_FILE_OPEN 20714U
  61. #define fiERR_LESS_VIRTUAL_MEMORY 20713U
  62. #define fiERR_FILE 20712U
  63. #define fiERR_SEEK 20711U
  64. #define fiERR_SPACE 20710U
  65. #define fiERR_FILE_DEVICE 20709U
  66. #define fiERR_FILE_NOT_FOUND 20708U
  67. #define fiERR_MODE 20707U
  68. #define fiERR_ACCESS 20706U
  69. #define fiERR_EXIST 20705U
  70. #define fiERR_INVALID_TYP 20704U
  71. #define fiERR_NOT_SUPPORTED 20703U
  72. #define fiERR_NO_MORE_ENTRIES 20702U
  73. #define fiERR_DATA_SIZE 20701U
  74. #define fiERR_INVALID_PATH 20700U
  75. #define fiTruncate 1U
  76. #define fiBOTH 2U
  77. #define fiDIRECTORY 1U
  78. #define fiFILE 0U
  79. #define fiREAD_WRITE 2U
  80. #define fiWRITE_ONLY 1U
  81. #define fiREAD_ONLY 0U
  82. #define fiOVERWRITE 2U
  83. #define fiRECURSIVE 1U
  84. #define fiATTR_VOL_LABEL 8U
  85. #define fiATTR_SYSTEM 4U
  86. #define fiATTR_RDONLY 1U
  87. #define fiATTR_HIDDEN 2U
  88. #define fiATTR_DIRECTORY 16U
  89. #define fiATTR_ARCHIVE 32U
  90. #else
  91. #ifndef _GLOBAL_CONST
  92. #define _GLOBAL_CONST _WEAK const
  93. #endif
  94. _GLOBAL_CONST unsigned char SET_RECURSIVE;
  95. _GLOBAL_CONST unsigned char FILE_RW;
  96. _GLOBAL_CONST unsigned char FILE_W;
  97. _GLOBAL_CONST unsigned char FILE_R;
  98. _GLOBAL_CONST unsigned char FILE_OW_ONCE;
  99. _GLOBAL_CONST unsigned char FILE_OW_DETMEM;
  100. _GLOBAL_CONST unsigned char FILE_DETMEM;
  101. _GLOBAL_CONST unsigned char FILE_ONCE;
  102. _GLOBAL_CONST unsigned char FILE_FILE;
  103. _GLOBAL_CONST unsigned char FILE_DIR;
  104. _GLOBAL_CONST unsigned char FILE_ALL;
  105. _GLOBAL_CONST unsigned char DIR_OW;
  106. _GLOBAL_CONST unsigned char ATTR_VOL_LABEL;
  107. _GLOBAL_CONST unsigned char ATTR_SYSTEM;
  108. _GLOBAL_CONST unsigned char ATTR_RDONLY;
  109. _GLOBAL_CONST unsigned char ATTR_HIDDEN;
  110. _GLOBAL_CONST unsigned char ATTR_DIRECTORY;
  111. _GLOBAL_CONST unsigned char ATTR_ARCHIVE;
  112. _GLOBAL_CONST unsigned short fiERR_SYSTEM;
  113. _GLOBAL_CONST unsigned short fiERR_DEVICE_MANAGER;
  114. _GLOBAL_CONST unsigned short fiERR_DEVICE_DRIVER;
  115. _GLOBAL_CONST unsigned short fiERR_INIT;
  116. _GLOBAL_CONST unsigned short fiERR_NETIO_PARAMETERS;
  117. _GLOBAL_CONST unsigned short fiERR_INVALID_NBYTES;
  118. _GLOBAL_CONST unsigned short fiERR_NETIO_USER;
  119. _GLOBAL_CONST unsigned short fiERR_NETIO_PORT;
  120. _GLOBAL_CONST unsigned short fiERR_NETIO_IP_UNEQUAL;
  121. _GLOBAL_CONST unsigned short fiERR_DEVICE_INVALID_HANDLE;
  122. _GLOBAL_CONST unsigned short fiERR_DEVICE_ALREADY_EXIST;
  123. _GLOBAL_CONST unsigned short fiERR_PARAMETER;
  124. _GLOBAL_CONST unsigned short fiERR_DIR_INVALID_HANDLE;
  125. _GLOBAL_CONST unsigned short fiERR_NOT_ENOUGH_FREEMEM;
  126. _GLOBAL_CONST unsigned short fiERR_DETMEMINFO;
  127. _GLOBAL_CONST unsigned short fiERR_DIR_ALREADY_EXIST;
  128. _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EMPTY;
  129. _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EXIST;
  130. _GLOBAL_CONST unsigned short fiERR_INVALID_DIRECTORY;
  131. _GLOBAL_CONST unsigned short fiERR_FILE_NOT_OPENED;
  132. _GLOBAL_CONST unsigned short fiERR_ASYNC_MANAGER;
  133. _GLOBAL_CONST unsigned short fiERR_DATA;
  134. _GLOBAL_CONST unsigned short fiERR_COM_FILE_IOCTL;
  135. _GLOBAL_CONST unsigned short fiERR_COM_FILE_WRITE;
  136. _GLOBAL_CONST unsigned short fiERR_COM_FILE_READ;
  137. _GLOBAL_CONST unsigned short fiERR_COM_FILE_CLOSE;
  138. _GLOBAL_CONST unsigned short fiERR_COM_FILE_OPEN;
  139. _GLOBAL_CONST unsigned short fiERR_LESS_VIRTUAL_MEMORY;
  140. _GLOBAL_CONST unsigned short fiERR_FILE;
  141. _GLOBAL_CONST unsigned short fiERR_SEEK;
  142. _GLOBAL_CONST unsigned short fiERR_SPACE;
  143. _GLOBAL_CONST unsigned short fiERR_FILE_DEVICE;
  144. _GLOBAL_CONST unsigned short fiERR_FILE_NOT_FOUND;
  145. _GLOBAL_CONST unsigned short fiERR_MODE;
  146. _GLOBAL_CONST unsigned short fiERR_ACCESS;
  147. _GLOBAL_CONST unsigned short fiERR_EXIST;
  148. _GLOBAL_CONST unsigned short fiERR_INVALID_TYP;
  149. _GLOBAL_CONST unsigned short fiERR_NOT_SUPPORTED;
  150. _GLOBAL_CONST unsigned short fiERR_NO_MORE_ENTRIES;
  151. _GLOBAL_CONST unsigned short fiERR_DATA_SIZE;
  152. _GLOBAL_CONST unsigned short fiERR_INVALID_PATH;
  153. _GLOBAL_CONST unsigned long fiTruncate;
  154. _GLOBAL_CONST unsigned char fiBOTH;
  155. _GLOBAL_CONST unsigned char fiDIRECTORY;
  156. _GLOBAL_CONST unsigned char fiFILE;
  157. _GLOBAL_CONST unsigned char fiREAD_WRITE;
  158. _GLOBAL_CONST unsigned char fiWRITE_ONLY;
  159. _GLOBAL_CONST unsigned char fiREAD_ONLY;
  160. _GLOBAL_CONST unsigned char fiOVERWRITE;
  161. _GLOBAL_CONST unsigned char fiRECURSIVE;
  162. _GLOBAL_CONST unsigned char fiATTR_VOL_LABEL;
  163. _GLOBAL_CONST unsigned char fiATTR_SYSTEM;
  164. _GLOBAL_CONST unsigned char fiATTR_RDONLY;
  165. _GLOBAL_CONST unsigned char fiATTR_HIDDEN;
  166. _GLOBAL_CONST unsigned char fiATTR_DIRECTORY;
  167. _GLOBAL_CONST unsigned char fiATTR_ARCHIVE;
  168. #endif
  169. /* Datatypes and datatypes of function blocks */
  170. typedef struct fiDIR_READ_DATA
  171. { unsigned char Filename[260];
  172. plcdt Date;
  173. unsigned long Filelength;
  174. } fiDIR_READ_DATA;
  175. typedef struct fiDIR_READ_EX_DATA
  176. { unsigned char Filename[260];
  177. plcdt Date;
  178. unsigned long Filelength;
  179. unsigned short Mode;
  180. } fiDIR_READ_EX_DATA;
  181. typedef struct fiFILE_INFO
  182. { unsigned long size;
  183. unsigned long linkCnt;
  184. plcdt accTime;
  185. plcdt modTime;
  186. plcdt chgTime;
  187. unsigned long reserved[21];
  188. } fiFILE_INFO;
  189. typedef struct FileCreate
  190. {
  191. /* VAR_INPUT (analog) */
  192. unsigned long pDevice;
  193. unsigned long pFile;
  194. /* VAR_OUTPUT (analog) */
  195. unsigned short status;
  196. unsigned long ident;
  197. /* VAR (analog) */
  198. unsigned short i_state;
  199. unsigned short i_result;
  200. unsigned long i_tmp;
  201. /* VAR_INPUT (digital) */
  202. plcbit enable;
  203. } FileCreate_typ;
  204. typedef struct FileOpen
  205. {
  206. /* VAR_INPUT (analog) */
  207. unsigned long pDevice;
  208. unsigned long pFile;
  209. unsigned char mode;
  210. /* VAR_OUTPUT (analog) */
  211. unsigned short status;
  212. unsigned long ident;
  213. unsigned long filelen;
  214. /* VAR (analog) */
  215. unsigned short i_state;
  216. unsigned short i_result;
  217. unsigned long i_tmp;
  218. /* VAR_INPUT (digital) */
  219. plcbit enable;
  220. } FileOpen_typ;
  221. typedef struct FileClose
  222. {
  223. /* VAR_INPUT (analog) */
  224. unsigned long ident;
  225. /* VAR_OUTPUT (analog) */
  226. unsigned short status;
  227. /* VAR (analog) */
  228. unsigned short i_state;
  229. unsigned short i_result;
  230. unsigned long i_tmp;
  231. /* VAR_INPUT (digital) */
  232. plcbit enable;
  233. } FileClose_typ;
  234. typedef struct FileRead
  235. {
  236. /* VAR_INPUT (analog) */
  237. unsigned long ident;
  238. unsigned long offset;
  239. unsigned long pDest;
  240. unsigned long len;
  241. /* VAR_OUTPUT (analog) */
  242. unsigned short status;
  243. /* VAR (analog) */
  244. unsigned short i_state;
  245. unsigned short i_result;
  246. unsigned long i_tmp;
  247. /* VAR_INPUT (digital) */
  248. plcbit enable;
  249. } FileRead_typ;
  250. typedef struct FileReadEx
  251. {
  252. /* VAR_INPUT (analog) */
  253. unsigned long ident;
  254. unsigned long offset;
  255. unsigned long pDest;
  256. unsigned long len;
  257. /* VAR_OUTPUT (analog) */
  258. unsigned short status;
  259. unsigned long bytesread;
  260. /* VAR (analog) */
  261. unsigned short i_state;
  262. unsigned short i_result;
  263. unsigned long i_tmp;
  264. /* VAR_INPUT (digital) */
  265. plcbit enable;
  266. } FileReadEx_typ;
  267. typedef struct FileWrite
  268. {
  269. /* VAR_INPUT (analog) */
  270. unsigned long ident;
  271. unsigned long offset;
  272. unsigned long pSrc;
  273. unsigned long len;
  274. /* VAR_OUTPUT (analog) */
  275. unsigned short status;
  276. /* VAR (analog) */
  277. unsigned short i_state;
  278. unsigned short i_result;
  279. unsigned long i_tmp;
  280. /* VAR_INPUT (digital) */
  281. plcbit enable;
  282. } FileWrite_typ;
  283. typedef struct FileWriteEx
  284. {
  285. /* VAR_INPUT (analog) */
  286. unsigned long ident;
  287. unsigned long offset;
  288. unsigned long pSrc;
  289. unsigned long len;
  290. unsigned long option;
  291. /* VAR_OUTPUT (analog) */
  292. unsigned short status;
  293. /* VAR (analog) */
  294. unsigned short i_state;
  295. unsigned short i_result;
  296. unsigned long i_tmp;
  297. /* VAR_INPUT (digital) */
  298. plcbit enable;
  299. } FileWriteEx_typ;
  300. typedef struct FileRename
  301. {
  302. /* VAR_INPUT (analog) */
  303. unsigned long pDevice;
  304. unsigned long pName;
  305. unsigned long pNewName;
  306. /* VAR_OUTPUT (analog) */
  307. unsigned short status;
  308. /* VAR (analog) */
  309. unsigned short i_state;
  310. unsigned short i_result;
  311. unsigned long i_tmp;
  312. /* VAR_INPUT (digital) */
  313. plcbit enable;
  314. } FileRename_typ;
  315. typedef struct FileCopy
  316. {
  317. /* VAR_INPUT (analog) */
  318. unsigned long pSrcDev;
  319. unsigned long pSrc;
  320. unsigned long pDestDev;
  321. unsigned long pDest;
  322. unsigned char option;
  323. /* VAR_OUTPUT (analog) */
  324. unsigned short status;
  325. /* VAR (analog) */
  326. unsigned short i_state;
  327. unsigned short i_result;
  328. unsigned long i_tmp;
  329. /* VAR_INPUT (digital) */
  330. plcbit enable;
  331. } FileCopy_typ;
  332. typedef struct FileDelete
  333. {
  334. /* VAR_INPUT (analog) */
  335. unsigned long pDevice;
  336. unsigned long pName;
  337. /* VAR_OUTPUT (analog) */
  338. unsigned short status;
  339. /* VAR (analog) */
  340. unsigned short i_state;
  341. unsigned short i_result;
  342. unsigned long i_tmp;
  343. /* VAR_INPUT (digital) */
  344. plcbit enable;
  345. } FileDelete_typ;
  346. typedef struct FileInfo
  347. {
  348. /* VAR_INPUT (analog) */
  349. unsigned long pDevice;
  350. unsigned long pName;
  351. unsigned long pInfo;
  352. /* VAR_OUTPUT (analog) */
  353. unsigned short status;
  354. /* VAR (analog) */
  355. unsigned short i_state;
  356. unsigned short i_result;
  357. unsigned long i_tmp;
  358. /* VAR_INPUT (digital) */
  359. plcbit enable;
  360. } FileInfo_typ;
  361. typedef struct FileTruncate
  362. {
  363. /* VAR_INPUT (analog) */
  364. unsigned long pDevice;
  365. unsigned long pName;
  366. unsigned long newLength;
  367. /* VAR_OUTPUT (analog) */
  368. unsigned short status;
  369. /* VAR (analog) */
  370. unsigned short i_state;
  371. unsigned short i_result;
  372. unsigned long i_tmp;
  373. /* VAR_INPUT (digital) */
  374. plcbit enable;
  375. } FileTruncate_typ;
  376. typedef struct DirCreate
  377. {
  378. /* VAR_INPUT (analog) */
  379. unsigned long pDevice;
  380. unsigned long pName;
  381. /* VAR_OUTPUT (analog) */
  382. unsigned short status;
  383. /* VAR (analog) */
  384. unsigned short i_state;
  385. unsigned short i_result;
  386. unsigned long i_tmp;
  387. /* VAR_INPUT (digital) */
  388. plcbit enable;
  389. } DirCreate_typ;
  390. typedef struct DirOpen
  391. {
  392. /* VAR_INPUT (analog) */
  393. unsigned long pDevice;
  394. unsigned long pName;
  395. /* VAR_OUTPUT (analog) */
  396. unsigned short status;
  397. unsigned long ident;
  398. /* VAR (analog) */
  399. unsigned short i_state;
  400. unsigned short i_result;
  401. unsigned long i_tmp;
  402. /* VAR_INPUT (digital) */
  403. plcbit enable;
  404. } DirOpen_typ;
  405. typedef struct DirClose
  406. {
  407. /* VAR_INPUT (analog) */
  408. unsigned long ident;
  409. /* VAR_OUTPUT (analog) */
  410. unsigned short status;
  411. /* VAR (analog) */
  412. unsigned short i_state;
  413. unsigned short i_result;
  414. unsigned long i_tmp;
  415. /* VAR_INPUT (digital) */
  416. plcbit enable;
  417. } DirClose_typ;
  418. typedef struct DirRead
  419. {
  420. /* VAR_INPUT (analog) */
  421. unsigned long pDevice;
  422. unsigned long pPath;
  423. unsigned long entry;
  424. unsigned char option;
  425. unsigned long pData;
  426. unsigned long data_len;
  427. /* VAR_OUTPUT (analog) */
  428. unsigned short status;
  429. /* VAR (analog) */
  430. unsigned short i_state;
  431. unsigned short i_result;
  432. unsigned long i_tmp;
  433. /* VAR_INPUT (digital) */
  434. plcbit enable;
  435. } DirRead_typ;
  436. typedef struct DirReadEx
  437. {
  438. /* VAR_INPUT (analog) */
  439. unsigned long ident;
  440. unsigned long pData;
  441. unsigned long data_len;
  442. /* VAR_OUTPUT (analog) */
  443. unsigned short status;
  444. /* VAR (analog) */
  445. unsigned short i_state;
  446. unsigned short i_result;
  447. unsigned long i_tmp;
  448. /* VAR_INPUT (digital) */
  449. plcbit enable;
  450. } DirReadEx_typ;
  451. typedef struct DirInfo
  452. {
  453. /* VAR_INPUT (analog) */
  454. unsigned long pDevice;
  455. unsigned long pPath;
  456. /* VAR_OUTPUT (analog) */
  457. unsigned short status;
  458. unsigned long dirnum;
  459. unsigned long filenum;
  460. /* VAR (analog) */
  461. unsigned short i_state;
  462. unsigned short i_result;
  463. unsigned long i_tmp;
  464. /* VAR_INPUT (digital) */
  465. plcbit enable;
  466. } DirInfo_typ;
  467. typedef struct DirRename
  468. {
  469. /* VAR_INPUT (analog) */
  470. unsigned long pDevice;
  471. unsigned long pName;
  472. unsigned long pNewName;
  473. /* VAR_OUTPUT (analog) */
  474. unsigned short status;
  475. /* VAR (analog) */
  476. unsigned short i_state;
  477. unsigned short i_result;
  478. unsigned long i_tmp;
  479. /* VAR_INPUT (digital) */
  480. plcbit enable;
  481. } DirRename_typ;
  482. typedef struct DirCopy
  483. {
  484. /* VAR_INPUT (analog) */
  485. unsigned long pSrcDev;
  486. unsigned long pSrcDir;
  487. unsigned long pDestDev;
  488. unsigned long pDestDir;
  489. unsigned char option;
  490. /* VAR_OUTPUT (analog) */
  491. unsigned short status;
  492. /* VAR (analog) */
  493. unsigned short i_state;
  494. unsigned short i_result;
  495. unsigned long i_tmp;
  496. /* VAR_INPUT (digital) */
  497. plcbit enable;
  498. } DirCopy_typ;
  499. typedef struct DirDelete
  500. {
  501. /* VAR_INPUT (analog) */
  502. unsigned long pDevice;
  503. unsigned long pName;
  504. /* VAR_OUTPUT (analog) */
  505. unsigned short status;
  506. /* VAR (analog) */
  507. unsigned short i_state;
  508. unsigned short i_result;
  509. unsigned long i_tmp;
  510. /* VAR_INPUT (digital) */
  511. plcbit enable;
  512. } DirDelete_typ;
  513. typedef struct DirDeleteEx
  514. {
  515. /* VAR_INPUT (analog) */
  516. unsigned long pDevice;
  517. unsigned long pName;
  518. /* VAR_OUTPUT (analog) */
  519. unsigned short status;
  520. /* VAR (analog) */
  521. unsigned short i_state;
  522. unsigned short i_result;
  523. unsigned long i_tmp;
  524. /* VAR_INPUT (digital) */
  525. plcbit enable;
  526. } DirDeleteEx_typ;
  527. typedef struct SetAttributes
  528. {
  529. /* VAR_INPUT (analog) */
  530. unsigned long pDevice;
  531. unsigned long pPath;
  532. unsigned char attributes;
  533. unsigned char option;
  534. /* VAR_OUTPUT (analog) */
  535. unsigned short status;
  536. /* VAR (analog) */
  537. unsigned short i_state;
  538. unsigned short i_result;
  539. unsigned long i_tmp;
  540. /* VAR_INPUT (digital) */
  541. plcbit enable;
  542. } SetAttributes_typ;
  543. typedef struct GetAttributes
  544. {
  545. /* VAR_INPUT (analog) */
  546. unsigned long pDevice;
  547. unsigned long pPath;
  548. /* VAR_OUTPUT (analog) */
  549. unsigned short status;
  550. unsigned char attributes;
  551. /* VAR (analog) */
  552. unsigned short i_state;
  553. unsigned short i_result;
  554. unsigned long i_tmp;
  555. /* VAR_INPUT (digital) */
  556. plcbit enable;
  557. } GetAttributes_typ;
  558. typedef struct DevMemInfo
  559. {
  560. /* VAR_INPUT (analog) */
  561. unsigned long pDevice;
  562. /* VAR_OUTPUT (analog) */
  563. unsigned short status;
  564. unsigned long freemem;
  565. unsigned long memsize;
  566. /* VAR (analog) */
  567. unsigned short i_state;
  568. unsigned short i_result;
  569. unsigned long i_tmp;
  570. /* VAR_INPUT (digital) */
  571. plcbit enable;
  572. } DevMemInfo_typ;
  573. typedef struct DevLink
  574. {
  575. /* VAR_INPUT (analog) */
  576. unsigned long pDevice;
  577. unsigned long pParam;
  578. /* VAR_OUTPUT (analog) */
  579. unsigned short status;
  580. unsigned long handle;
  581. /* VAR (analog) */
  582. unsigned short i_state;
  583. unsigned short i_result;
  584. unsigned long i_tmp;
  585. /* VAR_INPUT (digital) */
  586. plcbit enable;
  587. } DevLink_typ;
  588. typedef struct DevUnlink
  589. {
  590. /* VAR_INPUT (analog) */
  591. unsigned long handle;
  592. /* VAR_OUTPUT (analog) */
  593. unsigned short status;
  594. /* VAR (analog) */
  595. unsigned short i_state;
  596. unsigned short i_result;
  597. unsigned long i_tmp;
  598. /* VAR_INPUT (digital) */
  599. plcbit enable;
  600. } DevUnlink_typ;
  601. typedef struct GetVolumeLabel
  602. {
  603. /* VAR_INPUT (analog) */
  604. unsigned long pDevice;
  605. unsigned long pLabel;
  606. unsigned long labelMax;
  607. /* VAR_OUTPUT (analog) */
  608. unsigned short status;
  609. unsigned long labelLen;
  610. /* VAR (analog) */
  611. unsigned short i_state;
  612. unsigned short i_result;
  613. unsigned long i_tmp;
  614. /* VAR_INPUT (digital) */
  615. plcbit enable;
  616. } GetVolumeLabel_typ;
  617. typedef struct GetVolumeSerialNo
  618. {
  619. /* VAR_INPUT (analog) */
  620. unsigned long pDevice;
  621. /* VAR_OUTPUT (analog) */
  622. unsigned short status;
  623. unsigned long serialNo;
  624. /* VAR (analog) */
  625. unsigned short i_state;
  626. unsigned short i_result;
  627. unsigned long i_tmp;
  628. /* VAR_INPUT (digital) */
  629. plcbit enable;
  630. } GetVolumeSerialNo_typ;
  631. /* Prototyping of functions and function blocks */
  632. _BUR_PUBLIC void FileCreate(struct FileCreate* inst);
  633. _BUR_PUBLIC void FileOpen(struct FileOpen* inst);
  634. _BUR_PUBLIC void FileClose(struct FileClose* inst);
  635. _BUR_PUBLIC void FileRead(struct FileRead* inst);
  636. _BUR_PUBLIC void FileReadEx(struct FileReadEx* inst);
  637. _BUR_PUBLIC void FileWrite(struct FileWrite* inst);
  638. _BUR_PUBLIC void FileWriteEx(struct FileWriteEx* inst);
  639. _BUR_PUBLIC void FileRename(struct FileRename* inst);
  640. _BUR_PUBLIC void FileCopy(struct FileCopy* inst);
  641. _BUR_PUBLIC void FileDelete(struct FileDelete* inst);
  642. _BUR_PUBLIC void FileInfo(struct FileInfo* inst);
  643. _BUR_PUBLIC void FileTruncate(struct FileTruncate* inst);
  644. _BUR_PUBLIC void DirCreate(struct DirCreate* inst);
  645. _BUR_PUBLIC void DirOpen(struct DirOpen* inst);
  646. _BUR_PUBLIC void DirClose(struct DirClose* inst);
  647. _BUR_PUBLIC void DirRead(struct DirRead* inst);
  648. _BUR_PUBLIC void DirReadEx(struct DirReadEx* inst);
  649. _BUR_PUBLIC void DirInfo(struct DirInfo* inst);
  650. _BUR_PUBLIC void DirRename(struct DirRename* inst);
  651. _BUR_PUBLIC void DirCopy(struct DirCopy* inst);
  652. _BUR_PUBLIC void DirDelete(struct DirDelete* inst);
  653. _BUR_PUBLIC void DirDeleteEx(struct DirDeleteEx* inst);
  654. _BUR_PUBLIC void SetAttributes(struct SetAttributes* inst);
  655. _BUR_PUBLIC void GetAttributes(struct GetAttributes* inst);
  656. _BUR_PUBLIC void DevMemInfo(struct DevMemInfo* inst);
  657. _BUR_PUBLIC void DevLink(struct DevLink* inst);
  658. _BUR_PUBLIC void DevUnlink(struct DevUnlink* inst);
  659. _BUR_PUBLIC void GetVolumeLabel(struct GetVolumeLabel* inst);
  660. _BUR_PUBLIC void GetVolumeSerialNo(struct GetVolumeSerialNo* inst);
  661. _BUR_PUBLIC unsigned short FileIoGetSysError(void);
  662. #ifdef __cplusplus
  663. };
  664. #endif
  665. #endif /* _FILEIO_ */