![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
BotSense Swigged Serial Python Interface Module. More...
Classes | |
| class | _object |
Functions | |
| def | swig_import_helper () |
| def | bsSerialGetMsgName (pClient, hndVConn, uMsgId) |
| def | bsSerialReqOpen (pClient, sDevName, nBaudRate, nByteSize, cParity, nStopBits, bRtsCts, bXonXoff, bInitTrace) |
| def | bsSerialReqClose (pClient, hndVConn) |
| def | bsSerialReqRead (pClient, hndVConn, uReadLen, rbuf) |
| def | bsSerialReqWrite (pClient, hndVConn, wbuf, uWriteLen) |
| def | bsSerialReqTrans (pClient, hndVConn, wbuf, uWriteLen, uReadLen, rbuf) |
| def | SerialGetMsgName (client, hndVConn, msgId) |
| def | SerialReqOpen (client, devName, baudRate=9600, byteSize=8, parity='N', stopBits=1, rtscts=False, xonxoff=False, trace=False) |
| def | SerialReqClose (client, hndVConn) |
| def | SerialReqRead (client, hndVConn, readLen) |
| def | SerialReqWrite (client, hndVConn, wbuf) |
| def | SerialReqTrans (client, hndVConn, wbuf, readLen) |
BotSense Swigged Serial Python Interface Module.
| def BotSense.bsSerial.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'.
Definition at line 149 of file bsSerial.py.
References BotSense.bsSerial.SerialReqOpen().
| def BotSense.bsSerial.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.
Definition at line 196 of file bsSerial.py.
| def BotSense.bsSerial.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.
Definition at line 169 of file bsSerial.py.
Referenced by BotSense.bsSerial.SerialGetMsgName().
| def BotSense.bsSerial.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.
Definition at line 211 of file bsSerial.py.
| def BotSense.bsSerial.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.
Definition at line 254 of file bsSerial.py.
| def BotSense.bsSerial.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.
Definition at line 232 of file bsSerial.py.