发表于:2007-10-09 22:09:00
3楼
long PmacDownloadA(DWORD dwDevice, DOWNLOADMSGPROC msgp, DOWNLOADGETPROC getp, DOWNLOADPROGRESS pprg, PCHAR filename, BOOL macro, BOOL map, BOOL log, BOOL dnld);
This function takes an ASCII file, processes it, and downloads it from the PC to the PMAC. Processing includes MACRO parsing and compiling PLCs, for example. This function can generate several residual files, as described in the table below.
File name
Usage
Filename.EXT
Original file with the original EXTension (should not be *.PMA, *.56K, *.LOG, *.MAP).
Filename.PMA
After parsing the file for #define, #includes and other MACRO’s this file is generated. It may be downloaded if no compiling is necessary.
Filename.56K
This file will be created if the Filename.PMA was compiled. Compilation occurs when the macro parameter is set to TRUE.
Filename.LOG
The status of the download at each stage is recorded when the log parameter is set to TRUE.
Filename.MAP
A lookup table is created when MACRO definitions exist. They are recorded and saved to a file when the map parameter is set to TRUE.
Arguments
dwDevice Device number.
msgp Pointer to message procedure pointer.
(DOWNLOADMSGPROC) If NULL no function is called.
getp Pointer to line retrieval function. (DOWNLOADGETPROC)
If NULL no function is called.
pprg Pointer to download progress function.
(DOWNLOADPROGRESS ) If NULL no function is called.
filename Path of file to download.
macro Flag to parse for macros.
map Flag to create a map file created from macros.
log Flag to create a log file. This is the same messages as sent to
the “msgp” procedure.
dnld Flag indicating to send final parsed file to the PMAC.