BowlerKernel
|
Static Public Member Functions | |
static void | disableFWCheck () |
static void | enableFWCheck () |
Protected Member Functions | |
void | validateChannel (int channel) |
![]() | |
void | fireDisconnectEvent () |
void | fireConnectEvent () |
Private Member Functions | |
boolean | haveFirmware () |
void | powerEvent (BowlerDatagram data) |
ArrayList< DyIOChannel > | getInternalChannels () |
Private Attributes | |
ArrayList< IDyIOEventListener > | listeners = new ArrayList<IDyIOEventListener>() |
ArrayList< DyIOChannel > | channels = new ArrayList<DyIOChannel>() |
byte[] | firmware = {0, 0, 0} |
String | info = "DyIO" |
DyIOPowerState | bankAState |
DyIOPowerState | bankBState |
double | batteryVoltage = 0 |
boolean | cachedMode =false |
boolean | muteResyncOnModeChange =false |
boolean | resyncing = false |
boolean | haveBeenSynced =false |
boolean | legacyParser = false |
Boolean | enableBrownOut =null |
GenericPIDDevice | pid = new GenericPIDDevice() |
Integer | dyioChanCount = null |
Static Private Attributes | |
static final String | NEURONROBOTICS_DYIO_1_0 = "neuronrobotics.dyio.*;1.0" |
static boolean | checkFirmware =false |
The DyIO class is an encapsulation of all of the functionality of the DyIO module into one object. This object has one connection to one DyIO module and wraps all of the commands in an accessible API.
com.neuronrobotics.sdk.dyio.DyIO.DyIO | ( | ) |
Default Constructor. Builds a generic DyIO that has the default broadcast address and no default connection.
Definition at line 113 of file DyIO.java.
References com.neuronrobotics.sdk.common.MACAddress.BROADCAST, com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress().
com.neuronrobotics.sdk.dyio.DyIO.DyIO | ( | MACAddress | address | ) |
Builds a DyIO that has the given address and no default connection.
address | the address |
Definition at line 123 of file DyIO.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.address, com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress().
com.neuronrobotics.sdk.dyio.DyIO.DyIO | ( | BowlerAbstractConnection | connection | ) |
Builds a DyIO with the given connection and the broadcast address.
connection | the connection |
Definition at line 133 of file DyIO.java.
References com.neuronrobotics.sdk.common.MACAddress.BROADCAST, com.neuronrobotics.sdk.common.BowlerAbstractDevice.connection, com.neuronrobotics.sdk.dyio.DyIO.getPid(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setConnection(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection().
com.neuronrobotics.sdk.dyio.DyIO.DyIO | ( | MACAddress | address, |
BowlerAbstractConnection | connection | ||
) |
Builds a DyIO with the given address and connection.
address | the address |
connection | the connection |
Definition at line 146 of file DyIO.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.address, com.neuronrobotics.sdk.common.BowlerAbstractDevice.connection, com.neuronrobotics.sdk.dyio.DyIO.getPid(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setConnection(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection().
void com.neuronrobotics.sdk.dyio.DyIO.addDyIOEventListener | ( | IDyIOEventListener | l | ) |
Add an IDyIOEventListener that will be contacted with an IDyIOEvent on each incoming data event.
DyIO event listeners are used to get information from all DyIO events. This is how to access the Power events: DyIO power switch change events DyIO external power voltage change events
l | the l |
Definition at line 543 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.listeners.
void com.neuronrobotics.sdk.dyio.DyIO.addPIDEventListener | ( | IPIDEventListener | l | ) |
Allows a user to attach a listener to the device to listen for PID events Events include: PID reset, where the user is notified if the controllers input is reset from software PID limit, if the device generates a Home, Upper limit, or Lower limit event from a hardware event PID position, if the current position of the PID controllers sensor input changes.
l | the l |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 912 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.addPIDEventListener(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
void com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev | ( | ) | throws DyIOFirmwareOutOfDateException |
Sync the state cache with the live device. This method will query the device for its firmware revision and its info string. The default opperation will be to throw a DyIOFirmwareOutOfDateException is the firmware version does not match the NRDK build version. This can be overridden if DyIO.disableFWCheck() is called BEFORE connection.
DyIOFirmwareOutOfDateException | the dy io firmware out of date exception |
Definition at line 353 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmware, com.neuronrobotics.sdk.dyio.DyIO.firmware, com.neuronrobotics.sdk.config.SDKBuildInfo.getBuildInfo(), and com.neuronrobotics.sdk.common.Log.info().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIO.startHeartBeat(), and com.neuronrobotics.sdk.dyio.DyIO.stopHeartBeat().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncAutoSample | ( | int | pin | ) |
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.
pin | the DyIO channel to configure |
Definition at line 1005 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncAutoSample | ( | int | pin, |
int | time | ||
) |
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.
pin | the DyIO channel to configure |
time | the sample time in MiliSeconds |
Definition at line 1052 of file DyIO.java.
References com.neuronrobotics.sdk.commands.bcs.io.AsyncMode.AUTOSAMP, and com.neuronrobotics.sdk.dyio.DyIO.send().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncDeadBand | ( | int | pin, |
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.
pin | the DyIO channel to configure |
deadbandSize | the size in sensor units of the deadband |
Definition at line 980 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncDeadBand | ( | int | pin, |
int | time, | ||
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.
pin | the DyIO channel to configure |
time | the sample time in MiliSeconds |
deadbandSize | the size in sensor units of the deadband |
Definition at line 1027 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.send().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual | ( | int | pin | ) |
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
pin | the DyIO channel to configure |
Definition at line 968 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual | ( | int | pin, |
int | time | ||
) |
This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are not equal.
pin | the DyIO channel to configure |
time | the sample time in MiliSeconds |
Definition at line 1015 of file DyIO.java.
References com.neuronrobotics.sdk.commands.bcs.io.AsyncMode.NOTEQUAL, and com.neuronrobotics.sdk.dyio.DyIO.send().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncTreshhold | ( | int | pin, |
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.
pin | the DyIO channel to configure |
threshholdValue | a value setpoint that triggers an even when it is crossed |
edgeType | Rising, Falling, or both |
Definition at line 993 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold().
boolean com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncTreshhold | ( | int | pin, |
int | time, | ||
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.
pin | the DyIO channel to configure |
time | 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 1040 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.send().
boolean com.neuronrobotics.sdk.dyio.DyIO.ConfigureDynamicPIDChannels | ( | DyPIDConfiguration | config | ) |
This method sends a packet to the DyIO module to set up the linking between a DyIO input channel and a DyIO output channel to a PID controller Inputs are read as the input to the PID calculation Outputs are set as a result of the PID calculation.
config | the configuration data object |
Definition at line 837 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.send().
boolean com.neuronrobotics.sdk.dyio.DyIO.ConfigurePDVelovityController | ( | PDVelocityConfiguration | config | ) |
This method sends a PID configuration object to the device. THe controller can be enabled/disabled with this method All PID parameters are stored in the PIDConfiguration ojbect prior to calling this method will be sent to the device.
config | the configuration wrapper object |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 1312 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.ConfigurePDVelovityController(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
boolean com.neuronrobotics.sdk.dyio.DyIO.ConfigurePIDController | ( | PIDConfiguration | config | ) |
This method sends a PID configuration object to the device. THe controller can be enabled/disabled with this method All PID parameters are stored in the PIDConfiguration ojbect prior to calling this method will be sent to the device.
config | the configuration wrapper object |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 900 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.ConfigurePIDController(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
boolean com.neuronrobotics.sdk.dyio.DyIO.connect | ( | ) |
This method tells the connection object to start and connects the up and down streams pipes. Once this method is called and returns without exception, the device is ready to communicate with
InvalidConnectionException | the invalid connection exception |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 1061 of file DyIO.java.
References com.neuronrobotics.sdk.common.BowlerAbstractConnection.addConnectionEventListener(), com.neuronrobotics.sdk.pid.GenericPIDDevice.connect(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.getAddress(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.getConnection(), com.neuronrobotics.sdk.dyio.DyIO.getPid(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.hasNamespace(), com.neuronrobotics.sdk.dyio.DyIO.pid, com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress(), com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.setSynchronusPacketTimeoutTime(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.startHeartBeat().
Referenced by com.neuronrobotics.sdk.common.DeviceManager.addConnection().
|
static |
This static method can be called before connection a DyIO object to disable the firmware verification step This can be used to allow older versions of the DyIO firmware to be used with newer NRDK versions.
Definition at line 334 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmware.
|
static |
void com.neuronrobotics.sdk.dyio.DyIO.fireDyIOEvent | ( | IDyIOEvent | e | ) |
Contact all of the listeners with the given event.
e |
|
Definition at line 578 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.listeners.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), and com.neuronrobotics.sdk.dyio.DyIO.powerEvent().
void com.neuronrobotics.sdk.dyio.DyIO.flush | ( | double | seconds | ) |
This interface says the device can cache values and flush them in one push
seconds | the duration of the flush, from current position and time to cached positions in this many seconds |
Implements com.neuronrobotics.sdk.common.IFlushable.
Definition at line 1428 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.flushCache().
void com.neuronrobotics.sdk.dyio.DyIO.flushCache | ( | double | seconds | ) |
This method will flush the DyIO cache for all channels. All channel values as stored by setting the value from code, or the value stored at the time that the cache/flush mode was enabled. THis method will flush all 24 channel values in one packet allowing for co-ordinated motion.
seconds | the seconds |
Definition at line 648 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.dyio.DyIO.send().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.flush(), and com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.DyIOFlusher.run().
void com.neuronrobotics.sdk.dyio.DyIO.flushPIDChannels | ( | double | time | ) |
This method will read all of the cached or current setpoints for all PID controllers and calls SetAllPIDSetPoint with its internal data.
time | the time |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 925 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.flushPIDChannels(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
ArrayList<DyIOChannelMode> com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes | ( | ) |
Gets the all channel modes.
Definition at line 377 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.common.BowlerDatagram.getAddress(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount(), com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress(), com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange(), and com.neuronrobotics.sdk.common.ByteList.size().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
int [] com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues | ( | ) |
Gets the values of all channels as an array.
Definition at line 1267 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.dyio.DyIO.getChannels(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel(), com.neuronrobotics.sdk.common.ByteList.popList(), and com.neuronrobotics.sdk.dyio.DyIO.send().
float [] com.neuronrobotics.sdk.dyio.DyIO.GetAllPIDPosition | ( | ) |
This method requests all PID controllers to report back their current value of their input sensors. This method is also used to determine dynamically how many PID control groups are availible on a device.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 894 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.GetAllPIDPosition(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
ArrayList<DyIOChannelMode> com.neuronrobotics.sdk.dyio.DyIO.getAvailibleChannelModes | ( | int | channel | ) |
Gets the availible channel modes.
channel | the channel |
Definition at line 1370 of file DyIO.java.
References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.common.ByteList.size(), and com.neuronrobotics.sdk.dyio.DyIOChannelMode.toString().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().
DyIOPowerState com.neuronrobotics.sdk.dyio.DyIO.getBankAState | ( | ) |
This method returns the bank switch state of bank A (0-11) This state is updated asynchronously by the DyIOEventListener.
Definition at line 704 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.bankAState.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().
DyIOPowerState com.neuronrobotics.sdk.dyio.DyIO.getBankBState | ( | ) |
This method returns the bank switch state of bank B (12-23) This state is updated asynchronously by the DyIOEventListener.
Definition at line 714 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.bankBState.
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().
double com.neuronrobotics.sdk.dyio.DyIO.getBatteryVoltage | ( | boolean | refresh | ) |
THis method will return the current voltage on the battery connected to the DyIO external power connector.
refresh | true if you want to query the device, false to just get the cached value from the last async. |
Definition at line 723 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.batteryVoltage, com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), and com.neuronrobotics.sdk.dyio.DyIO.send().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
boolean com.neuronrobotics.sdk.dyio.DyIO.getCachedMode | ( | ) |
This method returns the current state of the DyIO objects cache/flush system for the DyIO channel values.
Definition at line 618 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.cachedMode.
DyIOChannel com.neuronrobotics.sdk.dyio.DyIO.getChannel | ( | int | channel | ) |
Returns the DyIO channel associated with a channel number.
channel | integer representing the index of the channel
|
Definition at line 160 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), and com.neuronrobotics.sdk.dyio.DyIO.validateChannel().
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.DyIO.getMode(), com.neuronrobotics.sdk.dyio.DyIO.getValue(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.initInput(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.PWMOutputChannel(), com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), com.neuronrobotics.sdk.dyio.DyIO.setMode(), com.neuronrobotics.sdk.dyio.DyIO.setValue(), com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.SPIChannel(), and com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTChannel().
ArrayList<DyIOChannel> com.neuronrobotics.sdk.dyio.DyIO.getChannels | ( | ) |
This method creates a new collection and populates it with the DyIO channel objects.
Definition at line 311 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Integer com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount | ( | ) |
Gets the dy io channel count.
Definition at line 1343 of file DyIO.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.dyio.DyIO.dyioChanCount, com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), and com.neuronrobotics.sdk.dyio.DyIO.send().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes().
DyPIDConfiguration com.neuronrobotics.sdk.dyio.DyIO.getDyPIDConfiguration | ( | int | group | ) |
This method gets the current state of the DyIO channel configuration of a given PID group.
group | the index of the PID group to get information about |
Definition at line 847 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.send().
byte [] com.neuronrobotics.sdk.dyio.DyIO.getFirmwareRev | ( | ) |
This method gets the 3 byte firmware revision code. THis code is used to determine compatibility between the version of firmware on the DyIO and the version of the NRDK being used to communicate with it.
Definition at line 292 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.firmware.
String com.neuronrobotics.sdk.dyio.DyIO.getFirmwareRevString | ( | ) |
This method turns the firmware version number into a formatted string for clear display
Definition at line 301 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.firmware.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.toString().
int com.neuronrobotics.sdk.dyio.DyIO.getHeartBeatTime | ( | ) |
Gets the heart beat time.
Definition at line 1109 of file DyIO.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), and com.neuronrobotics.sdk.dyio.DyIO.send().
String com.neuronrobotics.sdk.dyio.DyIO.getInfo | ( | ) |
Gets the DyIO's internally stored info string. This is a 16 byte string that can be stored on the DYIO and used as a human-readable, user setable, identifier.
Definition at line 265 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.info.
|
private |
Getter for channels.
Definition at line 1179 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.channels.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.flushCache(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), com.neuronrobotics.sdk.dyio.DyIO.getChannel(), com.neuronrobotics.sdk.dyio.DyIO.getChannels(), com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIO.setCachedMode(), com.neuronrobotics.sdk.dyio.DyIO.toString(), and com.neuronrobotics.sdk.dyio.DyIO.validateChannel().
DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIO.getMode | ( | int | channel | ) |
THis method returns the state of the given channels I/O mode.
channel | integer representing the index of the channel |
Definition at line 209 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.toString().
PDVelocityConfiguration com.neuronrobotics.sdk.dyio.DyIO.getPDVelocityConfiguration | ( | int | group | ) |
Gets the current state of the PID group. The PIDConfiguration object will contain the current configuration state of the requested PID controller.
group | the index of the PID group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 1321 of file DyIO.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getPDVelocityConfiguration(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
GenericPIDDevice com.neuronrobotics.sdk.dyio.DyIO.getPid | ( | ) |
Gets the pid.
Definition at line 1405 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.pid.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.addPIDEventListener(), com.neuronrobotics.sdk.dyio.DyIO.ConfigurePDVelovityController(), com.neuronrobotics.sdk.dyio.DyIO.ConfigurePIDController(), com.neuronrobotics.sdk.dyio.DyIO.connect(), com.neuronrobotics.sdk.dyio.DyIO.DyIO(), com.neuronrobotics.sdk.dyio.DyIO.flushPIDChannels(), com.neuronrobotics.sdk.dyio.DyIO.GetAllPIDPosition(), com.neuronrobotics.sdk.dyio.DyIO.getPDVelocityConfiguration(), com.neuronrobotics.sdk.dyio.DyIO.getPIDChannel(), com.neuronrobotics.sdk.dyio.DyIO.getPIDChannelCount(), com.neuronrobotics.sdk.dyio.DyIO.getPIDConfiguration(), com.neuronrobotics.sdk.dyio.DyIO.GetPIDPosition(), com.neuronrobotics.sdk.dyio.DyIO.killAllPidGroups(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.dyio.DyIO.removePIDEventListener(), com.neuronrobotics.sdk.dyio.DyIO.ResetPIDChannel(), com.neuronrobotics.sdk.dyio.DyIO.SetAllPIDSetPoint(), com.neuronrobotics.sdk.dyio.DyIO.SetPDVelocity(), com.neuronrobotics.sdk.dyio.DyIO.SetPIDInterpolatedVelocity(), and com.neuronrobotics.sdk.dyio.DyIO.SetPIDSetPoint().
PIDChannel com.neuronrobotics.sdk.dyio.DyIO.getPIDChannel | ( | int | group | ) |
Gets the PID channel wrapper for a specific channel. The channel wrappers can be used to cache values for use with the cache/flush system. This wrapper will encapsulate a specific PID channel.
group | the index of the PID group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 932 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannel().
int com.neuronrobotics.sdk.dyio.DyIO.getPIDChannelCount | ( | ) |
Requests the current number of PID channels.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 1330 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount().
PIDConfiguration com.neuronrobotics.sdk.dyio.DyIO.getPIDConfiguration | ( | int | group | ) |
Gets the current state of the PID group. The PIDConfiguration object will contain the current configuration state of the requested PID controller.
group | the index of the PID group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 906 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDConfiguration().
float com.neuronrobotics.sdk.dyio.DyIO.GetPIDPosition | ( | int | group | ) |
This method requests a single PID controller group value. The value returned represents the current state of the PID controller's input sensor in raw units
group | the index of the PID group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 888 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.GetPIDPosition().
int com.neuronrobotics.sdk.dyio.DyIO.getValue | ( | int | channel | ) |
This method is used to get the value of a given channel. The data units will be determined by DyIO channel mode, and so should be treated by this method as unit-less.
channel | integer representing the index of the channel |
Definition at line 255 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getValue().
|
private |
Check to see if the firmware has been checked yet.
Definition at line 525 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.firmware.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
boolean com.neuronrobotics.sdk.dyio.DyIO.isAvailable | ( | ) | throws InvalidConnectionException |
Determines if the device is available.
InvalidConnectionException | the invalid connection exception |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 684 of file DyIO.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.getConnection(), and com.neuronrobotics.sdk.common.BowlerAbstractConnection.isConnected().
boolean com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser | ( | ) |
Checks if is legacy parser.
Definition at line 1414 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.legacyParser.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.flushCache(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), com.neuronrobotics.sdk.dyio.DyIO.getAvailibleChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.setUARTBaudrate(), and com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.write().
boolean com.neuronrobotics.sdk.dyio.DyIO.isMuteResyncOnModeChange | ( | ) |
This will check if the device is in the muted mode change mode.
Definition at line 1196 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.muteResyncOnModeChange.
boolean com.neuronrobotics.sdk.dyio.DyIO.isResyncing | ( | ) |
Checks to see if the DyIO is currently re-syncing its internal staate.
Definition at line 1232 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.resyncing.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
Boolean com.neuronrobotics.sdk.dyio.DyIO.isServoPowerSafeMode | ( | ) |
Tells the application whether or not to use the brownout detect.
Definition at line 1167 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.enableBrownOut, and com.neuronrobotics.sdk.dyio.DyIO.setServoPowerSafeMode().
boolean com.neuronrobotics.sdk.dyio.DyIO.killAllPidGroups | ( | ) |
Sends a single packet to stop all PID groups at once.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 954 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.killAllPidGroups().
void com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse | ( | BowlerDatagram | data | ) |
On async response.
data | the data |
Implements com.neuronrobotics.sdk.common.IBowlerDatagramListener.
Definition at line 762 of file DyIO.java.
References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), com.neuronrobotics.sdk.dyio.DyIO.fireDyIOEvent(), com.neuronrobotics.sdk.dyio.DyIO.getChannel(), com.neuronrobotics.sdk.dyio.DyIO.getChannels(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIO.getPid(), com.neuronrobotics.sdk.common.BowlerDatagram.getRPC(), com.neuronrobotics.sdk.dyio.DyIO.haveBeenSynced, com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel(), com.neuronrobotics.sdk.pid.GenericPIDDevice.onAsyncResponse(), com.neuronrobotics.sdk.common.ByteList.pop(), com.neuronrobotics.sdk.common.ByteList.popList(), com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), com.neuronrobotics.sdk.common.BowlerDatagram.toString(), and com.neuronrobotics.sdk.common.Log.warning().
void com.neuronrobotics.sdk.dyio.DyIO.onConnect | ( | BowlerAbstractConnection | source | ) |
called on the event of a connection object connect.
source | the source |
Implements com.neuronrobotics.sdk.common.IConnectionEventListener.
void com.neuronrobotics.sdk.dyio.DyIO.onDisconnect | ( | BowlerAbstractConnection | source | ) |
Called on the event of a connection object disconnect.
source | the source |
Implements com.neuronrobotics.sdk.common.IConnectionEventListener.
Definition at line 1204 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.firmware.
|
private |
Parses a datagram into the power event data.
data | the data |
Definition at line 736 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.bankAState, com.neuronrobotics.sdk.dyio.DyIO.bankBState, com.neuronrobotics.sdk.dyio.DyIO.batteryVoltage, com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.dyio.DyIO.enableBrownOut, com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIO.fireDyIOEvent(), com.neuronrobotics.sdk.common.ByteList.get(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.common.BowlerDatagram.getRPC(), com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.common.ByteList.size(), and com.neuronrobotics.sdk.dyio.DyIOPowerState.valueOf().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getBatteryVoltage(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), and com.neuronrobotics.sdk.dyio.DyIO.setServoPowerSafeMode().
void com.neuronrobotics.sdk.dyio.DyIO.removeAllDyIOEventListeners | ( | ) |
Clears out all current IDyIOEventListeners.
Definition at line 568 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.listeners.
void com.neuronrobotics.sdk.dyio.DyIO.removeDyIOEventListener | ( | IDyIOEventListener | l | ) |
Removes an IDyIOEventListener from being contacted on each new IDyIOEvent.
l | the l |
Definition at line 557 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.listeners.
void com.neuronrobotics.sdk.dyio.DyIO.removePIDEventListener | ( | IPIDEventListener | l | ) |
Removes a specific IPIDEventListener.
l | the l |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 918 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.removePIDEventListener().
boolean com.neuronrobotics.sdk.dyio.DyIO.ResetPIDChannel | ( | int | group | ) |
Reset pid channel.
group | the group |
Definition at line 870 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.ResetPIDChannel().
boolean com.neuronrobotics.sdk.dyio.DyIO.ResetPIDChannel | ( | int | group, |
float | valueToSetCurrentTo | ||
) |
This method calls a reset of the PID group. This will set the current value of the controllers input to the given value (if possible) and will set the setpoint of the PID group to the current value (stopping the output)
group | the index of the PID group |
valueToSetCurrentTo | the target value that the controller should be set to. |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 857 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.ResetPIDChannel().
boolean com.neuronrobotics.sdk.dyio.DyIO.resync | ( | ) |
This method re-synchronizes the entire state of the DyIO object with the DyIO module. The Firmware version is checked The info string is checked All channel modes are updated
Definition at line 441 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.DIGITAL_OUT, com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIO.firmware, com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getBatteryVoltage(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.getConnection(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode(), com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.getRevisions(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.hasNamespace(), com.neuronrobotics.sdk.dyio.DyIO.haveBeenSynced, com.neuronrobotics.sdk.dyio.DyIO.haveFirmware(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIO.isResyncing(), com.neuronrobotics.sdk.dyio.DyIO.NEURONROBOTICS_DYIO_1_0, com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.dyio.DyIO.setLegacyParser(), com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange(), and com.neuronrobotics.sdk.dyio.DyIO.setResyncing().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.connect(), and com.neuronrobotics.sdk.dyio.DyIO.validateChannel().
void com.neuronrobotics.sdk.dyio.DyIO.resync | ( | int | channel | ) |
This method synchronizes the DyIO channel mode from the DyIO module with this DyIO channel object This will actively query the DyIO for this information.
channel | integer representing the index of the channel |
Definition at line 326 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.resync().
Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Object [] com.neuronrobotics.sdk.dyio.DyIO.send | ( | String | namespace, |
BowlerMethod | method, | ||
String | rpcString, | ||
Object[] | arguments | ||
) |
THis is the scripting interface to Bowler devices. THis allows a user to describe a namespace, rpc, and array or arguments to be paced into the packet based on the data types of the argument. The response in likewise unpacked into an array of objects.
namespace | The string of the desired namespace |
method | the method |
rpcString | The string of the desired RPC |
arguments | An array of objects corresponding to the data to be stuffed into the packet. |
DeviceConnectionException | If the desired RPC's are not available then this will be thrown |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 168 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.DyIO.ConfigureDynamicPIDChannels(), com.neuronrobotics.sdk.dyio.DyIO.connect(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.disablePowerOverride(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.enablePowerOverride(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIO.flushCache(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelValues(), com.neuronrobotics.sdk.dyio.DyIO.getAvailibleChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.getBatteryVoltage(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount(), com.neuronrobotics.sdk.dyio.DyIO.getDyPIDConfiguration(), com.neuronrobotics.sdk.dyio.DyIO.getHeartBeatTime(), com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), com.neuronrobotics.sdk.dyio.DyIOChannel.send(), com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.sendSPIStream(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink(), com.neuronrobotics.sdk.dyio.DyIOChannel.setMode(), com.neuronrobotics.sdk.dyio.DyIO.setServoPowerSafeMode(), com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.setUARTBaudrate(), com.neuronrobotics.sdk.dyio.DyIOChannel.setValue(), com.neuronrobotics.sdk.dyio.DyIO.startHeartBeat(), com.neuronrobotics.sdk.dyio.DyIO.stopHeartBeat(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues(), and com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.write().
boolean com.neuronrobotics.sdk.dyio.DyIO.SetAllPIDSetPoint | ( | float[] | setpoints, |
double | seconds | ||
) |
Same as SetPIDSetPoint, but will set all setpoints at once. This can be used for co-ordinated motion of independant PID control groups.
setpoints | and array of setpoint values (must match the number of availible PID control groups) |
seconds | units in Seconds, the time it takes to make the transition from current to target. Zero will tell the controllers to go as fast as possible. |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 882 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.SetAllPIDSetPoint().
void com.neuronrobotics.sdk.dyio.DyIO.setCachedMode | ( | boolean | mode | ) |
This method enables the DyIO cache/flush system. When enabled, the system will interrupt all set value method calls and prevent them from sending packets to the DyIO. The channels will then need to either be flushed individually, or as a group. When the entire group is flushed, all channel values are set with a single packet allowing for co-ordinated motion. All channels will read the current state and set it as the cache value on the event of enabling the cache/flush mode
mode | true to enable cache/flush mode, false to disable. |
Definition at line 628 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.cachedMode, and com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels().
void com.neuronrobotics.sdk.dyio.DyIO.setInfo | ( | String | info | ) |
Sets the DyIO's internally stored info string. This is a 16 byte string that can be stored on the DYIO and used as a human-readable, user setable, identifier.
info | The String identifier to be stored by the DyIO. |
Definition at line 279 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.info.
void com.neuronrobotics.sdk.dyio.DyIO.setLegacyParser | ( | boolean | legacyParser | ) |
Sets the legacy parser.
legacyParser | the new legacy parser |
Definition at line 1423 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.legacyParser.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
boolean com.neuronrobotics.sdk.dyio.DyIO.setMode | ( | int | channel, |
DyIOChannelMode | mode | ||
) |
This method sets the I/O mode of a specific channel. the DyIO will be sent a packet to update its mode in firmware If the mode is the same as the current mode, nothing happens If the mode is different from the previous mode, a mode change listeners will be fired Asynchronus state will be unaffected
channel | integer representing the index of the channel |
mode | the DyIOChannelMode that this channel should be set to |
Definition at line 182 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.SPIChannel().
boolean com.neuronrobotics.sdk.dyio.DyIO.setMode | ( | int | channel, |
DyIOChannelMode | mode, | ||
boolean | async | ||
) |
This method sets the I/O mode of a specific channel. the DyIO will be sent a packet to update its mode in firmware If the mode is the same as the current mode, nothing happens If the mode is different from the previous mode, a mode change listeners will be fired
channel | integer representing the index of the channel |
mode | the DyIOChannelMode that this channel should be set to |
async | Forces the mode into or out of async mode |
Definition at line 199 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
void com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange | ( | boolean | muteResyncOnModeChange | ) |
This will enable a state where the DyIO will surpress DyIO mode update events.
muteResyncOnModeChange | true to enable the muted mode |
Definition at line 1187 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.muteResyncOnModeChange.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.dyio.DyIO.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().
boolean com.neuronrobotics.sdk.dyio.DyIO.SetPDVelocity | ( | int | group, |
int | unitsPerSecond, | ||
double | seconds | ||
) | throws PIDCommandException |
This method will use the internal PD velocity controller to run a PID controller at a constant velocity. Since this is not using the linear interpolation, it can run forever by giving Zero as the 'seconds' parameter.
group | the index of the PID group |
unitsPerSecond | a velocity in raw units per second |
seconds | the amount of time to run at this velocity, or Zero to run forever |
PIDCommandException | If the values are out of range with the given data |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 947 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPDVelocity().
boolean com.neuronrobotics.sdk.dyio.DyIO.SetPIDInterpolatedVelocity | ( | int | group, |
int | unitsPerSecond, | ||
double | seconds | ||
) | throws PIDCommandException |
This method will use the linear interpolation system to set an output velocity of the PID controller. This method can be bounded by the maximum value representable by the sensor and can fail if that value is out of range.
group | the index of the PID group |
unitsPerSecond | a velocity in raw units per second |
seconds | the amount of time to run at this velocity |
PIDCommandException | If the values are out of range with the given data |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 940 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPIDInterpolatedVelocity().
boolean com.neuronrobotics.sdk.dyio.DyIO.SetPIDSetPoint | ( | int | group, |
float | setpoint, | ||
double | seconds | ||
) |
This method sets the target setpoint for the specified PID controller group. This method will set up a linear interpolation from current position to target position which will take the specified number of seconds to make that transition
group | the index of the PID group |
setpoint | the target position for the controller |
seconds | units in Seconds, the time it takes to make the transition from current to target. Zero will tell the controller to go as fast as possible. |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 876 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getPid(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPIDSetPoint().
void com.neuronrobotics.sdk.dyio.DyIO.setResyncing | ( | boolean | resyncing | ) |
Sets the flag to represent if the DyIO is currently re-syncing itself with the device.
resyncing | the new resyncing |
Definition at line 1223 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.resyncing.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
boolean com.neuronrobotics.sdk.dyio.DyIO.setServoPowerSafeMode | ( | boolean | enable | ) |
This method allows you to disable the brown out detect for the servo subsystem. If true is passed
enable | true to enable the borwnout, false to disable |
Definition at line 1156 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.enableBrownOut, com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), and com.neuronrobotics.sdk.dyio.DyIO.send().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.isServoPowerSafeMode().
boolean com.neuronrobotics.sdk.dyio.DyIO.setValue | ( | int | channel, |
ByteList | value | ||
) |
This method sets the value of a channel with a pre-packaged ByteList of the data to send. Since the bytelist is pre-packaged, the data will be sent to the DyIO as it is packet into the ByteList with NO VERIFICATION.
channel | integer representing the index of the channel |
value | ByteList of the data to send to the DyIO |
Definition at line 234 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
boolean com.neuronrobotics.sdk.dyio.DyIO.setValue | ( | int | channel, |
int | value | ||
) |
This method is a simple value set for a DyIO channel. This method is unit-less and will clip data to fit the channel modes requirements.
channel | integer representing the index of the channel |
value | Unit-less value to set to the DyIO's channel |
Definition at line 221 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.getChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.setValue().
boolean com.neuronrobotics.sdk.dyio.DyIO.setValue | ( | int | channel, |
java.math.BigDecimal | value | ||
) |
This method is a simple value set for a DyIO channel. This method is unit-less and will clip data to fit the channel modes requirements.
channel | integer representing the index of the channel |
value | Unit-less value to set to the DyIO's channel |
Definition at line 245 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.setValue().
void com.neuronrobotics.sdk.dyio.DyIO.startHeartBeat | ( | long | msHeartBeatTime | ) |
This method enables the heart beat. It tells the device how often to expect synchronous packet, and if communication fails to send in the given time, then the device should go into its "safe state". This will also set up a thread to ping the device periodically if it has been too long since the last user generated synchronous packet.
msHeartBeatTime | the ms heart beat time |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 1092 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), and com.neuronrobotics.sdk.dyio.DyIO.send().
void com.neuronrobotics.sdk.dyio.DyIO.stopHeartBeat | ( | ) |
This method stops the heart beat and tells the device to stop expecting a heart beat. This will DISABLE the safe mode detect.
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 1119 of file DyIO.java.
References com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), and com.neuronrobotics.sdk.dyio.DyIO.send().
String com.neuronrobotics.sdk.dyio.DyIO.toString | ( | ) |
Definition at line 1241 of file DyIO.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.getAddress(), com.neuronrobotics.sdk.dyio.DyIO.getFirmwareRevString(), com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), and com.neuronrobotics.sdk.dyio.DyIO.getMode().
|
protected |
Validates a that a given channel is in the proper range.
channel | integer representing the index of the channel |
Definition at line 590 of file DyIO.java.
References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels(), com.neuronrobotics.sdk.dyio.DyIO.haveBeenSynced, com.neuronrobotics.sdk.dyio.DyIO.resync(), and com.neuronrobotics.sdk.util.ThreadUtil.wait().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getChannel().
|
private |
The bank a state.
Definition at line 78 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getBankAState(), and com.neuronrobotics.sdk.dyio.DyIO.powerEvent().
|
private |
The bank b state.
Definition at line 81 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getBankBState(), and com.neuronrobotics.sdk.dyio.DyIO.powerEvent().
|
private |
The battery voltage.
Definition at line 84 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getBatteryVoltage(), and com.neuronrobotics.sdk.dyio.DyIO.powerEvent().
|
private |
The cached mode.
Definition at line 87 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getCachedMode(), and com.neuronrobotics.sdk.dyio.DyIO.setCachedMode().
|
private |
The channels.
Definition at line 69 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getInternalChannels().
|
staticprivate |
The check firmware.
Definition at line 93 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), and com.neuronrobotics.sdk.dyio.DyIO.disableFWCheck().
|
private |
The dyio chan count.
Definition at line 1336 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount().
|
private |
The enable brown out.
Definition at line 105 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.isServoPowerSafeMode(), com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), and com.neuronrobotics.sdk.dyio.DyIO.setServoPowerSafeMode().
|
private |
The firmware.
Definition at line 72 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.checkFirmwareRev(), com.neuronrobotics.sdk.dyio.DyIO.getFirmwareRev(), com.neuronrobotics.sdk.dyio.DyIO.getFirmwareRevString(), com.neuronrobotics.sdk.dyio.DyIO.haveFirmware(), com.neuronrobotics.sdk.dyio.DyIO.onDisconnect(), and com.neuronrobotics.sdk.dyio.DyIO.resync().
|
private |
The have been synced.
Definition at line 99 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.dyio.DyIO.resync(), and com.neuronrobotics.sdk.dyio.DyIO.validateChannel().
|
private |
The info.
Definition at line 75 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.getInfo(), and com.neuronrobotics.sdk.dyio.DyIO.setInfo().
|
private |
The legacy parser.
Definition at line 102 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), and com.neuronrobotics.sdk.dyio.DyIO.setLegacyParser().
|
private |
The listeners.
Definition at line 66 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.addDyIOEventListener(), com.neuronrobotics.sdk.dyio.DyIO.fireDyIOEvent(), com.neuronrobotics.sdk.dyio.DyIO.removeAllDyIOEventListeners(), and com.neuronrobotics.sdk.dyio.DyIO.removeDyIOEventListener().
|
private |
The mute resync on mode change.
Definition at line 90 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.isMuteResyncOnModeChange(), and com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange().
|
staticprivate |
The Constant NEURONROBOTICS_DYIO_1_0.
Definition at line 63 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.resync().
|
private |
The pid.
Definition at line 108 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.connect(), and com.neuronrobotics.sdk.dyio.DyIO.getPid().
|
private |
The resyncing.
Definition at line 96 of file DyIO.java.
Referenced by com.neuronrobotics.sdk.dyio.DyIO.isResyncing(), and com.neuronrobotics.sdk.dyio.DyIO.setResyncing().