Serial Communication API - Petewg/harbour-core GitHub Wiki
π 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