public class AntPlusBikeSpeedDistancePcc extends AntPlusBikeSpdCadCommonPcc
Modifier and Type | Class and Description |
---|---|
static class |
AntPlusBikeSpeedDistancePcc.CalculatedAccumulatedDistanceReceiver
Receiver for the CalculatedAccumulatedDistance event, which is:
The accumulated distance calculated from the raw values in the sensor broadcast since the sensor was first connected.
|
static class |
AntPlusBikeSpeedDistancePcc.CalculatedSpeedReceiver
Receiver for the CalculatedSpeed event, which is:
The speed calculated from the raw values in the sensor broadcast.
|
static interface |
AntPlusBikeSpeedDistancePcc.IMotionAndSpeedDataReceiver
Receiver for the MotionAndSpeedData event, which is:
A 'stop indicator flag' to indicate whether the speed sensor has detected that the bike has stopped.
|
class |
AntPlusBikeSpeedDistancePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static interface |
AntPlusBikeSpeedDistancePcc.IRawSpeedAndDistanceDataReceiver
Receiver for the RawSpeedAndDistanceData 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<AntPlusBikeSpeedDistancePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBikeSpeedDistancePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBikeSpeedDistancePcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
boolean isSpdCadCombinedSensor,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static AntPlusBikeSpdCadCommonPcc.BikeSpdCadAsyncScanController<AntPlusBikeSpeedDistancePcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AntPlusBikeSpdCadCommonPcc.IBikeSpdCadAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
void |
subscribeCalculatedAccumulatedDistanceEvent(AntPlusBikeSpeedDistancePcc.CalculatedAccumulatedDistanceReceiver CalculatedAccumulatedDistanceReceiver)
Subscribe to receive CalculatedAccumulatedDistance events, which contain:
The accumulated distance calculated from the raw values in the sensor broadcast since the sensor was first connected.
|
void |
subscribeCalculatedSpeedEvent(AntPlusBikeSpeedDistancePcc.CalculatedSpeedReceiver CalculatedSpeedReceiver)
Subscribe to receive CalculatedSpeed events, which contain:
The speed calculated from the raw values in the sensor broadcast.
|
boolean |
subscribeMotionAndSpeedDataEvent(AntPlusBikeSpeedDistancePcc.IMotionAndSpeedDataReceiver motionAndSpeedDataReceiver)
Subscribe to receive MotionAndSpeedData events, which contain:
A 'stop indicator flag' to indicate whether the speed sensor has detected that the bike has stopped.
|
void |
subscribeRawSpeedAndDistanceDataEvent(AntPlusBikeSpeedDistancePcc.IRawSpeedAndDistanceDataReceiver RawSpeedAndDistanceDataReceiver)
Subscribe to receive RawSpeedAndDistanceData 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<AntPlusBikeSpeedDistancePcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> 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<AntPlusBikeSpeedDistancePcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> 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<AntPlusBikeSpeedDistancePcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, boolean isSpdCadCombinedSensor, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> 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.
This parameter is ignored for a wildcard search (when device ID is 0).
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 cadence using AntPlusBikeCadencePcc#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<AntPlusBikeSpeedDistancePcc> 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 subscribeCalculatedSpeedEvent(AntPlusBikeSpeedDistancePcc.CalculatedSpeedReceiver CalculatedSpeedReceiver)
CalculatedSpeedReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeCalculatedAccumulatedDistanceEvent(AntPlusBikeSpeedDistancePcc.CalculatedAccumulatedDistanceReceiver CalculatedAccumulatedDistanceReceiver)
CalculatedAccumulatedDistanceReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeRawSpeedAndDistanceDataEvent(AntPlusBikeSpeedDistancePcc.IRawSpeedAndDistanceDataReceiver RawSpeedAndDistanceDataReceiver)
RawSpeedAndDistanceDataReceiver
- receiver to receive events (or null to unsubscribe from this event).public boolean subscribeMotionAndSpeedDataEvent(AntPlusBikeSpeedDistancePcc.IMotionAndSpeedDataReceiver motionAndSpeedDataReceiver)
motionAndSpeedDataReceiver
- receiver to receive events (or null to unsubscribe from this event).Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.