BowlerKernel
|
Protected Member Functions | |
void | fireChannelEvent (DyIOChannelEvent e) |
void | fireModeChangeEvent (DyIOChannelMode e) |
int | getPreviousValue () |
Protected Attributes | |
int | cachedValue = 0 |
Private Member Functions | |
void | setPreviousValue (int previousValue) |
void | setDevice (DyIO device) |
boolean | isDefaultAsync (DyIOChannelMode m) |
void | resyncIfNotSynced () |
boolean | isOutputMode (DyIOChannelMode m) |
Private Attributes | |
int | MAXATTEMPTS = 3 |
float | cachedTime =0 |
DyIO | device |
int | number |
boolean | editable |
DyIOChannelMode | current =null |
boolean | isAsync =true |
ArrayList< IChannelEventListener > | listeners = new ArrayList<IChannelEventListener>() |
ArrayList< IDyIOChannelModeChangeListener > | modeListeners = new ArrayList< IDyIOChannelModeChangeListener>() |
boolean | cachedMode =false |
DyIOAbstractPeripheral | dap =null |
int | previousValue = 1 |
boolean | haveSetMode = false |
boolean | settingMode =false |
ArrayList< DyIOChannelMode > | myModes |
boolean | synced = false |
A DyIO channel. This represents a single DyIO pchannel.
Definition at line 39 of file DyIOChannel.java.
com.neuronrobotics.sdk.dyio.DyIOChannel.DyIOChannel | ( | DyIO | dyio, |
int | channel, | ||
DyIOChannelMode | mode, | ||
boolean | isEditable | ||
) |
Construct a channel object.
dyio | The DyIO that the channel belongs on |
channel | The Channel on the DyIO that this object corresponds to. |
mode | The Type of channel. |
isEditable | Lock the channel parameters after creation. |
Definition at line 92 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
void com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener | ( | IChannelEventListener | l | ) |
Add an object that wishes to receive channel updates.
l | The object that wishes to receive updates. |
Definition at line 208 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.listeners.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.DigitalInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.init(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.SPIChannel(), and com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTRxChannel.UARTRxChannel().
void com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelModeChangeListener | ( | IDyIOChannelModeChangeListener | l | ) |
Add an object that wishes to receive channel updates.
l | The object that wishes to receive updates. |
Definition at line 174 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode | ( | DyIOChannelMode | m | ) |
This method verifies that this channel can be set to the mode given.
m | the mode that is desired |
Definition at line 275 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample | ( | ) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value is sampled on a real-time This sets the sample time to 100 ms clock and sent as async regardless of value change.
Definition at line 711 of file DyIOChannel.java.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample | ( | int | msTime | ) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value is sampled on a real-time clock and sent as async regardless of value change.
msTime | the sample time in MiliSeconds |
Definition at line 757 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand | ( | int | deadbandSize | ) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are outside a deadband This sets the sample time to 100 ms.
deadbandSize | the size in sensor units of the deadband |
Definition at line 688 of file DyIOChannel.java.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand | ( | int | msTime, |
int | deadbandSize | ||
) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are outside a deadband.
msTime | the sample time in MiliSeconds |
deadbandSize | the size in sensor units of the deadband |
Definition at line 732 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual | ( | ) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are not equal. This sets the sample time to 100 ms
Definition at line 677 of file DyIOChannel.java.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual | ( | int | msTime | ) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are not equal.
msTime | the sample time in MiliSeconds |
Definition at line 720 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold | ( | int | msTime, |
int | threshholdValue, | ||
AsyncThreshholdEdgeType | edgeType | ||
) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value crosses a threshhold.
msTime | the sample time in MiliSeconds |
threshholdValue | a value setpoint that triggers an even when it is crossed |
edgeType | Rising, Falling, or both |
Definition at line 745 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold | ( | int | threshholdValue, |
AsyncThreshholdEdgeType | edgeType | ||
) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value crosses a threshhold This sets the sample time to 100 ms.
threshholdValue | a value setpoint that triggers an even when it is crossed |
edgeType | Rising, Falling, or both |
Definition at line 700 of file DyIOChannel.java.
|
protected |
Kicks off an event listener transaction for channel events.
e | the event to pass to all listeners |
Definition at line 352 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getPreviousValue(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.listeners, com.neuronrobotics.sdk.dyio.DyIOChannel.parseDyIOChannelEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setPreviousValue().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), and com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse().
|
protected |
Kicks off an event listener transaction for channel mode change events.
e | the event to pass to all listeners |
Definition at line 371 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.DIGITAL_IN, com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners, and com.neuronrobotics.sdk.dyio.DyIOChannel.number.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.flush | ( | ) |
This method performs a single channel flush. This method will take the cached value, or the current value if none were cached, and send it to the device.
Definition at line 578 of file DyIOChannel.java.
References com.neuronrobotics.sdk.common.ByteList.add(), com.neuronrobotics.sdk.common.ByteList.addAs16(), com.neuronrobotics.sdk.common.ByteList.addAs32(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedTime(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedValue(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.common.BowlerMethod.POST, com.neuronrobotics.sdk.dyio.DyIO.send(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
Collection<DyIOChannelMode> com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes | ( | ) |
Gets the available modes.
Definition at line 310 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.device, com.neuronrobotics.sdk.dyio.DyIO.getAvailibleChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getBankAState(), com.neuronrobotics.sdk.dyio.DyIO.getBankBState(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.myModes, com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.dyio.DyIOPowerState.REGULATED, and com.neuronrobotics.sdk.dyio.DyIOChannelMode.SERVO_OUT.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedMode | ( | ) |
This method checks if this channel is in cache/flush mode.
Definition at line 640 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode.
float com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedTime | ( | ) |
Gets the current cached time.
Definition at line 792 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedTime.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush().
int com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedValue | ( | ) |
Provides access to the current cache value.
Definition at line 633 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedValue.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush().
DyIOChannel com.neuronrobotics.sdk.dyio.DyIOChannel.getChannel | ( | ) |
This method returns the channel object when requested.
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 416 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel().
int com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber | ( | ) |
Get the channel's number.
Definition at line 125 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.number.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getAnalogInputChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getInputChannelNumber(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.initInput(), com.neuronrobotics.application.xmpp.DyIOConversation.ChatAsyncListener.onChannelEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.toString().
DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode | ( | ) |
Gets the current mode.
Definition at line 773 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.current.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
DyIOAbstractPeripheral com.neuronrobotics.sdk.dyio.DyIOChannel.getDap | ( | ) |
This method provides access to the abstract perpheral that will be using this channel object.
Definition at line 667 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.dap.
DyIO com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice | ( | ) |
Returns the parent device that is providing the channels.
Definition at line 249 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.device.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.disablePowerOverride(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.enablePowerOverride(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.initInput(), com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.send(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.setValue(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().
DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getMode | ( | ) |
Gets the channel's current mode.
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 424 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.hasAsync(), com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.setAsync(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.setValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.toString().
DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getMode | ( | boolean | resync | ) |
Gets the mode of the channel. If resync is true, then the channel will do a live query to the device for its current mode and cache it to the channel for future use.
Identical to calling resync(false) before getMode()
resync | the resync |
Definition at line 238 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.resync().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.DyIO.getMode(), com.neuronrobotics.sdk.dyio.DyIOInputStream.read(), and com.neuronrobotics.sdk.dyio.DyIOOutputStream.write().
|
protected |
Gets the previous value.
Definition at line 822 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.previousValue.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getValue().
int com.neuronrobotics.sdk.dyio.DyIOChannel.getValue | ( | ) |
Get the current value of a channel.
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 432 of file DyIOChannel.java.
References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getPreviousValue(), com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.common.ByteList.pop(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setPreviousValue().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getValue().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.hasAsync | ( | ) |
Checks the current mode of this channel and checks if it is possible for it to have async.
Definition at line 287 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().
|
private |
Checks if is default async.
m | the m |
Definition at line 860 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable | ( | ) |
Can the parameters of this channel be edited?.
Definition at line 134 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.editable.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.DyIOChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
|
private |
Checks if is output mode.
m | the m |
Definition at line 920 of file DyIOChannel.java.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel | ( | ) |
Checks if is stream channel.
Definition at line 831 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.dyio.DyIOChannel.parseDyIOChannelEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamtMode | ( | DyIOChannelMode | m | ) |
Checks if is streamt mode.
m | the m |
Definition at line 883 of file DyIOChannel.java.
int com.neuronrobotics.sdk.dyio.DyIOChannel.parseDyIOChannelEvent | ( | DyIOChannelEvent | e | ) |
This method gets the value represented by the date portion of a DyIOChannelEvent.
e | the event to parse |
Definition at line 341 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent().
void com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelEventListeners | ( | ) |
Clear list of objects that have subscribed to channel updates.
Definition at line 184 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.listeners.
void com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelModeChangeListener | ( | ) |
Clear list of objects that have subscribed to channel updates.
Definition at line 150 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.
void com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelEventListener | ( | IChannelEventListener | l | ) |
Remove a particular subscription.
l | The object that has subscribed to updates |
Definition at line 194 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.listeners.
void com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelModeChangeListener | ( | IDyIOChannelModeChangeListener | l | ) |
Remove a particular subscription.
l | The object that has subscribed to updates |
Definition at line 160 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.
void com.neuronrobotics.sdk.dyio.DyIOChannel.resync | ( | boolean | all | ) |
Live query the device for its mode and cache it.
all | - should all channels be refreshed. |
Definition at line 258 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.dyio.DyIO.resync(), and com.neuronrobotics.sdk.dyio.DyIO.send().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.init(), com.neuronrobotics.sdk.dyio.DyIO.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.resyncIfNotSynced().
|
private |
Resync if not synced.
Definition at line 870 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.synced.
void com.neuronrobotics.sdk.dyio.DyIOChannel.send | ( | BowlerAbstractCommand | command | ) |
Send a command to the Channel's DyIO.
command | The command to send. |
Definition at line 142 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIO.send().
void com.neuronrobotics.sdk.dyio.DyIOChannel.setAsync | ( | boolean | b | ) |
Sets the asynchronus mode for this channel.
b | the new async |
Definition at line 801 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedMode | ( | boolean | mode | ) |
This method enables/disables cache/flush mode for this channel.
mode | the new cached mode |
Definition at line 649 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel().
void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime | ( | float | cachedTime | ) |
Sets the time to store for use by the flush. THis will only be used when flush is called from the channel If flush is called from the DyIO, time stored here will be ignored
cachedTime | the new cached time |
Definition at line 783 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedTime.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue | ( | int | cachedValue | ) |
THis method allows the user to set a chached value to be sent to the device when a flush is called later on. THis method will not send this value to the device, a flush must be called later to send it.
cachedValue | the value to store as the cached value |
Definition at line 624 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedValue.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
void com.neuronrobotics.sdk.dyio.DyIOChannel.setDap | ( | DyIOAbstractPeripheral | dap | ) |
THis sets up the abstract peripheral object that is using this channel object.
dap | the new dap |
Definition at line 658 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.dap.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel().
|
private |
Sets the device.
device | the new device |
Definition at line 850 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.device.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.update().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setMode | ( | DyIOChannelMode | mode | ) |
Set the mode of the DyIO Channel.
mode | The desired channel mode. |
Definition at line 223 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.isDefaultAsync().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.init(), com.neuronrobotics.sdk.dyio.DyIOChannel.setAsync(), com.neuronrobotics.sdk.dyio.DyIO.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setMode | ( | DyIOChannelMode | mode, |
boolean | async | ||
) |
Set the mode of a channel.
mode | the mode to set the channel to |
async | if it should be async or not |
Legacy
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 473 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode(), com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.common.Log.debug(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.dyio.DyIO.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIO.getChannels(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.common.InvalidResponseException.getMessage(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.haveSetMode, com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync, com.neuronrobotics.sdk.dyio.DyIOChannel.isDefaultAsync(), com.neuronrobotics.sdk.dyio.DyIOChannel.MAXATTEMPTS, com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.common.BowlerMethod.POST, com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.SERVO_OUT, com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange(), and com.neuronrobotics.sdk.dyio.DyIOChannel.settingMode.
|
private |
Sets the previous value.
previousValue | the new previous value |
Definition at line 813 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.previousValue.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getValue().
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setValue | ( | ByteList | value | ) |
Set the value of a channel. Channels may not be able to be set to certain or potentially any values depending on the mode that a channel is in.
value | the value |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 955 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.MAXATTEMPTS, com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.common.BowlerMethod.POST, com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.USART_RX, and com.neuronrobotics.sdk.dyio.DyIOChannelMode.USART_TX.
boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setValue | ( | int | value | ) |
Set the value of a channel. Channels may not be able to be set to certain or potentially any values depending on the mode that a channel is in.
value | the value to set |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 563 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode, com.neuronrobotics.sdk.dyio.DyIOChannel.dap, com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIO.setValue(), and com.neuronrobotics.sdk.dyio.DyIOOutputStream.write().
String com.neuronrobotics.sdk.dyio.DyIOChannel.toString | ( | ) |
Definition at line 408 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().
void com.neuronrobotics.sdk.dyio.DyIOChannel.update | ( | DyIO | dyio, |
int | channel, | ||
DyIOChannelMode | mode, | ||
boolean | isEditable | ||
) |
This method allows the user to update all of the content information of this instance of the object.
dyio | the dyio |
channel | the channel |
mode | the mode |
isEditable | the is editable |
Definition at line 104 of file DyIOChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.editable, com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync, com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.NO_CHANGE, com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.dyio.DyIOChannel.setDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.DyIOChannel().
|
private |
The cached mode.
Definition at line 72 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
|
private |
The cached time.
Definition at line 45 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedTime(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime().
|
protected |
The cached value.
Definition at line 69 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue().
|
private |
The current.
Definition at line 57 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode().
|
private |
The dap.
Definition at line 75 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getDap(), com.neuronrobotics.sdk.dyio.DyIOChannel.setDap(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
|
private |
The device.
Definition at line 48 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setDevice().
|
private |
The editable.
Definition at line 54 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
|
private |
The have set mode.
Definition at line 81 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
|
private |
The is async.
Definition at line 60 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
|
private |
The listeners.
Definition at line 63 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelEventListeners(), and com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelEventListener().
|
private |
The maxattempts.
Definition at line 42 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
|
private |
The mode listeners.
Definition at line 66 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelModeChangeListener(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelModeChangeListener(), and com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelModeChangeListener().
|
private |
This method gets a collection of all of the possible channel modes for this channel.
Definition at line 303 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().
|
private |
The number.
Definition at line 51 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.setValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().
|
private |
The previous value.
Definition at line 78 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getPreviousValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setPreviousValue().
|
private |
The setting mode.
Definition at line 84 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
|
private |
The synced.
Definition at line 865 of file DyIOChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.resyncIfNotSynced().