BowlerKernel
|
Protected Member Functions | |
void | fireOnCounterInput (int value) |
Private Member Functions | |
void | init (DyIOChannel channel, boolean isAsync) |
Private Attributes | |
ArrayList< ICounterInputListener > | listeners = new ArrayList<ICounterInputListener>() |
The Class CounterInputChannel.
Definition at line 31 of file CounterInputChannel.java.
com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel | ( | 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 42 of file CounterInputChannel.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.CounterInputChannel.CounterInputChannel | ( | 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 53 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, and com.neuronrobotics.sdk.dyio.DyIO.getChannel().
com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel | ( | 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 63 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel.
com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel | ( | DyIOChannel | channel, |
boolean | isAsync | ||
) |
Instantiates a new counter input channel.
channel | the channel |
isAsync | the is async |
Definition at line 73 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_IN_INT, and com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init().
void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.addCounterInputListener | ( | ICounterInputListener | l | ) |
addCounterInputListener.
l | add this listener to this channels event listeners |
Definition at line 99 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.
|
protected |
Fire on counter input.
value | the value |
Definition at line 133 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.onChannelEvent().
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.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 172 of file CounterInputChannel.java.
|
private |
Inits the.
channel | the channel |
isAsync | the is async |
Definition at line 84 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_IN_INT, com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel().
void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.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 145 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.fireOnCounterInput(), and com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getSignedValue().
void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeAllCounterInputListeners | ( | ) |
Removes the all counter input listeners.
Definition at line 124 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.
void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeCounterInputListener | ( | ICounterInputListener | l | ) |
removeCounterInputListener.
l | remove this listener to this channels event listeners |
Definition at line 113 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.
void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.setAsync | ( | boolean | isAsync | ) |
Sets the async.
isAsync | the new async |
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 154 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_IN_INT, and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().
boolean com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.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 162 of file CounterInputChannel.java.
References com.neuronrobotics.sdk.common.ByteList.addAs32().
|
private |
The listeners.
Definition at line 34 of file CounterInputChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.addCounterInputListener(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.fireOnCounterInput(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeAllCounterInputListeners(), and com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeCounterInputListener().