// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java
// public interface MutableDouble {
// 	double getValue();
// 	void setValue(double v);
// 	
// 	/**
// 	 * Returns a proxy MutableDouble that is a two-way calibrated representation of this value.
// 	 */
// 	default MutableDouble calibrated(DoubleConverter calibration) {
// 		return new CalibratedMutableDouble(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/AnalogIO.java
// public interface AnalogIO extends AnalogIOFeatures<MutableDouble> {
// 	
// 	/**
// 	 * Returns a proxy AnalogIO that is two-way calibrated representation of this instance.
// 	 */
// 	default AnalogIO calibrated(AnalogIOCalibration calibration) {
// 		return new CalibratedAnalogIO(this, calibration);
// 	}
// 
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/AnalogIOController.java
// public interface AnalogIOController<C> {
// 	MutableDouble value(C channel);
// }


import com.iamcontent.core.math.MutableDouble;
import com.iamcontent.device.io.analog.AnalogIO;
import com.iamcontent.device.io.analog.AnalogIOController;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU General Public License as published by the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.device.io.analog.impl;


/**
 * An {@link AnalogIO} that directly delegates its operations to an {@link AnalogIOController} without altering the
 * results of the operations.
 * @author Greg Elderfield
 * 
 * @param <C> The type used to identify the channel of an {@link AnalogIO}. 
 */
public class RawAnalogIO<C> implements AnalogIO {
	
	protected final AnalogIOController<C> controller;
	protected final C channelId;
	

// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java
// public interface MutableDouble {
// 	double getValue();
// 	void setValue(double v);
// 	
// 	/**
// 	 * Returns a proxy MutableDouble that is a two-way calibrated representation of this value.
// 	 */
// 	default MutableDouble calibrated(DoubleConverter calibration) {
// 		return new CalibratedMutableDouble(this, calibration);
// 	}
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/AnalogIO.java
// public interface AnalogIO extends AnalogIOFeatures<MutableDouble> {
// 	
// 	/**
// 	 * Returns a proxy AnalogIO that is two-way calibrated representation of this instance.
// 	 */
// 	default AnalogIO calibrated(AnalogIOCalibration calibration) {
// 		return new CalibratedAnalogIO(this, calibration);
// 	}
// 
// }
// 
// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/AnalogIOController.java
// public interface AnalogIOController<C> {
// 	MutableDouble value(C channel);
// }


// Path: public-java/io/iamcontent-io-channels/src/main/java/com/iamcontent/device/io/analog/impl/RawAnalogIO.java
import com.iamcontent.core.math.MutableDouble;
import com.iamcontent.device.io.analog.AnalogIO;
import com.iamcontent.device.io.analog.AnalogIOController;

/**
  IAmContent Public Libraries.
  Copyright (C) 2015-2021 Greg Elderfield
  @author Greg Elderfield, support@jarchitect.co.uk
 
  This program is free software; you can redistribute it and/or modify it under the terms of the
  GNU General Public License as published by the Free Software Foundation; either version 2 of 
  the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this program;
  if not, write to the Free Software Foundation, Inc., 
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package com.iamcontent.device.io.analog.impl;


/**
 * An {@link AnalogIO} that directly delegates its operations to an {@link AnalogIOController} without altering the
 * results of the operations.
 * @author Greg Elderfield
 * 
 * @param <C> The type used to identify the channel of an {@link AnalogIO}. 
 */
public class RawAnalogIO<C> implements AnalogIO {
	
	protected final AnalogIOController<C> controller;
	protected final C channelId;
	

	public RawAnalogIO(AnalogIOController<C> controller, C channelId) {
