BowlerKernel
|
Additional Inherited Members | |
![]() | |
ArrayList< PIDChannel > | channels = null |
long[] | lastPacketTime = null |
The Class LegacyPidNamespaceImp.
Definition at line 26 of file LegacyPidNamespaceImp.java.
com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.LegacyPidNamespaceImp | ( | BowlerAbstractDevice | device | ) |
Instantiates a new legacy pid namespace imp.
device | the device |
Definition at line 34 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.device.
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 100 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 82 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
float [] com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 172 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.common.Log.debug(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getChannels(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getNumberOfChannels(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.lastPacketTime, com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), com.neuronrobotics.sdk.pid.PIDChannel.setCachedTargetValue(), and com.neuronrobotics.sdk.common.ByteList.size().
PDVelocityConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 108 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice().
int com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.getPIDChannelCount | ( | ) |
Requests the current number of PID channels.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 117 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getChannelCount(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.setChannelCount().
PIDConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 90 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
float com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 162 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.ResetPIDChannel().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.killAllPidGroups | ( | ) |
Sends a single packet to stop all PID groups at once.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 213 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.getConnection(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), and com.neuronrobotics.sdk.common.BowlerAbstractConnection.setSynchronusPacketTimeoutTime().
void com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.onAsyncResponse | ( | BowlerDatagram | data | ) |
On async response.
data | the data |
Reimplemented from com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.
Definition at line 41 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.ByteList.convertToInt(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDEvent(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDLimitEvent(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getNumberOfChannels(), and com.neuronrobotics.sdk.common.BowlerDatagram.getRPC().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 68 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDResetEvent(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.GetPIDPosition(), and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.runOutputHysteresisCalibration | ( | int | group | ) |
Run output hysteresis calibration.
group | the group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IExtendedPIDControl.
Definition at line 222 of file LegacyPidNamespaceImp.java.
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 139 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.pid.PIDChannel.getCachedTargetValue(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getNumberOfChannels(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getPIDChannel(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), and com.neuronrobotics.sdk.pid.PIDChannel.setCachedTargetValue().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 198 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.common.Log.debug(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.SetPIDInterpolatedVelocity().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.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 129 of file LegacyPidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getPIDChannel(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.send(), and com.neuronrobotics.sdk.pid.PIDChannel.setCachedTargetValue().