Prosoft-technology MVI69-ADM Uživatelský manuál Strana 250

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 342
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 249
Serial Port Library Functions MVI-ADM 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
Page 250 of 342 ProSoft Technology, Inc.
February 20, 2013
MVIsp_GetLineStatus
Syntax
int MVIsp_GetLineStatus(int comport, BYTE *status);
Parameters
comport
port for which line status is requested
status
pointer to BYTE to receive line status
Description
MVIsp_GetLineStatus returns any line status errors received over the serial port.
The status returned indicates if any overrun, parity, or framing errors or break
signals have been detected.
comport is the desired serial port and must be previously opened with
MVIsp_Open.
status points to a BYTE that will receive a set of flags that indicate errors
received over the serial port. If the returned status is 0, no errors have been
detected. If status is non-zero, it can be logically and'ed with the line status error
flags LSERR_OVERRUN, LSERR_PARITY, LSERR_FRAMING,
LSERR_BREAK, and/or QSERR_OVERRUN to determine the exact cause of the
error. The corresponding error flag will be set for each error type detected (Note:
The QSERR_OVERRUN bit indicates that a receive queue overflow has
occurred).
After returning the bit flags in status, line status errors are cleared. Therefore,
MVIsp_GetLineStatus actually returns line status errors detected since the
previous call to this function.
Return Value
MVI_SUCCESS
the line status was read successfully
MVI_ERR_NOACCESS
comport has not been opened
MVI_ERR_BADPARAM
invalid pointer
Example
BYTE sts;
if (MVIsp_GetGetLineStatus(COM2,&sts) == MVI_SUCCESS)
{
if (sts == 0)
printf("No Line Status Errors Received\n");
else if ( (sts & LSERR_BREAK) != 0)
printf("A Break Signal was Received\n");
else
printf("A Line Status Error was Received\n");
}
Zobrazit stránku 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 341 342

Komentáře k této Příručce

Žádné komentáře

Approx APPGRABBERV3 manuali

Manuali dei proprietari e guide per l'utente per Sistemi di acquisizione video Approx APPGRABBERV3.
We fornisce 1 manuali pdf Approx APPGRABBERV3 per scaricare gratuitamente in base al tipo di documento: Scheda Tecnica






Più prodotti e manuali per Sistemi di acquisizione video Approx

Modelli Tipo di Documento
APPGRABBERV2 Manuale Utente       Approx APPGRABBERV2 video capture board, 233 pagine