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

zaber.motion.ascii.AxisIdentity 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.ascii;

import zaber.motion.protobufs.Main;

/**
 * Representation of data gathered during axis identification.
 */
public final class AxisIdentity {

    private int peripheralId;

    /**
     * Unique ID of the peripheral hardware.
     */
    public void setPeripheralId(int peripheralId) {
        this.peripheralId = peripheralId;
    }

    /**
     * @return Unique ID of the peripheral hardware.
     */
    public int getPeripheralId() {
        return this.peripheralId;
    }

    private String peripheralName;

    /**
     * Name of the peripheral.
     */
    public void setPeripheralName(String peripheralName) {
        this.peripheralName = peripheralName;
    }

    /**
     * @return Name of the peripheral.
     */
    public String getPeripheralName() {
        return this.peripheralName;
    }

    private boolean isPeripheral;

    /**
     * Indicates whether the axis is a peripheral or part of an integrated device.
     */
    public void setIsPeripheral(boolean isPeripheral) {
        this.isPeripheral = isPeripheral;
    }

    /**
     * @return Indicates whether the axis is a peripheral or part of an integrated device.
     */
    public boolean getIsPeripheral() {
        return this.isPeripheral;
    }

    private AxisType axisType;

    /**
     * Determines the type of an axis and units it accepts.
     */
    public void setAxisType(AxisType axisType) {
        this.axisType = axisType;
    }

    /**
     * @return Determines the type of an axis and units it accepts.
     */
    public AxisType getAxisType() {
        return this.axisType;
    }

    private boolean isModified;

    /**
     * The peripheral has hardware modifications.
     */
    public void setIsModified(boolean isModified) {
        this.isModified = isModified;
    }

    /**
     * @return The peripheral has hardware modifications.
     */
    public boolean getIsModified() {
        return this.isModified;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("AxisIdentity { ");
        sb.append("peripheralId: ");
        sb.append(this.peripheralId);
        sb.append(", ");
        sb.append("peripheralName: ");
        sb.append(this.peripheralName);
        sb.append(", ");
        sb.append("isPeripheral: ");
        sb.append(this.isPeripheral);
        sb.append(", ");
        sb.append("axisType: ");
        sb.append(this.axisType);
        sb.append(", ");
        sb.append("isModified: ");
        sb.append(this.isModified);
        sb.append(" }");
        return sb.toString();
    }

    public static AxisIdentity fromProtobuf(Main.AxisIdentity pbData) {
        AxisIdentity obj = new AxisIdentity();
        obj.setPeripheralId(pbData.getPeripheralId());
        obj.setPeripheralName(pbData.getPeripheralName());
        obj.setIsPeripheral(pbData.getIsPeripheral());
        obj.setAxisType(AxisType.valueOf(pbData.getAxisType().getNumber()));
        obj.setIsModified(pbData.getIsModified());
        return obj;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy