BowlerKernel
|
Private Member Functions | |
Object[] | send (BowlerMethod method, String rpcString, Object[] arguments) |
Private Attributes | |
final String | ns = "bcs.pid.*" |
Integer | channelCount =null |
Additional Inherited Members | |
![]() | |
ArrayList< PIDChannel > | channels = null |
long[] | lastPacketTime = null |
The Class PidNamespaceImp.
Definition at line 18 of file PidNamespaceImp.java.
com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.PidNamespaceImp | ( | BowlerAbstractDevice | device | ) |
Instantiates a new pid namespace imp.
device | the device |
Definition at line 30 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.device.
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 84 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, com.neuronrobotics.sdk.pid.PDVelocityConfiguration.getArgs(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 62 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, com.neuronrobotics.sdk.pid.PIDConfiguration.getArgs(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
float [] com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 162 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
PDVelocityConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 95 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
int com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.getPIDChannelCount | ( | ) |
Requests the current number of PID channels.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 109 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.channelCount, com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
PIDConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 73 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
float com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 148 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.killAllPidGroups | ( | ) |
Sends a single packet to stop all PID groups at once.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 191 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
void com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.onAsyncResponse | ( | BowlerDatagram | data | ) |
On async response.
data | the data |
Reimplemented from com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.
Definition at line 202 of file PidNamespaceImp.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.PidNamespaceImp.ResetPIDChannel | ( | int | group, |
float | valueToSetCurrentTo | ||
) | throws DeviceConnectionException |
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 50 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.runOutputHysteresisCalibration | ( | int | group | ) |
Run output hysteresis calibration.
group | the group |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IExtendedPIDControl.
Definition at line 227 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
|
private |
Send.
method | the method |
rpcString | the rpc string |
arguments | the arguments |
Definition at line 42 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.ns, and com.neuronrobotics.sdk.common.BowlerAbstractDevice.send().
Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.ConfigurePDVelovityController(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.ConfigurePIDController(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.GetAllPIDPosition(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.getPDVelocityConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.getPIDChannelCount(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.getPIDConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.GetPIDPosition(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.killAllPidGroups(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.ResetPIDChannel(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.runOutputHysteresisCalibration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.SetAllPIDSetPoint(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.SetPDVelocity(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.SetPIDSetPoint().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 136 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 178 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 123 of file PidNamespaceImp.java.
References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().
|
private |
The channel count.
Definition at line 103 of file PidNamespaceImp.java.
Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.getPIDChannelCount().
|
private |
The ns.
Definition at line 21 of file PidNamespaceImp.java.
Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().