Anritsu Site Master S331D Manual de usuario Pagina 120

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 132
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 119
OPEN_EXISTING,
0, // no overlapped I/O
NULL); // null template
/* Set up the COM Ports Input and Output Buffer
Syntax -
BOOL SetupComm(
HANDLE hFile, // handle to communications device
DWORD dwInQueue, // size of input buffer
DWORD dwOutQueue // size of output buffer
);
*/
PortReady = SetupComm(ComHandle, 5000, 5000);
/* Open the existing COM Settings
Syntax -
BOOL GetCommState(
HANDLE hFile, // handle to communications device
LPDCB lpDCB // pointer to device-control block
// structure
);
*/
PortReady = GetCommState(ComHandle, &CommSettings);
/*Check to see if it was successful*/
if(!PortReady)
{
CloseHandle(ComHandle);
fclose(fp);
exit(0);
}
/* This is USed to Update the CommSettings Structure Variables*/
// Setting the Baud Rate
switch (ComBaud)
{
case ‘1’:
CommSettings.BaudRate = CBR_9600; // rate - 9600
break;
case ‘2’:
CommSettings.BaudRate = CBR_19200; // rate - 19200
break;
114 Site Master PM
Vista de pagina 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 131 132

Comentarios a estos manuales

Sin comentarios