Skip to content

Serial communication API

Pete edited this page Sep 13, 2017 · 5 revisions

🔙 Home

  • hb_comClose(<nPort>) lSuccess
    closes (the handle of) <nPort> invalidating any pending communication process. should be invoked upon finishing working with that com port.

  • hb_comDiscardChar(nPort, nChar|cChar) lSuccess

  • hb_comErrorChar(nPort, nChar|cChar ) lSuccess

  • hb_comFindPort(<cDeviceName> [,<lCreate> = .F.]) nPort

  • hb_comFlowChars(nPort, nXONchar|cXONchar, nXOFFchar|cXOFFchar) lSuccess

  • hb_comFlowControl(nPort, @nOldFlow [,nNewFlow]) lSuccess

  • hb_comFlowSet(nPort, nFlow) lSuccess

  • hb_comFlush(nPort, [ nType = HB_COM_IOFLUSH ] ) lSuccess

  • hb_comGetDevice(nPort) cDeviceName

  • hb_comGetDeviceHandle(nPort) nHandle | F_ERROR

  • hb_comGetError(nPort) nError

  • hb_comGetOSError(nPort) nError

  • hb_comInit(nPort, nBaud, cParity, nSize, nStop) lSuccess

  • hb_comInputCount(<nPort>) nCount
    returns the number of bytes currently (but not yet read) in input buffer of <nPort> or -1 on error.

  • hb_comInputState(nPort) nState

  • hb_comLastNum() nLastPortNumber

  • hb_comLSR(nPort, @nValue) lSuccess

  • hb_comMCR(nPort, @nValue, nClear, nSet) lSuccess

  • hb_comMSR(nPort, @nValue) lSuccess

  • hb_comOpen(nPort) lSuccess
    opens com port specified by <nPort> and returns .T. on success or .F. on failure.

  • hb_comOutputCount(<nPort>) nCount
    returns the number of bytes currently (remaining to be transmitted) in output buffer of <nPort> or -1 on error.

  • hb_comOutputState(nPort) nState

  • hb_comRecv(nPort, @cBuffer, [nLen = Len(cBuffer)], [nTimeout = 0]) nBytesRecv

  • hb_comSend(nPort, cBuffer, [nLen = Len(cBuffer)], [nTimeout = 0]) nBytesSent

  • hb_comSendBreak(nPort, [nDuration = 50]) lSuccess

  • hb_comSetDevice(nPort, cDeviceName) lSuccess

  • hb_comSetError(nPort, nError) NIL

🔙 Home

Index

Harbour exclusive functions Clipper compatible functions
hb_A A
hb_B B
hb_C C
hb_D D
hb_E E
hb_F F
hb_G G
hb_H H
hb_I I
hb_J_K J K
hb_L L
hb_M M
hb_N_O N O
hb_P P
hb_R Q R
hb_S S
hb_T T
hb_U U
hb_V V W
hb_W X Y

  • Contrib. Libraries
HBWIN WinAPI Library Compress Libraries
HBHPDF Library (Haru) Multi Threading
Harbour Socket API hbCT (Cl*pper tools)
Serial API hbNF (NanForum library)
HBCURL cURL API Library Mini-XML docs

Clone this wiki locally