org.bidib.wizard.api.model.function.ServoMoveQueryFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-api Show documentation
Show all versions of bidibwizard-api Show documentation
jBiDiB BiDiB Wizard API POM
package org.bidib.wizard.api.model.function;
import org.bidib.jbidibc.exchange.lcmacro.LcMacroPointType;
import org.bidib.jbidibc.exchange.lcmacro.ServoMoveQueryPoint;
import org.bidib.wizard.model.ports.ServoPort;
import org.bidib.wizard.model.status.BidibStatus;
public class ServoMoveQueryFunction extends SystemFunction implements PortAware {
private ServoPort port;
public ServoMoveQueryFunction() {
this(null);
}
public ServoMoveQueryFunction(ServoPort port) {
super(null, KEY_SERVO_MOVE_QUERY);
this.port = port;
}
public ServoPort getPort() {
return port;
}
public void setPort(ServoPort port) {
this.port = port;
}
public String getDebugString() {
int id = 0;
if (getPort() != null) {
id = getPort().getId();
}
return "ServoModeQuery, Port=" + id;
}
@Override
public LcMacroPointType toLcMacroPoint() {
// prepare macro point
ServoMoveQueryPoint servoMoveQueryPoint = new ServoMoveQueryPoint().withOutputNumber(getPort().getId());
return servoMoveQueryPoint;
}
}