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

Public Member Functions

 PidNamespaceImp (BowlerAbstractDevice device)
 
boolean ResetPIDChannel (int group, float valueToSetCurrentTo) throws DeviceConnectionException
 
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 ()
 
void onAsyncResponse (BowlerDatagram data)
 
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)
 

Private Member Functions

Object[] send (BowlerMethod method, String rpcString, Object[] arguments)
 

Private Attributes

final String ns = "bcs.pid.*"
 
Integer channelCount =null
 

Additional Inherited Members

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

Detailed Description

The Class PidNamespaceImp.

Definition at line 18 of file PidNamespaceImp.java.

Constructor & Destructor Documentation

◆ PidNamespaceImp()

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

Instantiates a new pid namespace imp.

Parameters
devicethe device

Definition at line 30 of file PidNamespaceImp.java.

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

Member Function Documentation

◆ ConfigurePDVelovityController()

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.

Parameters
configthe configuration wrapper object
Returns
true if success

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

Here is the call graph for this function:

◆ ConfigurePIDController()

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.

Parameters
configthe configuration wrapper object
Returns
true if success

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

Here is the call graph for this function:

◆ GetAllPIDPosition()

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.

Returns
and array of values representing the current state of the given cntrollers input

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

Here is the call graph for this function:

◆ getPDVelocityConfiguration()

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.

Parameters
groupthe index of the PID group
Returns
the configuration object

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

Here is the call graph for this function:

◆ getPIDChannelCount()

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

Requests the current number of PID channels.

Returns
the PID channel count

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

Here is the call graph for this function:

◆ getPIDConfiguration()

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.

Parameters
groupthe index of the PID group
Returns
the configuration object

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

Here is the call graph for this function:

◆ GetPIDPosition()

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

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 148 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.GET, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

◆ killAllPidGroups()

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

Sends a single packet to stop all PID groups at once.

Returns
true, if successful

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

Here is the call graph for this function:

◆ onAsyncResponse()

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

◆ ResetPIDChannel()

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)

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 50 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

◆ runOutputHysteresisCalibration()

boolean com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.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 227 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

◆ send()

Object [] com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send ( BowlerMethod  method,
String  rpcString,
Object[]  arguments 
)
private

◆ SetAllPIDSetPoint()

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.

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 136 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

◆ SetPDVelocity()

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.

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 178 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

◆ SetPIDSetPoint()

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

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 123 of file PidNamespaceImp.java.

References com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.send().

Here is the call graph for this function:

Member Data Documentation

◆ channelCount

Integer com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.channelCount =null
private

◆ ns

final String com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.ns = "bcs.pid.*"
private

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