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

Public Member Functions

 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 ()
 
abstract void onAsyncResponse (BowlerDatagram data)
 
ArrayList< PIDChannelgetChannels ()
 
void setChannels (ArrayList< PIDChannel > channels)
 
Integer getChannelCount ()
 
void setChannelCount (Integer channelCount)
 
- Public Member Functions inherited from com.neuronrobotics.sdk.namespace.bcs.pid.IExtendedPIDControl
boolean runOutputHysteresisCalibration (int group)
 
- Public Member Functions inherited from com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace
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 ()
 

Protected Attributes

ArrayList< PIDChannelchannels = null
 
long[] lastPacketTime = null
 

Private Attributes

ArrayList< IPIDEventListenerPIDEventListeners = new ArrayList<IPIDEventListener>()
 
BowlerAbstractDevice device
 
Integer channelCount =null
 

Detailed Description

The Class AbstractPidNamespaceImp.

Definition at line 18 of file AbstractPidNamespaceImp.java.

Constructor & Destructor Documentation

◆ AbstractPidNamespaceImp()

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

Member Function Documentation

◆ addPIDEventListener()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.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.

Parameters
lthe l

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

Definition at line 113 of file AbstractPidNamespaceImp.java.

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

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.AbstractPidNamespaceImp(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.addPIDEventListener().

◆ firePIDEvent()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDEvent ( PIDEvent  e)

◆ firePIDLimitEvent()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDLimitEvent ( PIDLimitEvent  e)

◆ firePIDResetEvent()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDResetEvent ( int  group,
float  value 
)

◆ flushPIDChannels()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.flushPIDChannels ( double  time)

◆ GetCachedPosition()

float com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.GetCachedPosition ( int  group)

◆ getChannelCount()

Integer com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getChannelCount ( )

◆ getChannels()

ArrayList<PIDChannel> com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getChannels ( )

◆ getDevice()

BowlerAbstractDevice com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getDevice ( )

◆ getNumberOfChannels()

int com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getNumberOfChannels ( )

◆ getPIDChannel()

PIDChannel com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getPIDChannel ( int  group)

◆ isAvailable()

boolean com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.isAvailable ( )

Checks to see if the PID controller object is connected with its device.

Returns
true, if is available

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

Definition at line 215 of file AbstractPidNamespaceImp.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.device, and com.neuronrobotics.sdk.common.BowlerAbstractDevice.isAvailable().

Here is the call graph for this function:

◆ onAsyncResponse()

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

◆ removePIDEventListener()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.removePIDEventListener ( IPIDEventListener  l)

◆ SetCachedPosition()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.SetCachedPosition ( int  group,
float  value 
)

◆ setChannelCount()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.setChannelCount ( Integer  channelCount)

◆ setChannels()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.setChannels ( ArrayList< PIDChannel channels)

Sets the channels.

Parameters
channelsthe new channels

Definition at line 248 of file AbstractPidNamespaceImp.java.

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

Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.setChannels().

◆ setDevice()

void com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.setDevice ( BowlerAbstractDevice  device)

◆ SetPIDInterpolatedVelocity()

boolean com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.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.

Parameters
groupthe index of the PID group
unitsPerSeconda velocity in raw units per second
secondsthe amount of time to run at this velocity
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 90 of file AbstractPidNamespaceImp.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.GetCachedPosition(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPIDSetPoint().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.SetPDVelocity(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPIDInterpolatedVelocity().

Here is the call graph for this function:

Member Data Documentation

◆ channelCount

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

◆ channels

ArrayList<PIDChannel> com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.channels = null
protected

◆ device

BowlerAbstractDevice com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.device
private

◆ lastPacketTime

long [] com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.lastPacketTime = null
protected

◆ PIDEventListeners

ArrayList<IPIDEventListener> com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.PIDEventListeners = new ArrayList<IPIDEventListener>()
private

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