Advantech PCI-1682U Manual do Utilizador Página 51

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 104
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 50
45 PCI-1680U/1682U User Manual
Chapter 4 Software Requirements
Example
Wait event in synchronous mode.
DWORD dwMask;
BOOL bSuccess = WaitCommEvent(hDevice, &dwMask, NULL);
if(bSuccess)
{
if(dwMask & EV_ERR)
{
//to do
DWORD dwError;
bSuccess = ClearCommError(hDevice, &dwError, NULL);
if(bSuccess)
{
//to do
if(dwError& CE_FRAME || dwError& CE_BREAK)
{
CanStatusPar_t status;
DWORD dwReturned;
DeviceIoControl (hDevice,
CAN_IOCTL_STATUS,
NULL,
0,
&status,
sizeof(CanStatusPar_t),
&dwReturned,
NULL
);
}
}
}
See Also
WaitCommEvent
DeviceIoControl
Vista de página 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 103 104

Comentários a estes Manuais

Sem comentários