1 package com.neuronrobotics.sdk.namespace.bcs.pid;
3 import com.neuronrobotics.sdk.common.BowlerDataType;
4 import com.neuronrobotics.sdk.common.BowlerMethod;
5 import com.neuronrobotics.sdk.common.Log;
6 import com.neuronrobotics.sdk.common.MACAddress;
7 import com.neuronrobotics.sdk.common.RpcEncapsulation;
8 import com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace;
9 import com.neuronrobotics.sdk.common.device.server.IBowlerCommandProcessor;
10 import com.neuronrobotics.sdk.pid.IPIDEventListener;
11 import com.neuronrobotics.sdk.pid.PDVelocityConfiguration;
12 import com.neuronrobotics.sdk.pid.PIDChannel;
13 import com.neuronrobotics.sdk.pid.PIDCommandException;
14 import com.neuronrobotics.sdk.pid.PIDConfiguration;
33 super(addr,
"bcs.pid.*;1.0;;");
44 public Object[]
process(Object[] data) {
46 Integer [] d =
new Integer[current.length];
47 for(
int i=0;i<current.length;i++){
48 d[i]=
new Integer((
int)current[i]);
50 return new Object[]{d};
66 public Object[]
process(Object[] data) {
68 return new Object[]{data[0],
new Integer((
int)
GetPIDPosition((Integer) data[0]))};
96 public Object[]
process(Object[] data) {
112 public Object[]
process(Object[] data) {
126 public Object[]
process(Object[] data) {
143 public Object[]
process(Object[] data) {
144 Integer time = (Integer)data[0];
145 Integer [] d = (Integer [])data[1];
146 float [] current =
new float[d.length];
147 for(
int i=0;i<current.length;i++){
151 return new Object[]{
new Integer(66),
new Integer(3)};
168 public Object[]
process(Object[] data) {
173 return new Object[]{data[0],
new Integer(5)};
190 public Object[]
process(Object[] data) {
198 return new Object[]{data[0],
new Integer(66)};
201 return new Object[]{data[0],
new Integer(4)};
217 public Object[]
process(Object[] data) {
219 return new Object[]{data[0],
new Integer(6)};
233 public Object[]
process(Object[] data) {
235 return new Object[]{
new Integer(66),
new Integer(0)};
262 public Object[]
process(Object[] data) {
266 return new Object[]{data[0],
new Integer(1)};
283 public Object[]
process(Object[] data) {
287 return new Object[]{data[0],
new Integer(2)};
static void info(String message)
BowlerDatagram process(BowlerDatagram data)
ArrayList< RpcEncapsulation > rpc
boolean ConfigurePIDController(PIDConfiguration config)
PDVelocityConfiguration getPDVelocityConfiguration(int group)
PIDConfiguration getPIDConfiguration(int group)
boolean killAllPidGroups()
boolean SetPDVelocity(int group, int unitsPerSecond, double seconds)
boolean SetPIDSetPoint(int group, float setpoint, double seconds)
boolean SetAllPIDSetPoint(float[] setpoints, double seconds)
PIDChannel getPIDChannel(int group)
IPidControlNamespace device
boolean ResetPIDChannel(int group, float valueToSetCurrentTo)
boolean ConfigurePDVelovityController(PDVelocityConfiguration config)
float GetPIDPosition(int group)
void flushPIDChannels(double time)
void removePIDEventListener(IPIDEventListener l)
float[] GetAllPIDPosition()
PidDeviceServerNamespace(MACAddress addr, IPidControlNamespace device)
void addPIDEventListener(IPIDEventListener l)
boolean SetPIDInterpolatedVelocity(int group, int unitsPerSecond, double seconds)
float[] GetAllPIDPosition()
boolean ConfigurePIDController(PIDConfiguration config)
boolean ConfigurePDVelovityController(PDVelocityConfiguration config)
PIDChannel getPIDChannel(int group)
void flushPIDChannels(double time)
boolean SetAllPIDSetPoint(float[]setpoints, double seconds)
boolean SetPIDSetPoint(int group, float setpoint, double seconds)
PDVelocityConfiguration getPDVelocityConfiguration(int group)
void addPIDEventListener(IPIDEventListener l)
PIDConfiguration getPIDConfiguration(int group)
float GetPIDPosition(int group)
void removePIDEventListener(IPIDEventListener l)
boolean SetPDVelocity(int group, int unitsPerSecond, double seconds)
boolean ResetPIDChannel(int group, float valueToSetCurrentTo)
boolean killAllPidGroups()
boolean SetPIDInterpolatedVelocity(int group, int unitsPerSecond, double seconds)