public class AntPlusBikeCadencePcc extends AntPlusBikeSpdCadCommonPcc
Modifier and Type | Class and Description |
---|---|
static interface |
AntPlusBikeCadencePcc.ICalculatedCadenceReceiver
Receiver for the CalculatedCadence event, which is:
The cadence calculated from the raw values in the sensor broadcast.
|
static interface |
AntPlusBikeCadencePcc.IMotionAndCadenceDataReceiver
Receiver for the MotionAndCadenceData event, which is:
A 'stop indicator flag' to indicate whether the cadence sensor has detected that the bike has stopped.
|
class |
AntPlusBikeCadencePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static interface |
AntPlusBikeCadencePcc.IRawCadenceDataReceiver
Receiver for the RawCadenceData event, which is:
The raw event timestamp and revolution count accumulation.
|
AntPlusBikeSpdCadCommonPcc.BikeSpdCadAsyncScanController<T extends AntPlusBikeSpdCadCommonPcc>, AntPlusBikeSpdCadCommonPcc.BikeSpdCadAsyncScanResultDeviceInfo, AntPlusBikeSpdCadCommonPcc.IBatteryStatusReceiver, AntPlusBikeSpdCadCommonPcc.IBikeSpdCadAsyncScanResultReceiver, AntPlusBikeSpdCadCommonPcc.MultiDeviceSearchSpdCadResult
AntPlusLegacyCommonPcc.ICumulativeOperatingTimeReceiver, AntPlusLegacyCommonPcc.IManufacturerAndSerialReceiver, AntPlusLegacyCommonPcc.IVersionAndModelReceiver
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
PATH_ANTPLUS_PLUGINS_PKG
Modifier and Type | Method and Description |
---|---|
static PccReleaseHandle<AntPlusBikeCadencePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBikeCadencePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBikeCadencePcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
boolean isSpdCadCombinedSensor,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static AntPlusBikeSpdCadCommonPcc.BikeSpdCadAsyncScanController<AntPlusBikeCadencePcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AntPlusBikeSpdCadCommonPcc.IBikeSpdCadAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
void |
subscribeCalculatedCadenceEvent(AntPlusBikeCadencePcc.ICalculatedCadenceReceiver CalculatedCadenceReceiver)
Subscribe to receive CalculatedCadence events, which contain:
The cadence calculated from the raw values in the sensor broadcast.
|
boolean |
subscribeMotionAndCadenceDataEvent(AntPlusBikeCadencePcc.IMotionAndCadenceDataReceiver motionAndCadenceDataReceiver)
Subscribe to receive MotionAndCadenceData events, which contain:
A 'stop indicator flag' to indicate whether the cadence sensor has detected that the bike has stopped.
|
void |
subscribeRawCadenceDataEvent(AntPlusBikeCadencePcc.IRawCadenceDataReceiver RawCadenceDataReceiver)
Subscribe to receive RawCadenceData events, which contain:
The raw event timestamp and revolution count accumulation.
|
isSpeedAndCadenceCombinedSensor, subscribeBatteryStatusEvent
subscribeCumulativeOperatingTimeEvent, subscribeManufacturerAndSerialEvent, subscribeRssiEvent, subscribeVersionAndModelEvent, supportsRssi
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusBikeCadencePcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
userActivity
- The current foreground activity. Used to display search progress and results.bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.skipPreferredSearch
- True = Don't automatically connect to user's preferred device, but always go to search for other devices.searchProximityThreshold
- It is recommended to always use -1 to use the user's default settings unless your application
has a specific reason to do otherwise. This value represents the signal strength 'proximity' requirement on finding matches
during searching, if a device does not meet the requirements it will not show up in the search at all.
The value is a generic signal strength threshold from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away).
0 = don't use proximity search and -1 = use plugin user-specified default.resultReceiver
- The receiver to receive the results of the request. Possible returns include:
stateReceiver
- The receiver to receive the state updates of the accessed device, assuming the request is successful.
This receiver will receive notifications of all state changes to the device that occur subsequent
to the initial state returned in the result receiver.public static PccReleaseHandle<AntPlusBikeCadencePcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
#requestAccess(Activity, Context, boolean, int, IPluginAccessResultReceiver, IDeviceStateChangeReceiver)
with skipPreferrredSearch=false and searchProximityThreshold=-1(user default).
userActivity
- The current foreground activity. Used to display search progress and results.bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.resultReceiver
- The receiver to receive the results of the request. Possible returns include:
stateReceiver
- The receiver to receive the state updates of the accessed device, assuming the request is successful.
This receiver will receive notifications of all state changes to the device that occur subsequent
to the initial state returned in the result receiver.public static PccReleaseHandle<AntPlusBikeCadencePcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, boolean isSpdCadCombinedSensor, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.antDeviceNumber
- DeviceNumber to attempt to connect to. A deviceNumber of 0 indicates a desire to connect to first available device.searchProximityThreshold
- This value represents the signal strength 'proximity' requirement on finding matches
during searching, if a device does not meet the requirements it will not show up in the search at all.
The value is a generic signal strength threshold from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away).
0 = don't use proximity search.isSpdCadCombinedSensor
- Set to true if the deviceNumber specified belongs to a combined speed and cadence sensor.
For a wildcard search (when device ID is 0), true indicates to search for only a combined speed and cadence sensor,
false indicates to search for any type cadence sensor.
Note: You can determine if a sensor is a combined one or not by calling AntPlusBikeSpdCadCommonPcc.isSpeedAndCadenceCombinedSensor()
.
You could then choose to connect to the additional sensor output of speed and distance using AntPlusBikeSpeedDistancePcc#requestAccess(Context, int, int, boolean, IPluginAccessResultReceiver, IDeviceStateChangeReceiver)
.resultReceiver
- The receiver to receive the results of the request. Possible returns include:
stateReceiver
- The receiver to receive the state updates of the accessed device, assuming the request is successful.
This receiver will receive notifications of all state changes to the device that occur subsequent
to the initial state returned in the result receiver.public static AntPlusBikeSpdCadCommonPcc.BikeSpdCadAsyncScanController<AntPlusBikeCadencePcc> requestAsyncScanController(Context bindToContext, int searchProximityThreshold, AntPlusBikeSpdCadCommonPcc.IBikeSpdCadAsyncScanResultReceiver scanResultReceiver)
AsyncScanController
.bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.searchProximityThreshold
- This value represents the signal strength 'proximity' requirement on finding matches
during searching, if a device does not meet the requirements it will not show up in the search at all.
The value is a generic signal strength rating from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away).
0 = don't use proximity search.scanResultReceiver
- The receiver to receive the info for available devices and status of the scan.AsyncScanController
.public void subscribeCalculatedCadenceEvent(AntPlusBikeCadencePcc.ICalculatedCadenceReceiver CalculatedCadenceReceiver)
CalculatedCadenceReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeRawCadenceDataEvent(AntPlusBikeCadencePcc.IRawCadenceDataReceiver RawCadenceDataReceiver)
RawCadenceDataReceiver
- receiver to receive events (or null to unsubscribe from this event).public boolean subscribeMotionAndCadenceDataEvent(AntPlusBikeCadencePcc.IMotionAndCadenceDataReceiver motionAndCadenceDataReceiver)
motionAndCadenceDataReceiver
- receiver to receive events (or null to unsubscribe from this event).Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.