class SpeedAndCadenceControlPointDataCallback extends ProfileReadResponse implements SpeedAndCadenceControlPointCallback {

	@Override
	public void onDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) {
		super.onDataReceived(device, data);

		if (data.size() < 3) {
			onInvalidDataReceived(device, data);
			return;
		}

		final int responseCode = data.getIntValue(Data.FORMAT_UINT8, 0);
		final int requestCode = data.getIntValue(Data.FORMAT_UINT8, 1);
		final int status = data.getIntValue(Data.FORMAT_UINT8, 2);

		if (responseCode != SC_OP_CODE_RESPONSE_CODE) {
			onInvalidDataReceived(device, data);
			return;
		}

		if (status != SC_RESPONSE_SUCCESS) {
			onSCOperationError(device, requestCode, status);
			return;
		}

		switch (requestCode) {
			case SC_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS: {
				final int size = data.size() - 3;
				final int[] locations = new int[size];
				for (int i = 0; i < size; ++i) {
					locations[i] = data.getIntValue(Data.FORMAT_UINT8, 3 + i);
				}
				onSupportedSensorLocationsReceived(device, locations);
				break;
			}
			default: {
				onSCOperationCompleted(device, requestCode);
				break;
			}
		}
	}

	public  SpeedAndCadenceControlPointDataCallback();
	protected  SpeedAndCadenceControlPointDataCallback(final Parcel in);

}