...
The sequence diagram below illustrates an abstracted workflow for connecting to a device. Users can expect any device manager that uses the Device Manager interface will provide a means to begin a scan for devices. This scan can either be provided a callback for any devices found during the scan, or simply wait for a list of found devices to be provided at the end of a scan (the below diagram illustrates the first case). On finding several devices, a connect for one of the found devices is called on the Device Manager. This triggers a creation of an object using the Device interface with definitions for any communications protocol specific functionality. Once a successful connection has been made to the physical device, a task result of a bool is returned by the Device, which propagates back to the end-user application. Important items to make note of are that any asynchronous calls made within this sequence are illustrated by open arrows with solid lines, whereas dotted lines with open arrows illustrate the results of asynchronous tasks.
...
...