![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
BotSense Swigged I2C Python Interface Module. More...
Classes | |
| class | _object |
Functions | |
| def | swig_import_helper () |
| def | bsI2CGetMsgName (pClient, hndVConn, uMsgId) |
| def | bsI2CReqOpen (pClient, sDevName, bInitTrace) |
| def | bsI2CReqClose (pClient, hndVConn) |
| def | bsI2CReqRead (pClient, hndVConn, i2cAddr, uReadLen, rbuf) |
| def | bsI2CReqWrite (pClient, hndVConn, i2cAddr, wbuf, uWriteLen) |
| def | bsI2CReqTrans (pClient, hndVConn, i2cAddr, wbuf, uWriteLen, uReadLen, rbuf) |
| def | bsI2CReqScan (pClient, hndVConn, bufScan, sizeScanBuf) |
| def | new_i2cAddrArray (nelements) |
| def | delete_i2cAddrArray (ary) |
| def | i2cAddrArray_getitem (ary, index) |
| def | i2cAddrArray_setitem (ary, index, value) |
| def | I2CGetMsgName (client, hndVConn, msgId) |
| def | I2CReqOpen (client, devName, trace=False) |
| def | I2CReqClose (client, hndVConn) |
| def | I2CReqRead (client, hndVConn, i2cAddr, readLen) |
| def | I2CReqWrite (client, hndVConn, i2cAddr, wbuf) |
| def | I2CReqTrans (client, hndVConn, i2cAddr, wbuf, readLen) |
| def | I2CReqScan (client, hndVConn) |
BotSense Swigged I2C Python Interface Module.
| def BotSense.bsI2C.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'.
Definition at line 176 of file bsI2C.py.
| def BotSense.bsI2C.I2CReqClose | ( | client, | |
| hndVConn | |||
| ) |
| def BotSense.bsI2C.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.
Definition at line 195 of file bsI2C.py.
| def BotSense.bsI2C.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.
Definition at line 230 of file bsI2C.py.
| def BotSense.bsI2C.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.
Definition at line 304 of file bsI2C.py.
| def BotSense.bsI2C.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.
Definition at line 276 of file bsI2C.py.
| def BotSense.bsI2C.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.
Definition at line 253 of file bsI2C.py.