| |
- SerialGetMsgName(client, hndVConn, msgId)
- Get the serial message name.
For each (virtual connection, message id) 2-tuple, there can be a known
name string (provided the id is valid and an application provides the
information).
Parameters:
client - BotSenseTypes.BsClient instance.
hndVConn - Virtual connection handle (ignored).
msgId - Serial message id.
Return:
Returns message name string if it can be determined.
Otherwise returns 'unknown'.
- SerialReqClose(client, hndVConn)
- Proxy server request to close client's proxied serial device virtual
connection.
Raises a BotSenseError exception on failure.
Parameters:
client - BotSenseTypes.BsClient instance.
hndVConn - Virtual connection handle.
- SerialReqOpen(client, devName, baudRate=9600, byteSize=8, parity='N', stopBits=1, rtscts=False, xonxoff=False, trace=False)
- Proxy server request to establish a virtual connection to an RS-232
serial device.
Raises a BotSenseError exception on failure.
Parameters:
client - BotSenseTypes.BsClient instance.
devName - Proxied serial device name (e.g. /dev/ttyS0).
baudRate - Baud rate.
byteSize - Bytes size in bits 5...8.
parity - Parity. One of: 'N', 'E', 'O'
stopBits - Number of stop bits 1, 2
rtscts - Do [not] use hardware flow control.
xonxoff - Do [not] use software flow control.
trace - Initial message tracing enable(true)/disable(false) state.
Return
New virtual connection handle.
- SerialReqRead(client, hndVConn, readLen)
- Serial request to read from a proxied RS-232 serial device.
Raises a BotSenseError exception on failure.
Parameters:
client - BotSenseTypes.BsClient instance.
hndVConn - Virtual connection handle.
readLen - Number of bytes to read.
Return:
Buffer list of read bytes.
- SerialReqTrans(client, hndVConn, wbuf, readLen)
- Serial request to execute a write-read transaction to a proxied
RS-232 serial device.
Raises a BotSenseError exception on failure.
Parameters:
client - BotSenseTypes.BsClient instance.
hndVConn - Virtual connection handle.
wbuf - Write buffer.
readLen - Number of bytes to read.
Return:
Buffer list of read bytes.
- SerialReqWrite(client, hndVConn, wbuf)
- Serial request to write to a proxied RS-232 serial device.
Raises a BotSenseError exception on failure.
Parameters:
client - BotSenseTypes.BsClient instance.
hndVConn - Virtual connection handle.
wbuf - Write buffer.
Return:
Number of bytes written.
- bsSerialGetMsgName(...)
- bsSerialReqClose(...)
- bsSerialReqOpen(...)
- bsSerialReqRead(...)
- bsSerialReqTrans(...)
- bsSerialReqWrite(...)
|