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

Public Member Functions

 GenericPIDDevice ()
 
 GenericPIDDevice (BowlerAbstractConnection connection)
 
void setConnection (BowlerAbstractConnection connection)
 
boolean connect ()
 
boolean ResetPIDChannel (int group, float valueToSetCurrentTo)
 
boolean ConfigurePIDController (PIDConfiguration config)
 
PIDConfiguration getPIDConfiguration (int group)
 
boolean ConfigurePDVelovityController (PDVelocityConfiguration config)
 
PDVelocityConfiguration getPDVelocityConfiguration (int group)
 
int getPIDChannelCount ()
 
int getNumberOfChannels ()
 
boolean SetPIDSetPoint (int group, float setpoint, double seconds)
 
boolean SetAllPIDSetPoint (float[] setpoints, double seconds)
 
float GetPIDPosition (int group)
 
float[] GetAllPIDPosition ()
 
void addPIDEventListener (IPIDEventListener l)
 
void removePIDEventListener (IPIDEventListener l)
 
void flushPIDChannels (double time)
 
boolean SetPIDInterpolatedVelocity (int group, int unitsPerSecond, double seconds) throws PIDCommandException
 
boolean SetPDVelocity (int group, int unitsPerSecond, double seconds) throws PIDCommandException
 
PIDChannel getPIDChannel (int group)
 
boolean killAllPidGroups ()
 
void onAsyncResponse (BowlerDatagram data)
 
ArrayList< PIDChannelgetChannels ()
 
void setChannels (ArrayList< PIDChannel > channels)
 
AbstractPidNamespaceImp getImplementation ()
 
void setImplementation (AbstractPidNamespaceImp implementation)
 
boolean runOutputHysteresisCalibration (int group)
 
void flush (double seconds)
 
- Public Member Functions inherited from com.neuronrobotics.sdk.common.BowlerAbstractDevice
boolean isAvailable () throws InvalidConnectionException
 
void addConnectionEventListener (final IDeviceConnectionEventListener l)
 
void removeConnectionEventListener (IDeviceConnectionEventListener l)
 
void disconnect ()
 
BowlerAbstractConnection getConnection ()
 
void setAddress (MACAddress address)
 
MACAddress getAddress ()
 
BowlerDatagram send (BowlerAbstractCommand command) throws NoConnectionAvailableException, InvalidResponseException
 
BowlerDatagram send (BowlerAbstractCommand command, int retry) throws NoConnectionAvailableException, InvalidResponseException
 
Object[] send (String namespace, BowlerMethod method, String rpcString, Object[] arguments, int retry) throws DeviceConnectionException
 
Object[] send (String namespace, BowlerMethod method, String rpcString, Object[] arguments) throws DeviceConnectionException
 
boolean ping ()
 
boolean ping (boolean switchParser)
 
ArrayList< ByteListgetRevisions ()
 
ArrayList< String > getNamespaces ()
 
boolean hasNamespace (String string)
 
void startHeartBeat ()
 
void startHeartBeat (long msHeartBeatTime)
 
void stopHeartBeat ()
 
void setThreadedUpstreamPackets (boolean up)
 
ArrayList< RpcEncapsulationgetRpcList (String namespace)
 
void loadRpcList ()
 
void onAllResponse (BowlerDatagram data)
 
boolean isKeepAlive ()
 
void setKeepAlive (boolean keepAlive)
 
long getLastPacketTime ()
 
void setLastPacketTime (long lastPacketTime)
 
String getScriptingName ()
 
void setScriptingName (String scriptingName)
 
ArrayList< IDeviceConnectionEventListenergetDisconnectListeners ()
 
- Public Member Functions inherited from com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace
boolean isAvailable ()
 

Protected Member Functions

void firePIDResetEvent (int group, float val)
 
void firePIDEvent (PIDEvent pidEvent)
 
- Protected Member Functions inherited from com.neuronrobotics.sdk.common.BowlerAbstractDevice
void fireDisconnectEvent ()
 
void fireConnectEvent ()
 

Private Member Functions

void init ()
 

Private Attributes

boolean isInit =false
 
AbstractPidNamespaceImp implementation
 

Detailed Description

This class is a generic implementation of the PID system. This can be used as a template, superclass or internal object class for use with and device that implements the IPIDControl interface.

Author
hephaestus

Definition at line 23 of file GenericPIDDevice.java.

Constructor & Destructor Documentation

◆ GenericPIDDevice() [1/2]

com.neuronrobotics.sdk.pid.GenericPIDDevice.GenericPIDDevice ( )

Instantiates a new generic pid device.

Definition at line 34 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.common.MACAddress.BROADCAST, and com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress().

Here is the call graph for this function:

◆ GenericPIDDevice() [2/2]

com.neuronrobotics.sdk.pid.GenericPIDDevice.GenericPIDDevice ( BowlerAbstractConnection  connection)

Instantiates a new generic pid device.

Parameters
connectionthe connection

Definition at line 43 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.common.MACAddress.BROADCAST, com.neuronrobotics.sdk.common.BowlerAbstractDevice.connection, com.neuronrobotics.sdk.common.BowlerAbstractDevice.setAddress(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection().

Here is the call graph for this function:

Member Function Documentation

◆ addPIDEventListener()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.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 177 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.addPIDEventListener(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.addPIDEventListener().

Here is the call graph for this function:

◆ ConfigurePDVelovityController()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 111 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ConfigurePDVelovityController(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.ConfigurePDVelovityController().

Here is the call graph for this function:

◆ ConfigurePIDController()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 95 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ConfigurePIDController(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.ConfigurePIDController().

Here is the call graph for this function:

◆ connect()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.connect ( )

This method tells the connection object to start and connects the up and down streams pipes. Once this method is called and returns without exception, the device is ready to communicate with

Returns
true, if successful
Exceptions
InvalidConnectionExceptionthe invalid connection exception

Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 62 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.init().

Referenced by com.neuronrobotics.sdk.common.DeviceManager.addConnection(), and com.neuronrobotics.sdk.dyio.DyIO.connect().

Here is the call graph for this function:

◆ firePIDEvent()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.firePIDEvent ( PIDEvent  pidEvent)
protected

Fire pid event.

Parameters
pidEventthe pid event

Definition at line 254 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDEvent(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.SyncThread.run().

Here is the call graph for this function:

◆ firePIDResetEvent()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.firePIDResetEvent ( int  group,
float  val 
)
protected

Fire pid reset event.

Parameters
groupthe group
valthe val

Definition at line 245 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.firePIDResetEvent(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.ResetPIDChannel().

Here is the call graph for this function:

◆ flush()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.flush ( double  seconds)

This interface says the device can cache values and flush them in one push

Parameters
secondsthe duration of the flush, from current position and time to cached positions in this many seconds

Implements com.neuronrobotics.sdk.common.IFlushable.

Definition at line 326 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.flushPIDChannels().

Here is the call graph for this function:

◆ flushPIDChannels()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.flushPIDChannels ( double  time)

This method will read all of the cached or current setpoints for all PID controllers and calls SetAllPIDSetPoint with its internal data.

Parameters
timethe time

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

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 193 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.flushPIDChannels(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.flush(), and com.neuronrobotics.sdk.dyio.DyIO.flushPIDChannels().

Here is the call graph for this function:

◆ GetAllPIDPosition()

float [] com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 169 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.GetAllPIDPosition(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.GetAllPIDPosition().

Here is the call graph for this function:

◆ getChannels()

ArrayList<PIDChannel> com.neuronrobotics.sdk.pid.GenericPIDDevice.getChannels ( )

◆ getImplementation()

AbstractPidNamespaceImp com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation ( )

Gets the implementation.

Returns
the implementation

Definition at line 281 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.common.BowlerAbstractDevice.hasNamespace(), com.neuronrobotics.sdk.pid.GenericPIDDevice.implementation, and com.neuronrobotics.sdk.pid.GenericPIDDevice.setImplementation().

Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.addPIDEventListener(), com.neuronrobotics.sdk.pid.GenericPIDDevice.ConfigurePDVelovityController(), com.neuronrobotics.sdk.pid.GenericPIDDevice.ConfigurePIDController(), com.neuronrobotics.sdk.pid.GenericPIDDevice.firePIDEvent(), com.neuronrobotics.sdk.pid.GenericPIDDevice.firePIDResetEvent(), com.neuronrobotics.sdk.pid.GenericPIDDevice.flushPIDChannels(), com.neuronrobotics.sdk.pid.GenericPIDDevice.GetAllPIDPosition(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getChannels(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getPDVelocityConfiguration(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannel(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDConfiguration(), com.neuronrobotics.sdk.pid.GenericPIDDevice.GetPIDPosition(), com.neuronrobotics.sdk.pid.GenericPIDDevice.init(), com.neuronrobotics.sdk.pid.GenericPIDDevice.killAllPidGroups(), com.neuronrobotics.sdk.pid.GenericPIDDevice.onAsyncResponse(), com.neuronrobotics.sdk.pid.GenericPIDDevice.removePIDEventListener(), com.neuronrobotics.sdk.pid.GenericPIDDevice.ResetPIDChannel(), com.neuronrobotics.sdk.pid.GenericPIDDevice.runOutputHysteresisCalibration(), com.neuronrobotics.sdk.pid.GenericPIDDevice.SetAllPIDSetPoint(), com.neuronrobotics.sdk.pid.GenericPIDDevice.setChannels(), com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPDVelocity(), com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPIDInterpolatedVelocity(), com.neuronrobotics.sdk.pid.GenericPIDDevice.SetPIDSetPoint(), and com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.VirtualGenericPIDDevice().

Here is the call graph for this function:

◆ getNumberOfChannels()

int com.neuronrobotics.sdk.pid.GenericPIDDevice.getNumberOfChannels ( )

Gets the number of channels.

Returns
the number of channels

Definition at line 137 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount().

Here is the call graph for this function:

◆ getPDVelocityConfiguration()

PDVelocityConfiguration com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 119 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.getPDVelocityConfiguration().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.getPDVelocityConfiguration().

Here is the call graph for this function:

◆ getPIDChannel()

PIDChannel com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannel ( int  group)

Gets the PID channel wrapper for a specific channel. The channel wrappers can be used to cache values for use with the cache/flush system. This wrapper will encapsulate a specific PID channel.

Parameters
groupthe index of the PID group
Returns
a PIDChannel encapsulation object

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

Definition at line 219 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getPIDChannel().

Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.flushPIDChannels(), and com.neuronrobotics.sdk.dyio.DyIO.getPIDChannel().

Here is the call graph for this function:

◆ getPIDChannelCount()

int com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount ( )

◆ getPIDConfiguration()

PIDConfiguration com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 103 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.getPIDConfiguration().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.getPIDConfiguration().

Here is the call graph for this function:

◆ GetPIDPosition()

float com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 161 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.GetPIDPosition().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.GetPIDPosition().

Here is the call graph for this function:

◆ init()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.init ( )
private

◆ killAllPidGroups()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.killAllPidGroups ( )

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

Returns
true, if successful

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

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 227 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.killAllPidGroups().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.killAllPidGroups().

Here is the call graph for this function:

◆ onAsyncResponse()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.onAsyncResponse ( BowlerDatagram  data)

◆ removePIDEventListener()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.removePIDEventListener ( IPIDEventListener  l)

◆ ResetPIDChannel()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 87 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ResetPIDChannel().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.ResetPIDChannel().

Here is the call graph for this function:

◆ runOutputHysteresisCalibration()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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 315 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IExtendedPIDControl.runOutputHysteresisCalibration().

Here is the call graph for this function:

◆ SetAllPIDSetPoint()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 153 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetAllPIDSetPoint().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.SetAllPIDSetPoint().

Here is the call graph for this function:

◆ setChannels()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.setChannels ( ArrayList< PIDChannel channels)

Sets the channels.

Parameters
channelsthe new channels

Definition at line 272 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.setChannels().

Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.GetAllPIDPosition().

Here is the call graph for this function:

◆ setConnection()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection ( BowlerAbstractConnection  connection)

◆ setImplementation()

void com.neuronrobotics.sdk.pid.GenericPIDDevice.setImplementation ( AbstractPidNamespaceImp  implementation)

Sets the implementation.

Parameters
implementationthe new implementation

Definition at line 307 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.implementation.

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

◆ SetPDVelocity()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 210 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPDVelocity().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.SetPDVelocity().

Here is the call graph for this function:

◆ SetPIDInterpolatedVelocity()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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 201 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.SetPIDInterpolatedVelocity().

Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.SetPDVelocity(), and com.neuronrobotics.sdk.dyio.DyIO.SetPIDInterpolatedVelocity().

Here is the call graph for this function:

◆ SetPIDSetPoint()

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.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.

Reimplemented in com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.

Definition at line 145 of file GenericPIDDevice.java.

References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPIDSetPoint().

Referenced by com.neuronrobotics.sdk.dyio.DyIO.SetPIDSetPoint().

Here is the call graph for this function:

Member Data Documentation

◆ implementation

AbstractPidNamespaceImp com.neuronrobotics.sdk.pid.GenericPIDDevice.implementation
private

◆ isInit

boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.isInit =false
private

The is init.

Definition at line 26 of file GenericPIDDevice.java.

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


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