BowlerKernel
|
Public Member Functions | |
DyIOAbstractPeripheral (DyIOChannel channel, DyIOChannelMode myMode, boolean async) | |
DyIOChannelMode | getClassMode () |
boolean | isEnabled () |
boolean | setMode () |
boolean | setMode (boolean async) |
boolean | setMode (DyIOChannelMode mode, boolean async) |
DyIOChannel | getChannel () |
DyIOChannelMode | getMode () |
boolean | setValue (int value) throws InvalidResponseException |
boolean | setValue (ByteList value) throws InvalidResponseException |
int | getValue () throws InvalidResponseException |
boolean | SavePosition (int pos) |
abstract boolean | hasAsync () |
boolean | configAdvancedAsyncNotEqual () |
boolean | configAdvancedAsyncDeadBand (int deadbandSize) |
boolean | configAdvancedAsyncTreshhold (int threshholdValue, AsyncThreshholdEdgeType edgeType) |
boolean | configAdvancedAsyncAutoSample () |
boolean | configAdvancedAsyncNotEqual (int msTime) |
boolean | configAdvancedAsyncDeadBand (int msTime, int deadbandSize) |
boolean | configAdvancedAsyncTreshhold (int msTime, int threshholdValue, AsyncThreshholdEdgeType edgeType) |
boolean | configAdvancedAsyncAutoSample (int msTime) |
boolean | flush () |
void | setAsync (boolean b) |
int | getConfiguration () |
Private Member Functions | |
int | getConfigurationFromDevice () |
void | setConfiguration (int configuration) |
Private Attributes | |
DyIOChannel | channel |
boolean | enabled = false |
int | configuration =0 |
The Class DyIOAbstractPeripheral.
Definition at line 31 of file DyIOAbstractPeripheral.java.
com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral | ( | DyIOChannel | channel, |
DyIOChannelMode | myMode, | ||
boolean | async | ||
) |
channel | The channel object to set up as whatever peripheral is needed |
myMode | the my mode |
async | the async |
Definition at line 49 of file DyIOAbstractPeripheral.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setConfiguration(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 280 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 322 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 257 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 299 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 246 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.addAnalogInputListener(), com.neuronrobotics.sdk.addons.kinematics.AnalogPrismaticLink.setAnalogChannel(), and com.neuronrobotics.sdk.addons.kinematics.AnalogRotoryLink.setAnalogChannel().
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 288 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 311 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.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 269 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush | ( | ) |
THis method performs a cache flush on the channel wrapped by this object.
Definition at line 331 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.flush(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
DyIOChannel com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel | ( | ) |
Returns the channel object used by the peripheral.
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 141 of file DyIOAbstractPeripheral.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.getChannel().
Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.DCMotorOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.DigitalInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.DigitalOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.disablePowerOverride(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.enablePowerOverride(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getAnalogInputChannelNumber(), 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.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel(), com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.PWMOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().
DyIOChannelMode com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getClassMode | ( | ) |
This method retrieves the channel mode of this peripheral.
Definition at line 89 of file DyIOAbstractPeripheral.java.
int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfiguration | ( | ) |
Gets the configuration.
Definition at line 349 of file DyIOAbstractPeripheral.java.
|
private |
Gets the configuration from device.
Definition at line 65 of file DyIOAbstractPeripheral.java.
References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIO.send(), and com.neuronrobotics.sdk.dyio.DyIOChannelMode.SERVO_OUT.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral().
DyIOChannelMode com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getMode | ( | ) |
This method gets the current mode of this peripheral.
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 151 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate(), and com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.validate().
int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getValue | ( | ) | throws InvalidResponseException |
This method gets the value of the given peripheral.
InvalidResponseException | the invalid response exception |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 186 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel(), com.neuronrobotics.sdk.addons.kinematics.AnalogPrismaticLink.getCurrentPosition(), com.neuronrobotics.sdk.addons.kinematics.AnalogRotoryLink.getCurrentPosition(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.getScaledValue(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.isHigh(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.isHigh(), and com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.ServoOutputScheduleChannel().
|
abstract |
This method is to check if this peripheral is capable to be set as up as asynchronous.
Reimplemented in com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTRxChannel, com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTTxChannel, com.neuronrobotics.sdk.dyio.peripherals.ServoChannel, com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel, com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel, com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel, com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel, com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel, com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel, com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel, and com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.isEnabled | ( | ) |
isEnabled.
Definition at line 98 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate(), and com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.validate().
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.SavePosition | ( | int | pos | ) |
This method sets the value of the output of the giver peripheral, and also stores this value as the "default" value in non volatile memory to use at startup of the peripheral.
pos | the position to set as the new starting point for the channel |
Definition at line 199 of file DyIOAbstractPeripheral.java.
References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL.
void com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setAsync | ( | boolean | b | ) |
This method sets the async mode for this peripheral .
b | if it should be async or not |
Reimplemented in com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel, com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel, com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel, and com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.
Definition at line 340 of file DyIOAbstractPeripheral.java.
|
private |
Sets the configuration.
configuration | the new configuration |
Definition at line 358 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral().
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode | ( | ) |
This sets the mode of this peripheral.
Definition at line 107 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.DCMotorOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.DigitalInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.DigitalOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel(), com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.PWMOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.setAsync(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.setAsync(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.setAsync(), and com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.setAsync().
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode | ( | boolean | async | ) |
This method sets the current mode of this peripheral.
async | If the channel should be set into async mode |
Definition at line 117 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode | ( | DyIOChannelMode | mode, |
boolean | async | ||
) |
This method sets the current mode of this peripheral.
mode | the DyIO mode to set the channel to |
async | If the channel should be set into async mode |
InvalidResponseException | the invalid response exception |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 129 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setValue | ( | ByteList | value | ) | throws InvalidResponseException |
This method sets the value of the output of the giver peripheral.
value | Sets this value to the channel |
InvalidResponseException | the invalid response exception |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Definition at line 175 of file DyIOAbstractPeripheral.java.
boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setValue | ( | int | value | ) | throws InvalidResponseException |
This method sets the value of the output of the giver peripheral.
value | Sets this value to the channel |
InvalidResponseException | the invalid response exception |
Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.
Reimplemented in com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel, and com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.
Definition at line 163 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.SetDutyPercent(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.setHigh(), and com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.SetVelocity().
|
private |
The channel.
Definition at line 34 of file DyIOAbstractPeripheral.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.DCMotorOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.DigitalInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.DigitalOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), 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.PWMOutputChannel.PWMOutputChannel(), and com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel().
|
private |
The configuration.
Definition at line 40 of file DyIOAbstractPeripheral.java.
|
private |
The enabled.
Definition at line 37 of file DyIOAbstractPeripheral.java.