requestFileTransfer()
The function requestFileTransfer() requests a list of files to be transferred from the active to passive partner in a redundant project.
Synopsis
int requestFileTransfer(int manId, dyn_string fileList);
Parameters
Parameter | Description |
---|---|
manId |
The manager ID of the data manager of the active redundant partner. Use the function convManIdToInt(). for the manId. |
fileList |
List of files that are transferred. The file name must be relative to the WinCC OA installation or project directories such as dyn_string fileList = makeDynString("panels/panel1.pnl");. |
Return value
The function returns 0 when it has been executed successfully.
Errors
Missing or invalid arguments.
Description
main()
{
int iSysId;
char iReduNr;
int iReduManId = convManIdToInt(DB_MAN, 0, iSysId, iReduNr); //Data manager of
the redu partner
DebugN("Manager ID:", iReduManId);
dyn_string fileList = makeDynString("panels/panel1.pnl");
DebugTN("File transferred:",requestFileTransfer(iReduManId, fileList));
int pendingFilesCount;
do
{
//A file cannot be copied if the redu partner is passive
pendingFilesCount = getPendingFileTransferCount();
DebugTN("getPendingFileTransferCount=" + pendingFilesCount);
}
while(pendingFilesCount > 0);
}
Assignment
Availability
CTRL