BowlerKernel
|
Static Public Attributes | |
static final int | ADCRESOLUTION = 1024 |
static final int | ADCVOLTAGE = 5 |
Private Member Functions | |
void | fireValueChanged (double value) |
Static Private Member Functions | |
static double | scaleValue (int value) |
Private Attributes | |
ArrayList< IAnalogInputListener > | listeners = new ArrayList<IAnalogInputListener>() |
The Class AnalogInputChannel.
Definition at line 30 of file AnalogInputChannel.java.
com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel | ( | int | channel | ) |
Constructor. Creates an analog input channel that is syncronous only by default.
channel | - the channel object requested from the DyIO |
Definition at line 47 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), and com.neuronrobotics.sdk.common.DeviceManager.getSpecificDevice().
com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel | ( | DyIO | dyio, |
int | channel | ||
) |
Constructor. Creates an analog input channel that is syncronous only by default.
dyio | the dyio |
channel | - the channel object requested from the DyIO |
Definition at line 58 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, and com.neuronrobotics.sdk.dyio.DyIO.getChannel().
com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel | ( | DyIOChannel | channel | ) |
Constructor. Creates an analog input channel that is syncronous only by default.
channel | - the channel object requested from the DyIO |
Definition at line 68 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel.
com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel | ( | DyIOChannel | channel, |
boolean | async | ||
) |
Constructor. Creates an analog input channel with the given ability for asyncronous communications.
channel | - the channel object requested from the DyIO |
async | - boolean to determine if this is an async analog channel |
Definition at line 79 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.ANALOG_IN, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().
void com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.addAnalogInputListener | ( | IAnalogInputListener | l | ) |
addAnalogInputListener.
l | add the specified listener |
Definition at line 144 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.addAnalogInputListener(), com.neuronrobotics.sdk.addons.kinematics.AnalogPrismaticLink.setAnalogChannel(), and com.neuronrobotics.sdk.addons.kinematics.AnalogRotoryLink.setAnalogChannel().
|
private |
Fire value changed.
value | the value |
Definition at line 157 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.onChannelEvent().
double com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getScaledValue | ( | ) |
Gets the value of the channel as a percentage.
Definition at line 95 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getValue(), and com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.scaleValue().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getVoltage().
double com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getVoltage | ( | ) |
Scales the value to the voltage read on the channel (between 0v and 5v).
Definition at line 104 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.ADCVOLTAGE, and com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getScaledValue().
boolean com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.hasAsync | ( | ) |
This method is to check if this peripheral is capable to be set as up as asynchronous.
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 189 of file AnalogInputChannel.java.
void com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.onChannelEvent | ( | DyIOChannelEvent | e | ) |
On channel event.
e | the e |
Implements com.neuronrobotics.sdk.dyio.IChannelEventListener.
Definition at line 181 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.fireValueChanged(), and com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getUnsignedValue().
void com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.removeAllAnalogInputListeners | ( | ) |
removeAllAnalogInputListeners clears the list of async packet listeners.
Definition at line 120 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.initInput().
void com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.removeAnalogInputListener | ( | IAnalogInputListener | l | ) |
removeAnalogInputListener.
l | remove the specified listener |
Definition at line 130 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.pauseRecording(), and com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.stopTest().
|
staticprivate |
Scale value.
value | the value |
Definition at line 173 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.ADCRESOLUTION.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getScaledValue().
void com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.setAsync | ( | boolean | isAsync | ) |
Set the channel to be asyncronous or syncronous.
isAsync | the new async |
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 113 of file AnalogInputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannelMode.ANALOG_IN, and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().
Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.addAnalogInputListener().
|
static |
The Constant ADCRESOLUTION.
Definition at line 33 of file AnalogInputChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.scaleValue().
|
static |
The Constant ADCVOLTAGE.
Definition at line 36 of file AnalogInputChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getVoltage().
|
private |
The listeners.
Definition at line 39 of file AnalogInputChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.addAnalogInputListener(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.fireValueChanged(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.removeAllAnalogInputListeners(), and com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.removeAnalogInputListener().