Advantech PCI-1682U Manual de usuario Pagina 33

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 104
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 32
27 PCI-1680U/1682U User Manual
Chapter 4 Software Requirements
4.3 Introduction to API
Main API used in current development are:
Only brief introduction is given in this manual regarding detailed usage of each func-
tion.Notes are made to notify users of important operation.For more detailed informa-
tion about the usage, please see MSDN.
4.3.1 CreateFile
Users can use this interface to open CAN port device.
Close the port by calling CloseHandle when operation is completed.
Syntax
HANDLE CreateFile(
LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
CreateFile Open specified Can port.
CloseHandle Close specified Can port.
DeviceIoControl
Send commands to drivers, including configuration, management
and getting status, etc.
ReadFile Read data.
WriteFile Send data.
GetOverLappedResult Wait until asynchronous operation is finished.
SetCommMask Set mask.
GetCommMask Get mask.
WaitCommEvent Wait specified event.
ClearCommError Get error code with this function when receiving error event.
Note! This driver does not support share open function, so the third parameter
must be set to 0.
Vista de pagina 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 103 104

Comentarios a estos manuales

Sin comentarios