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

zaber.motion.exceptions.StreamMovementFailedException 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.exceptions;

import zaber.motion.protobufs.Main;
import com.google.protobuf.InvalidProtocolBufferException;

/**
 * Thrown when a device registers a fault during streamed movement.
 */
public class StreamMovementFailedException extends MotionLibException {
    private StreamMovementFailedExceptionData details;

    /**
     * @return Additional data for StreamMovementFailedException
     */
    public StreamMovementFailedExceptionData getDetails() {
        return this.details;
    }

    public StreamMovementFailedException(String message, byte[] customData) {
        super(message);

        try {
            Main.StreamMovementFailedExceptionData protobufObj = Main.StreamMovementFailedExceptionData.parser().parseFrom(customData);
            this.details = StreamMovementFailedExceptionData.fromProtobuf(protobufObj);
        } catch (InvalidProtocolBufferException e) {
            throw new LibraryIntegrationException("Could not parse custom data for StreamMovementFailedException", e);
        }
    }

    public StreamMovementFailedException(String message, StreamMovementFailedExceptionData customData) {
        super(message);

        this.details = customData;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy