Difference between revisions of "Phonegap Healthcare Adapter Design"

From CDOT Wiki
Jump to: navigation, search
(Android)
(iOS)
Line 40: Line 40:
 
=== iOS ===
 
=== iOS ===
 
==== Wifi ====
 
==== Wifi ====
*
+
* Unknown at this time
 
==== Bluetooth ====
 
==== Bluetooth ====
 +
* [http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CBCentralManager_Class/translated_content/CBCentralManager.html#//apple_ref/doc/uid/TP40011284 CBCentralManager] entry point to Bluetooth communication
 +
** Allows querying of devices
 +
** Can list connected devices
 +
** Can connect to devices, creating [http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CBPeripheral_Class/translated_content/CBPeripheral.html#//apple_ref/doc/c_ref/CBPeripheral CBPreripheral] Objects
 +
* [http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CBPeripheral_Class/translated_content/CBPeripheral.html#//apple_ref/doc/c_ref/CBPeripheral CBPeripheral]'s allows reading and writing of [http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CBCharacteristic_Class/translated_content/CBCharacteristic.html#//apple_ref/doc/c_ref/CBCharacteristic CBCharacteristic] Objects
 +
** Can listen for changes to characteristics
 +
** Writing and reading is event driven programing via callback parameters
 +
* [http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CBCharacteristic_Class/translated_content/CBCharacteristic.html#//apple_ref/doc/c_ref/CBCharacteristic CBCharacteristic]'s represent a piece of data from a device along with semantic data
 +
 
=== Android ===
 
=== Android ===
 
==== [http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html Wifi] ====
 
==== [http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html Wifi] ====

Revision as of 15:56, 17 August 2012


NexJ Medical Peripheral Mobile Adapter Will be designed to enable NexJ's Mobile Healthcare solutions to interact with Bluetooth peripherals.

Class Diagram

NexjBluetooth.png

Classes

phonegapMedicalDeviceInterface

  • Interface to a medical device for use by the NexJ mobile health solution
  • Implemented in Javascript

medicalDevice

  • Representation of a medical device
  • Delegates to a native medical device interface
  • Implemented in Javascript

nativeMedicalDeviceInterface

  • Private interface to physical medical devices
  • Implemented in native code (Objective C on iOS, java on Android)

bluetoothAdapter

  • Adapter to allow medical device objects to interact with communication libraries on the device
  • In the future a Wifi adapter will also be needed to fulfill the same role of communication over another protocol
  • Implemented in native code

bloodPressureBluetoothAdapter

  • Adapter to allow medical device objects to interact with specific medical peripherals
  • These will be needed for each type of medical peripheral
  • Implemented in native code

Native Bluetooth API

  • Libraries on the mobile devices SDK that allows programmable interaction with Bluetooth devices

Blood Pressure Device

  • Physical medical device peripheral

Flaws

  • Should we be concerned about managing the instances of medicalDevice or will the rest of the solution
    • Rest of the application: It becomes more of a Medical device factory
    • This Project: Another layer should be added to represent a device manager
  • bloodPressureBluetoothAdapter should know about specific device communication without relying on any specific communication protocol, otherwise it will need be reimplemented per communication adapter(eg. BluetoothAdapter, WifiAdapter)

Mobile Device Libraries

iOS

Wifi

  • Unknown at this time

Bluetooth

  • CBCentralManager entry point to Bluetooth communication
    • Allows querying of devices
    • Can list connected devices
    • Can connect to devices, creating CBPreripheral Objects
  • CBPeripheral's allows reading and writing of CBCharacteristic Objects
    • Can listen for changes to characteristics
    • Writing and reading is event driven programing via callback parameters
  • CBCharacteristic's represent a piece of data from a device along with semantic data

Android

Wifi

  • WifiP2pManager is the starting point for all peer to peer communication
    • Upon initialization devices connections can be established
    • Peers can be queried

Bluetooth