src.device-manager.python.WeaveBleBase module

Summary

Contents

class src.device-manager.python.WeaveBleBase.WeaveBleBase

Bases: object

CloseBle(connObj)

Called by Weave to close the BLE connection.

GetBleEvent()

Called by WeaveDeviceMgr.py on behalf of Weave to retrieve a queued message.

ParseInputLine(line, cmd=None)
SubscribeBleCharacteristic(connObj, svcId, charId, subscribe)

Called by Weave to (un-)subscribe to a characteristic of a service.

Usage(cmd)
WriteBleCharacteristic(connObj, svcId, charId, buffer, length)

Called by WeaveDeviceMgr.py to satisfy a request by Weave to transmit a packet over BLE.

connect(identifier)

API to initiate BLE connection to peripheral device whose identifier == identifier.

devMgrCB()

A callback used by WeaveDeviceMgr.py to drive the runloop while the main thread waits for the Weave thread to complete its operation.

disconnect()

API to initiate BLE disconnect procedure.

readlineCB()

A callback used by readline to drive the runloop while the main thread waits for commandline input from the user.

runLoopUntil(should_tuple)

helper function to drive runloop until an expected event is received or the timeout expires.

scan(line)

API to initiatae BLE scanning for -t user_timeout seconds.

scan_connect(line)

API to perform both scan and connect operations in one call.

setInputHook(hookFunc)

Set the PyOS_InputHook to call the specific function.