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

Public Member Functions

 PidDeviceServerNamespace (MACAddress addr, IPidControlNamespace device)
 
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 ()
 
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 ()
 
boolean isAvailable ()
 
- Public Member Functions inherited from com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace
 BowlerAbstractDeviceServerNamespace (MACAddress addr, String namespaceString)
 
boolean checkRpc (BowlerDatagram data)
 
String getNamespace ()
 
ArrayList< RpcEncapsulationgetRpcList ()
 
void addRpc (RpcEncapsulation newRpc)
 
MACAddress getAddress ()
 
BowlerDatagram process (BowlerDatagram data)
 
int getNamespaceIndex ()
 
void setNamespaceIndex (int ns)
 

Private Attributes

IPidControlNamespace device
 

Additional Inherited Members

- Protected Attributes inherited from com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace
ArrayList< RpcEncapsulationrpc =new ArrayList<RpcEncapsulation>()
 
final String ns
 

Detailed Description

The Class PidDeviceServerNamespace.

Definition at line 21 of file PidDeviceServerNamespace.java.

Constructor & Destructor Documentation

◆ PidDeviceServerNamespace()

com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace ( MACAddress  addr,
IPidControlNamespace  device 
)

Instantiates a new pid device server namespace.

Parameters
addrthe addr
devicethe device

Definition at line 32 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ConfigurePDVelovityController(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ConfigurePIDController(), com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, com.neuronrobotics.sdk.common.BowlerDataType.FIXED100, com.neuronrobotics.sdk.common.BowlerDataType.FIXED1k, com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.GetAllPIDPosition(), com.neuronrobotics.sdk.pid.PDVelocityConfiguration.getArgs(), com.neuronrobotics.sdk.pid.PIDConfiguration.getArgs(), com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace.getNamespace(), com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace.getNamespaceIndex(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPDVelocityConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPIDChannelCount(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPIDConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.GetPIDPosition(), com.neuronrobotics.sdk.common.BowlerDataType.I08, com.neuronrobotics.sdk.common.BowlerDataType.I32, com.neuronrobotics.sdk.common.BowlerDataType.I32STR, com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.killAllPidGroups(), com.neuronrobotics.sdk.common.BowlerMethod.POST, com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace.process(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ResetPIDChannel(), com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace.rpc, com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetAllPIDSetPoint(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetPDVelocity(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetPIDSetPoint(), and com.neuronrobotics.sdk.common.BowlerMethod.STATUS.

Here is the call graph for this function:

Member Function Documentation

◆ addPIDEventListener()

void com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 393 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.addPIDEventListener(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device.

Here is the call graph for this function:

◆ ConfigurePDVelovityController()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ConfigurePDVelovityController(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device.

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ ConfigurePIDController()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ConfigurePIDController(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device.

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ flushPIDChannels()

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

Definition at line 409 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.flushPIDChannels().

Here is the call graph for this function:

◆ GetAllPIDPosition()

float [] com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 385 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.GetAllPIDPosition().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ getPDVelocityConfiguration()

PDVelocityConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 345 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.getPDVelocityConfiguration().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ getPIDChannel()

PIDChannel com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 435 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.getPIDChannel().

Here is the call graph for this function:

◆ getPIDChannelCount()

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

◆ getPIDConfiguration()

PIDConfiguration com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 329 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.getPIDConfiguration().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ GetPIDPosition()

float com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.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 377 of file PidDeviceServerNamespace.java.

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.GetPIDPosition().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ isAvailable()

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

◆ killAllPidGroups()

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

◆ removePIDEventListener()

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

◆ ResetPIDChannel()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.ResetPIDChannel().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ SetAllPIDSetPoint()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetAllPIDSetPoint().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ SetPDVelocity()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPDVelocity().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

◆ SetPIDInterpolatedVelocity()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPIDInterpolatedVelocity().

Here is the call graph for this function:

◆ SetPIDSetPoint()

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

References com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device, and com.neuronrobotics.sdk.namespace.bcs.pid.IPidControlNamespace.SetPIDSetPoint().

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace().

Here is the call graph for this function:

Member Data Documentation

◆ device

IPidControlNamespace com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.device
private

The device.

Definition at line 24 of file PidDeviceServerNamespace.java.

Referenced by com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.addPIDEventListener(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ConfigurePDVelovityController(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ConfigurePIDController(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.flushPIDChannels(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.GetAllPIDPosition(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPDVelocityConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPIDChannel(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPIDChannelCount(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.getPIDConfiguration(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.GetPIDPosition(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.killAllPidGroups(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.PidDeviceServerNamespace(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.removePIDEventListener(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.ResetPIDChannel(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetAllPIDSetPoint(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetPDVelocity(), com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetPIDInterpolatedVelocity(), and com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace.SetPIDSetPoint().


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