zaber.motion.exceptions.DeviceAddressConflictException 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.exceptions;
import zaber.motion.protobufs.Main;
import com.google.protobuf.InvalidProtocolBufferException;
/**
* Thrown when there is a conflict in device numbers preventing unique addressing.
*/
public class DeviceAddressConflictException extends MotionLibException {
private DeviceAddressConflictExceptionData details;
/**
* @return Additional data for DeviceAddressConflictException
*/
public DeviceAddressConflictExceptionData getDetails() {
return this.details;
}
public DeviceAddressConflictException(String message, byte[] customData) {
super(message);
try {
Main.DeviceAddressConflictExceptionData protobufObj = Main.DeviceAddressConflictExceptionData.parser().parseFrom(customData);
this.details = DeviceAddressConflictExceptionData.fromProtobuf(protobufObj);
} catch (InvalidProtocolBufferException e) {
throw new LibraryIntegrationException("Could not parse custom data for DeviceAddressConflictException", e);
}
}
public DeviceAddressConflictException(String message, DeviceAddressConflictExceptionData customData) {
super(message);
this.details = customData;
}
}