BotSense.bsI2C
index
/prj/rnr-sdk/botsense/bsPython/modules/BotSense/bsI2C.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
       
_bsI2C
BotSense.BotSenseCore
BotSense.BotSenseError
BotSense.BotSenseTypes

 
Functions
       
I2CGetMsgName(client, hndVConn, msgId)
Get the I2C 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     - I2C message id.
 
Return:
  Returns message name string if it can be determined.
  Otherwise returns 'unknown'.
I2CReqClose(client, hndVConn)
Proxy server request to close client's proxied I2C bus device virtual
connection.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  hndVConn  - Virtual connection handle.
I2CReqOpen(client, devName, trace=False)
Proxy server request to establish a virtual connection to an 
I2C bus device.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  devName   - Proxied I2C device name (e.g. /dev/i2c-0).
  trace     - Initial message tracing enable(true)/disable(false) state.
 
Return
  New virtual connection handle.
I2CReqRead(client, hndVConn, i2cAddr, readLen)
I2C request to read from a device attached to a proxied I2C bus.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  hndVConn  - Virtual connection handle.
  i2cAddr   - Address of attached device on the I2C bus.
  readLen   - Number of bytes to read.
 
Return:
  Buffer list of read bytes.
I2CReqScan(client, hndVConn)
I2C request to scan a proxied I2C bus for attached devices.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  hndVConn  - Virtual connection handle.
 
Return:
  List of I2C address of discovered attached devices.
I2CReqTrans(client, hndVConn, i2cAddr, wbuf, readLen)
I2C request to execute a write-read transaction to a device
attached to a proxied I2C bus.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  hndVConn  - Virtual connection handle.
  i2cAddr   - Address of attached device on the I2C bus.
  wbuf      - Write buffer.
  readLen   - Number of bytes to read.
 
Return:
  Buffer list of read bytes.
I2CReqWrite(client, hndVConn, i2cAddr, wbuf)
I2C request to write to a device attached to a proxied I2C bus.
 
Raises a BotSenseError exception on failure.
 
Parameters:
  client    - BotSenseTypes.BsClient instance.
  hndVConn  - Virtual connection handle.
  i2cAddr   - Address of attached device on the I2C bus.
  wbuf      - Write buffer.
 
Return:
  Number of bytes written.
bsI2CGetMsgName(...)
bsI2CReqClose(...)
bsI2CReqOpen(...)
bsI2CReqRead(...)
bsI2CReqScan(...)
bsI2CReqTrans(...)
bsI2CReqWrite(...)
delete_i2cAddrArray(...)
i2cAddrArray_getitem(...)
i2cAddrArray_setitem(...)
new_i2cAddrArray(...)

 
Data
        BS_I2C_CLIENT_LIB = 'libbsclient_i2c'
BS_I2C_DEV_NAME_DFT = '/dev/i2c-0'
BS_I2C_SERVER_MOD = 'libbsserver_i2c'
I2CMaxNumOfScannedAddrs = 256