Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 1 | Cycling Speed and Cadence API description |
| 2 | ***************************************** |
| 3 | |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 4 | |
| 5 | Cycling Speed and Cadence Manager hierarchy |
| 6 | =========================================== |
| 7 | |
| 8 | Service org.bluez |
Luiz Augusto von Dentz | 942fe3b | 2012-12-14 11:12:58 +0200 | [diff] [blame] | 9 | Interface org.bluez.CyclingSpeedManager1 |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 10 | Object path [variable prefix]/{hci0,hci1,...} |
| 11 | |
| 12 | Methods RegisterWatcher(object agent) |
| 13 | |
| 14 | Registers a watcher to monitor cycling speed and |
| 15 | cadence measurements. |
| 16 | |
| 17 | Possible Errors: org.bluez.Error.InvalidArguments |
| 18 | |
| 19 | UnregisterWatcher(object agent) |
| 20 | |
| 21 | Unregisters a watcher. |
| 22 | |
| 23 | Cycling Speed and Cadence Profile hierarchy |
| 24 | =========================================== |
| 25 | |
| 26 | Service org.bluez |
Luiz Augusto von Dentz | 942fe3b | 2012-12-14 11:12:58 +0200 | [diff] [blame] | 27 | Interface org.bluez.CyclingSpeed1 |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 28 | Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX |
| 29 | |
Andrzej Kaczmarek | 5d93cc7 | 2012-12-04 13:43:42 +0100 | [diff] [blame] | 30 | Methods SetCumulativeWheelRevolutions(uint32 value) |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 31 | |
| 32 | Sets cumulative wheel revolutions value if |
| 33 | Cumulative Wheel Revolutions feature is supported. |
| 34 | |
| 35 | Possible Errors: org.bluez.Error.NotSupported |
| 36 | |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 37 | Properties string Location (optional) [readwrite] |
| 38 | |
| 39 | Current sensor location, if supported. |
| 40 | If Multiple Sensor Locations feature is supported, |
| 41 | this property can be set to one of values read from |
| 42 | SupportedLocations property. |
| 43 | |
| 44 | Possible values: "other", "top-of-shoe", "in-shoe", |
| 45 | "hip", "front-wheel", "left-crank", |
| 46 | "right-crank", "left-pedal", |
| 47 | "right-pedal", "front-hub", |
| 48 | "rear-dropout", "chainstay", |
| 49 | "rear-wheel", "rear-hub" |
| 50 | |
| 51 | array{string} SupportedLocations (optional) [readonly] |
| 52 | |
| 53 | List of locations supported by sensor, only present |
| 54 | if Multiple Sensor Locations feature is supported. |
| 55 | |
| 56 | boolean WheelRevolutionDataSupported [readonly] |
| 57 | |
| 58 | true if sensor can read and set Cumulative Wheel |
| 59 | Revolutions value, false otherwise. |
| 60 | |
Anderson Lizardo | 6666f31 | 2013-07-22 21:36:05 -0400 | [diff] [blame] | 61 | boolean MultipleLocationsSupported [readonly] |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 62 | |
| 63 | true if sensor supports Multiple Sensor Locations |
| 64 | feature and can set Location, false otherwise. |
| 65 | |
| 66 | Cycling Speed and Cadence Watcher hierarchy |
| 67 | =========================================== |
| 68 | |
| 69 | Service unique name |
Luiz Augusto von Dentz | 942fe3b | 2012-12-14 11:12:58 +0200 | [diff] [blame] | 70 | Interface org.bluez.CyclingSpeedWatcher1 |
Andrzej Kaczmarek | 819a9ea | 2012-10-01 11:43:41 +0200 | [diff] [blame] | 71 | Object path freely definable |
| 72 | |
| 73 | Methods void MeasurementReceived(object device, dict measurement) |
| 74 | |
| 75 | This callback is called whenever wheel and/or crank |
| 76 | revolutions measurement is received from sensor. |
| 77 | |
| 78 | Measurement: |
| 79 | |
| 80 | uint32 WheelRevolutions (optional): |
| 81 | |
| 82 | Cumulative number of wheel revolutions. |
| 83 | |
| 84 | uint16 LastWheelEventTime (optional): |
| 85 | |
| 86 | Time of last event from wheel sensor. |
| 87 | Value is expressed in 1/1024 second |
| 88 | units and can roll over during a ride. |
| 89 | |
| 90 | uint16 CrankRevolutions (optional): |
| 91 | |
| 92 | Cumulative number of crank revolutions. |
| 93 | This value can occasionally roll over. |
| 94 | |
| 95 | uint16 LastCrankEventTime (optional): |
| 96 | |
| 97 | Time of last event from crank sensor. |
| 98 | Value is expressed in 1/1024 second |
| 99 | units and can roll over during a ride. |