BowlerKernel
|
Protected Member Functions | |
void | fireOnCounterOutput (int value) |
Private Member Functions | |
void | init (DyIOChannel channel, boolean isAsync) |
boolean | validate () |
Private Attributes | |
ArrayList< ICounterOutputListener > | listeners = new ArrayList<ICounterOutputListener>() |
The Class CounterOutputChannel.
Definition at line 34 of file CounterOutputChannel.java.
com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel | ( | int | channel | ) |
Constructor. Creates an counter input input channel that is syncronous only by default.
channel | - the channel object requested from the DyIO |
Definition at line 45 of file CounterOutputChannel.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.CounterOutputChannel.CounterOutputChannel | ( | DyIO | dyio, |
int | channel | ||
) |
Constructor. Creates an counter input input channel that is syncronous only by default.
dyio | the dyio |
channel | - the channel object requested from the DyIO |
Definition at line 56 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, and com.neuronrobotics.sdk.dyio.DyIO.getChannel().
com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel | ( | DyIOChannel | channel | ) |
Constructor. Creates an counter input input channel that is syncronous only by default.
channel | - the channel object requested from the DyIO |
Definition at line 66 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel.
com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel | ( | DyIOChannel | channel, |
boolean | isAsync | ||
) |
Instantiates a new counter output channel.
channel | the channel |
isAsync | the is async |
Definition at line 76 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_OUT_INT, and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.init().
void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.addCounterOutputListener | ( | ICounterOutputListener | l | ) |
addCounterOutputListener.
l | add this listener to this channels event listeners |
Definition at line 132 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.listeners.
|
protected |
Fire on counter output.
value | the value |
Definition at line 166 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.onChannelEvent().
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.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 196 of file CounterOutputChannel.java.
|
private |
Inits the.
channel | the channel |
isAsync | the is async |
Definition at line 87 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_OUT_INT, com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel().
void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.onChannelEvent | ( | DyIOChannelEvent | e | ) |
onChannelEvent Send the counter value to all the listening objects.
e | the e |
Implements com.neuronrobotics.sdk.dyio.IChannelEventListener.
Definition at line 189 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.fireOnCounterOutput(), and com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getSignedValue().
void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeAllCounterOutputListeners | ( | ) |
Removes the all counter output listeners.
Definition at line 157 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.listeners.
void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeCounterOutputListener | ( | ICounterOutputListener | l | ) |
removeCounterOutputListener.
l | remove this listener to this channels event listeners |
Definition at line 146 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.listeners.
void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.setAsync | ( | boolean | isAsync | ) |
Sets the async.
isAsync | the new async |
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 205 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_OUT_INT, and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition | ( | int | pos | ) |
Set the Counter to a given position.
pos | the pos |
Definition at line 102 of file CounterOutputChannel.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition | ( | int | pos, |
float | time | ||
) |
Steps the Counter though a transformation over a given amount of time.
pos | - the end position |
time | - the number of seconds for the transition to take place |
Definition at line 113 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue(), and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate().
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.setValue | ( | int | value | ) |
This method sets the value of the output of the giver peripheral.
value | Sets this value to the channel |
InvalidResponseException | the invalid response exception |
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 176 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.common.ByteList.addAs32(), and com.neuronrobotics.sdk.common.Log.info().
|
private |
Validate.
Definition at line 214 of file CounterOutputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_OUT_INT, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getMode(), and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.isEnabled().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition().
|
private |
The listeners.
Definition at line 37 of file CounterOutputChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.addCounterOutputListener(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.fireOnCounterOutput(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeAllCounterOutputListeners(), and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeCounterOutputListener().