BotSense.bsSerial
index
/prj/rnr-sdk/botsense/bsPython/modules/BotSense/bsSerial.py

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

 
Modules
       
_bsSerial
BotSense.BotSenseCore
BotSense.BotSenseError
BotSense.BotSenseTypes

 
Functions
       
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(...)

 
Data
        BS_SER_CLIENT_LIB = 'libbsclient_serial'
BS_SER_DEV_NAME_DFT = '/dev/ttyS0'
BS_SER_SERVER_MOD = 'libbsserver_serial'