All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zaber.motion.FirmwareVersion Maven / Gradle / Ivy

Go to download

A library that aims to provide easy-to-use API for communication with Zaber devices using Zaber ASCII Protocol.

There is a newer version: 6.7.0
Show newest version
// ===== 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy