Class AntPlusCommonPcc

java.lang.Object
com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
com.dsi.ant.plugins.antplus.pccbase.AntPlusCommonPcc
Direct Known Subclasses:
AntPlusBaseRemoteControlPcc, AntPlusBikePowerPcc, AntPlusEnvironmentPcc, AntPlusFitnessEquipmentPcc, AntPlusStrideSdmPcc, AntPlusWeightScalePcc

public abstract class AntPlusCommonPcc extends AntPluginPcc
Adds common pages support to a PCC
  • Field Details

  • Constructor Details

    • AntPlusCommonPcc

      public AntPlusCommonPcc()
  • Method Details

    • handlePluginEvent

      protected void handlePluginEvent(android.os.Message eventMsg)
      Specified by:
      handlePluginEvent in class AntPluginPcc
    • subscribeManufacturerIdentificationEvent

      public void subscribeManufacturerIdentificationEvent(AntPlusCommonPcc.IManufacturerIdentificationReceiver ManufacturerIdentificationReceiver)
      Subscribe to receive ManufacturerIdentification events, which contain: Information about the manufacturer and hardware. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      ManufacturerIdentificationReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeProductInformationEvent

      public void subscribeProductInformationEvent(AntPlusCommonPcc.IProductInformationReceiver ProductInformationReceiver)
      Subscribe to receive ProductInformation events, which contain: Information about the product and software. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      ProductInformationReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeBatteryStatusEvent

      public void subscribeBatteryStatusEvent(AntPlusCommonPcc.IBatteryStatusReceiver BatteryStatusReceiver)
      Subscribe to receive BatteryStatus events, which contain: Information about the battery status and operating time. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      BatteryStatusReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeManufacturerSpecificDataEvent

      public boolean subscribeManufacturerSpecificDataEvent(AntPlusCommonPcc.IManufacturerSpecificDataReceiver ManufacturerSpecificDataReceiver)
      Subscribe to receive ManufacturerSpecificData events, which contain: Manufacturer specific data. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      ManufacturerSpecificDataReceiver - receiver to receive events (or null to unsubscribe from this event).
      Returns:
      true if successful
      Since:
      2.1.5; requires Plugin Service 2.2.6+
    • subscribeRssiEvent

      public boolean subscribeRssiEvent(AntPlusCommonPcc.IRssiReceiver RssiReceiver)
      Subscribe to receive Rssi events, which contain rssi signal strength data. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      RssiReceiver - receiver to receive events (or null to unsubscribe from this event).
      Returns:
      true if successful
      Since:
      3.2.3; requires Plugin Service 3.2.3+
    • requestCommonDataPage

      public boolean requestCommonDataPage(AntPlusCommonPcc.CommonDataPage commonDataPage, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to send the requested AntPlusCommonPcc.CommonDataPage. This command is optional and may not be supported by all devices. If it is unsupported the device will not respond.
      Parameters:
      commonDataPage - The AntPlusCommonPcc.CommonDataPage to be requested from the device.
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestManufacturerSpecificDataPage

      public boolean requestManufacturerSpecificDataPage(int manufacturerSpecificDataPage, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to send the requested data page. This command is optional and may not be supported by all devices. If it is unsupported the device will not respond.
      Parameters:
      manufacturerSpecificDataPage - The manufacturer specific data page to be requested from the device. The manufacturer specific data page numbers range from 240-255.
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • supportsRssi

      public boolean supportsRssi()
    • sendManufacturerSpecificDataPage

      public boolean sendManufacturerSpecificDataPage(int manufacturerSpecificDataPage, byte[] manufacturerSpecificDataPagePayload, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a manufacturer specific data page to the device. This command is optional and is specific to the manufacturer of the device. Please contact the manufacturer for more information.
      Parameters:
      manufacturerSpecificDataPage - The manufacturer specific data page to be sent to the device. The manufacturer specific data page numbers range from 240-255.
      manufacturerSpecificDataPagePayload - The 7-byte minimum data payload to be sent to the device.
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • sendRequestCommand

      protected boolean sendRequestCommand(String cmdName, int whatCmd, android.os.Bundle params, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, Integer requiredServiceVersion)
    • sendRequestCommand

      protected boolean sendRequestCommand(String cmdName, int whatCmd, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
    • sendRequestCommand

      protected boolean sendRequestCommand(String cmdName, int whatCmd, android.os.Bundle params, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
    • sendRequestCommand

      protected boolean sendRequestCommand(String cmdName, int whatCmd, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, Integer requiredServiceVersion)