BowlerKernel
|
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< PIDChannel > | getChannels () |
void | setChannels (ArrayList< PIDChannel > channels) |
AbstractPidNamespaceImp | getImplementation () |
void | setImplementation (AbstractPidNamespaceImp implementation) |
boolean | runOutputHysteresisCalibration (int group) |
void | flush (double seconds) |
![]() | |
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< ByteList > | getRevisions () |
ArrayList< String > | getNamespaces () |
boolean | hasNamespace (String string) |
void | startHeartBeat () |
void | startHeartBeat (long msHeartBeatTime) |
void | stopHeartBeat () |
void | setThreadedUpstreamPackets (boolean up) |
ArrayList< RpcEncapsulation > | getRpcList (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< IDeviceConnectionEventListener > | getDisconnectListeners () |
![]() | |
boolean | isAvailable () |
Protected Member Functions | |
void | firePIDResetEvent (int group, float val) |
void | firePIDEvent (PIDEvent pidEvent) |
![]() | |
void | fireDisconnectEvent () |
void | fireConnectEvent () |
Private Member Functions | |
void | init () |
Private Attributes | |
boolean | isInit =false |
AbstractPidNamespaceImp | implementation |
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.
Definition at line 23 of file GenericPIDDevice.java.
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().
com.neuronrobotics.sdk.pid.GenericPIDDevice.GenericPIDDevice | ( | BowlerAbstractConnection | connection | ) |
Instantiates a new generic pid device.
connection | the 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().
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.
l | the 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().
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.
config | the configuration wrapper object |
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().
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.
config | the configuration wrapper object |
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().
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
InvalidConnectionException | the 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().
|
protected |
Fire pid event.
pidEvent | the 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().
|
protected |
Fire pid reset event.
group | the group |
val | the 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().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.flush | ( | double | seconds | ) |
This interface says the device can cache values and flush them in one push
seconds | the 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().
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.
time | the 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().
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.
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().
ArrayList<PIDChannel> com.neuronrobotics.sdk.pid.GenericPIDDevice.getChannels | ( | ) |
Gets the channels.
Definition at line 263 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getChannels(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation().
Referenced by com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.flushPIDChannels(), and com.neuronrobotics.sdk.pid.VirtualGenericPIDDevice.GetAllPIDPosition().
AbstractPidNamespaceImp com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation | ( | ) |
Gets 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().
int com.neuronrobotics.sdk.pid.GenericPIDDevice.getNumberOfChannels | ( | ) |
Gets the number of channels.
Definition at line 137 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount().
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.
group | the index of the PID group |
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().
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.
group | the index of the PID group |
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().
int com.neuronrobotics.sdk.pid.GenericPIDDevice.getPIDChannelCount | ( | ) |
Requests the current number of PID channels.
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 127 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.getNumberOfChannels().
Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.getNumberOfChannels(), and com.neuronrobotics.sdk.dyio.DyIO.getPIDChannelCount().
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.
group | the index of the PID group |
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().
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
group | the index of the PID group |
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().
|
private |
Inits the.
Definition at line 73 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.isInit.
Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.connect(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection().
boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.killAllPidGroups | ( | ) |
Sends a single packet to stop all PID groups at once.
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().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.onAsyncResponse | ( | BowlerDatagram | data | ) |
On async response.
data | the data |
Implements com.neuronrobotics.sdk.common.IBowlerDatagramListener.
Definition at line 235 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.onAsyncResponse().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.removePIDEventListener | ( | IPIDEventListener | l | ) |
Removes a specific IPIDEventListener.
l | the l |
Implements com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.
Definition at line 185 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.namespace.bcs.pid.AbstractPidNamespaceImp.removePIDEventListener().
Referenced by com.neuronrobotics.sdk.dyio.DyIO.removePIDEventListener().
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)
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.
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().
boolean com.neuronrobotics.sdk.pid.GenericPIDDevice.runOutputHysteresisCalibration | ( | int | group | ) |
Run output hysteresis calibration.
group | the group |
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().
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.
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.
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().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.setChannels | ( | ArrayList< PIDChannel > | channels | ) |
Sets the channels.
channels | the 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().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.setConnection | ( | BowlerAbstractConnection | connection | ) |
Sets the connection.
connection | the new connection |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractDevice.
Definition at line 52 of file GenericPIDDevice.java.
References com.neuronrobotics.sdk.common.BowlerAbstractDevice.connection, com.neuronrobotics.sdk.pid.GenericPIDDevice.init(), and com.neuronrobotics.sdk.common.BowlerAbstractConnection.isConnected().
Referenced by com.neuronrobotics.sdk.common.DeviceManager.addConnection(), com.neuronrobotics.sdk.dyio.DyIO.connect(), com.neuronrobotics.sdk.dyio.DyIO.DyIO(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.GenericPIDDevice().
void com.neuronrobotics.sdk.pid.GenericPIDDevice.setImplementation | ( | AbstractPidNamespaceImp | implementation | ) |
Sets the implementation.
implementation | the 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().
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.
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.
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().
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.
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 |
PIDCommandException | If 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().
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
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.
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().
|
private |
The implementation.
Definition at line 29 of file GenericPIDDevice.java.
Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.getImplementation(), and com.neuronrobotics.sdk.pid.GenericPIDDevice.setImplementation().
|
private |
The is init.
Definition at line 26 of file GenericPIDDevice.java.
Referenced by com.neuronrobotics.sdk.pid.GenericPIDDevice.init().