zaber.motion.FirmwareVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of motion-library Show documentation
Show all versions of motion-library Show documentation
A library that aims to provide easy-to-use API for communication with Zaber devices using Zaber ASCII Protocol.
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
// ============== DO NOT EDIT DIRECTLY ============== //
package zaber.motion;
import zaber.motion.protobufs.Main;
/**
* Class representing version of firmware in the controller.
*/
public final class FirmwareVersion {
private int major;
/**
* Major version number.
*/
public void setMajor(int major) {
this.major = major;
}
/**
* @return Major version number.
*/
public int getMajor() {
return this.major;
}
private int minor;
/**
* Minor version number.
*/
public void setMinor(int minor) {
this.minor = minor;
}
/**
* @return Minor version number.
*/
public int getMinor() {
return this.minor;
}
private int build;
/**
* Build version number.
*/
public void setBuild(int build) {
this.build = build;
}
/**
* @return Build version number.
*/
public int getBuild() {
return this.build;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("FirmwareVersion { ");
sb.append("major: ");
sb.append(this.major);
sb.append(", ");
sb.append("minor: ");
sb.append(this.minor);
sb.append(", ");
sb.append("build: ");
sb.append(this.build);
sb.append(" }");
return sb.toString();
}
public static FirmwareVersion fromProtobuf(Main.FirmwareVersion pbData) {
FirmwareVersion obj = new FirmwareVersion();
obj.setMajor(pbData.getMajor());
obj.setMinor(pbData.getMinor());
obj.setBuild(pbData.getBuild());
return obj;
}
}