コード例 #1
0
ファイル: client.c プロジェクト: jdugge/snap7
//------------------------------------------------------------------------------
// Async Upload DB0 (using polling as completion trigger)
//------------------------------------------------------------------------------
void AsPOUploadDB0()
{
    int Size = sizeof(Buffer); // Size is IN/OUT par
    // In input it tells the client the size available
    // In output it tells us how many bytes were uploaded.
    int res;
    JobDone=false;

    res=Cli_AsUpload(Client, Block_SDB, 0, &Buffer, &Size);

    if (res==0)
    {
        while (Cli_CheckAsCompletion(Client,&res)!=JobComplete)
        {
            SysSleep(100);
        };
    }

    if (Check(res,"Async (polling) Block Upload (SDB 0)"))
    {
        printf("Dump (%d bytes) :\n",Size);
        hexdump(&Buffer,Size);
    }
}
コード例 #2
0
ファイル: snap7.cpp プロジェクト: JanczuraPiotr/snap7
//---------------------------------------------------------------------------
bool TS7Client::CheckAsCompletion(int *opResult)
{
	return Cli_CheckAsCompletion(Client ,opResult)==JobComplete;
}