Agilent Technologies FS2010 Manual de Serviço Página 277

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 276
Agilent Signal Generators Programming Guide 269
Creating and Downloading Waveform Files
Programming Examples
viWrite(vi, s2, strlen((char*)s2), 0);
long numRead;
// Send file in BUFFER_SIZE chunks to the signal generator
do
{
numRead = fread(buf, sizeof(char), BUFFER_SIZE, file);
viWrite(vi, buf, numRead, 0);
} while (numRead == BUFFER_SIZE);
// Send the terminating newline and EOI
viSetAttribute( vi, VI_ATTR_SEND_END_EN, 1 );
char* newLine = "\n";
viWrite(vi, (unsigned char*)newLine, 1, 0);
delete [] buf;
}
else
{
fprintf(stderr, "Could not allocate memory for copy buffer\n");
}
fclose(file);
viClose(vi);
viClose(defaultRM);
return 0;
}
Vista de página 276
1 2 ... 272 273 274 275 276 277 278 279 280 281 282 ... 395 396

Comentários a estes Manuais

Sem comentários