Ejemplo n.º 1
0
  public JAntStatus ANTTxMessage(byte[] message) {
    if (debug) Log.d(TAG, "ANTTxMessage: entered");
    JAntStatus jAntStatus;

    try {
      int AntStatus = nativeJAnt_TxMessage(message);
      jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
      if (debug) Log.d(TAG, "After nativeJAnt_ANTTxMessage, status = " + jAntStatus.toString());
    } catch (Exception e) {
      Log.e(TAG, "ANTTxMessage: exception during nativeJAnt_ANTTxMessage (" + e.toString() + ")");
      jAntStatus = JAntStatus.FAILED;
    }

    if (debug) Log.d(TAG, "ANTTxMessage: exiting");
    return jAntStatus;
  }
Ejemplo n.º 2
0
  public JAntStatus enable() {
    if (debug) Log.d(TAG, "enable: entered");

    JAntStatus jAntStatus;

    try {
      int AntStatus = nativeJAnt_Enable();
      jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
      if (debug) Log.d(TAG, "After nativeJAnt_Enable, status = " + jAntStatus.toString());
    } catch (Exception e) {
      Log.e(TAG, "enable: exception during nativeJAnt_enable (" + e.toString() + ")");
      jAntStatus = JAntStatus.FAILED;
    }

    if (debug) Log.d(TAG, "enable: exiting");

    return jAntStatus;
  }
Ejemplo n.º 3
0
  public JAntStatus hardReset() {
    if (debug) Log.d(TAG, "hardReset: entered");

    JAntStatus jAntStatus;

    try {
      int status = nativeJAnt_HardReset();
      jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, status);
      if (debug) Log.d(TAG, "After nativeJAnt_HardReset, status = " + jAntStatus.toString());
    } catch (Exception e) {
      Log.e(TAG, "hardReset: exception during nativeJAnt_HardReset, (" + e.toString() + ")");
      jAntStatus = JAntStatus.FAILED;
    }

    if (debug) Log.d(TAG, "hardReset:: exiting");

    return jAntStatus;
  }