BowlerKernel
Public Member Functions | List of all members
com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp Class Reference
Inheritance diagram for com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp:
Inheritance graph
[legend]
Collaboration diagram for com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp:
Collaboration graph
[legend]

Public Member Functions

 LegacyPidNamespaceImp (BowlerAbstractDevice device)
 
void onAsyncResponse (BowlerDatagram data)
 
boolean ResetPIDChannel (int group, float valueToSetCurrentTo)
 
boolean ConfigurePIDController (PIDConfiguration config)
 
PIDConfiguration getPIDConfiguration (int group)
 
boolean ConfigurePDVelovityController (PDVelocityConfiguration config)
 
PDVelocityConfiguration getPDVelocityConfiguration (int group)
 
int getPIDChannelCount ()
 
boolean SetPIDSetPoint (int group, float setpoint, double seconds)
 
boolean SetAllPIDSetPoint (float[]setpoints, double seconds)
 
float GetPIDPosition (int group)
 
float[] GetAllPIDPosition ()
 
boolean SetPDVelocity (int group, int unitsPerSecond, double seconds) throws PIDCommandException
 
boolean killAllPidGroups ()
 
boolean runOutputHysteresisCalibration (int group)
 
- Public Member Functions inherited from com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp
 AbstractPidNamespaceImp (BowlerAbstractDevice device)
 
float GetCachedPosition (int group)
 
void SetCachedPosition (int group, float value)
 
void flushPIDChannels (double time)
 
boolean SetPIDInterpolatedVelocity (int group, int unitsPerSecond, double seconds) throws PIDCommandException
 
int getNumberOfChannels ()
 
void addPIDEventListener (IPIDEventListener l)
 
void removePIDEventListener (IPIDEventListener l)
 
void firePIDLimitEvent (PIDLimitEvent e)
 
void firePIDEvent (PIDEvent e)
 
void firePIDResetEvent (int group, float value)
 
BowlerAbstractDevice getDevice ()
 
void setDevice (BowlerAbstractDevice device)
 
PIDChannel getPIDChannel (int group)
 
boolean isAvailable ()
 
ArrayList< PIDChannelgetChannels ()
 
void setChannels (ArrayList< PIDChannel > channels)
 
Integer getChannelCount ()
 
void setChannelCount (Integer channelCount)
 

Additional Inherited Members

- Protected Attributes inherited from com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp
ArrayList< PIDChannelchannels = null
 
long[] lastPacketTime = null
 

Detailed Description

The Class LegacyPidNamespaceImp.

Definition at line 26 of file LegacyPidNamespaceImp.java.

Constructor & Destructor Documentation

◆ LegacyPidNamespaceImp()

com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.LegacyPidNamespaceImp ( BowlerAbstractDevice  device)

Instantiates a new legacy pid namespace imp.

Parameters
devicethe device

Definition at line 34 of file LegacyPidNamespaceImp.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.device.

Member Function Documentation

◆ ConfigurePDVelovityController()

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.

Parameters
configthe configuration wrapper object
Returns
true if success

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().

Here is the call graph for this function:

◆ ConfigurePIDController()

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.

Parameters
configthe configuration wrapper object
Returns
true if success

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().

Here is the call graph for this function:

◆ GetAllPIDPosition()

float [] com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.GetAllPIDPosition ( )

◆ getPDVelocityConfiguration()

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.

Parameters
groupthe index of the PID group
Returns
the configuration object

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().

Here is the call graph for this function:

◆ getPIDChannelCount()

int com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.getPIDChannelCount ( )

◆ getPIDConfiguration()

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.

Parameters
groupthe index of the PID group
Returns
the configuration object

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().

Here is the call graph for this function:

◆ GetPIDPosition()

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

Parameters
groupthe index of the PID group
Returns
The current value of the sensor input

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().

Here is the call graph for this function:

◆ killAllPidGroups()

boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.killAllPidGroups ( )

◆ onAsyncResponse()

void com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.onAsyncResponse ( BowlerDatagram  data)

◆ ResetPIDChannel()

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)

Parameters
groupthe index of the PID group
valueToSetCurrentTothe target value that the controller should be set to.
Returns
true if success

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().

Here is the call graph for this function:

◆ runOutputHysteresisCalibration()

boolean com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.runOutputHysteresisCalibration ( int  group)

Run output hysteresis calibration.

Parameters
groupthe group
Returns
true, if successful

Implements com.neuronrobotics.sdk.namespace.bcs.pid.IExtendedPIDControl.

Definition at line 222 of file LegacyPidNamespaceImp.java.

◆ SetAllPIDSetPoint()

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.

Parameters
setpointsand array of setpoint values (must match the number of availible PID control groups)
secondsunits 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.
Returns
true if no errors occur

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().

Here is the call graph for this function:

◆ SetPDVelocity()

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.

Parameters
groupthe index of the PID group
unitsPerSeconda velocity in raw units per second
secondsthe amount of time to run at this velocity, or Zero to run forever
Returns
true, if successful
Exceptions
PIDCommandExceptionIf 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().

Here is the call graph for this function:

◆ SetPIDSetPoint()

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

Parameters
groupthe index of the PID group
setpointthe target position for the controller
secondsunits 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.
Returns
true if no errors occur

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().

Here is the call graph for this function:

The documentation for this class was generated from the following file: