
com.neuronrobotics.sdk.namespace.bcs.pid.PidDeviceServerNamespace Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-bowler Show documentation
Show all versions of java-bowler Show documentation
A command line utility for accesing the bowler framework.
The newest version!
package com.neuronrobotics.sdk.namespace.bcs.pid;
import com.neuronrobotics.sdk.common.BowlerDataType;
import com.neuronrobotics.sdk.common.BowlerMethod;
import com.neuronrobotics.sdk.common.Log;
import com.neuronrobotics.sdk.common.MACAddress;
import com.neuronrobotics.sdk.common.RpcEncapsulation;
import com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServerNamespace;
import com.neuronrobotics.sdk.common.device.server.IBowlerCommandProcessor;
import com.neuronrobotics.sdk.pid.IPIDEventListener;
import com.neuronrobotics.sdk.pid.PDVelocityConfiguration;
import com.neuronrobotics.sdk.pid.PIDChannel;
import com.neuronrobotics.sdk.pid.PIDCommandException;
import com.neuronrobotics.sdk.pid.PIDConfiguration;
// TODO: Auto-generated Javadoc
/**
* The Class PidDeviceServerNamespace.
*/
public class PidDeviceServerNamespace extends BowlerAbstractDeviceServerNamespace implements IPidControlNamespace {
/** The device. */
private IPidControlNamespace device;
/**
* Instantiates a new pid device server namespace.
*
* @param addr the addr
* @param device the device
*/
public PidDeviceServerNamespace(MACAddress addr,IPidControlNamespace device ) {
super(addr, "bcs.pid.*;1.0;;");
this.device = device;
rpc.add(new RpcEncapsulation(getNamespaceIndex(),
getNamespace() ,
"apid",
BowlerMethod.GET,
new BowlerDataType[]{},
BowlerMethod.POST,
new BowlerDataType[]{BowlerDataType.I32STR},
new IBowlerCommandProcessor() {
@Override
public Object[] process(Object[] data) {
int [] current = GetAllPIDPosition();
Integer [] d = new Integer[current.length];
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy