Anritsu Site Master S331D Bedienungsanleitung Seite 120

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 132
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 131 132

Kommentare zu diesen Handbüchern

Keine Kommentare