// Generated by the protocol buffer compiler. DO NOT EDIT! // source: cmvr/msgs/can_card_parameter.proto package cmvr.msgs; public final class CanCardParameter { private CanCardParameter() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } public interface CANCardParameterOrBuilder extends // @@protoc_insertion_point(interface_extends:cmvr.msgs.CANCardParameter) com.google.protobuf.MessageOrBuilder { /** *
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return Whether the brand field is set.
*/
boolean hasBrand();
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The enum numeric value on the wire for brand.
*/
int getBrandValue();
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The brand.
*/
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand getBrand();
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return Whether the type field is set.
*/
boolean hasType();
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The type.
*/
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType getType();
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return Whether the channelId field is set.
*/
boolean hasChannelId();
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The enum numeric value on the wire for channelId.
*/
int getChannelIdValue();
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The channelId.
*/
cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId getChannelId();
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return Whether the interface field is set.
*/
boolean hasInterface();
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The enum numeric value on the wire for interface.
*/
int getInterfaceValue();
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The interface.
*/
cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface getInterface();
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return Whether the numPorts field is set.
*/
boolean hasNumPorts();
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return The numPorts.
*/
int getNumPorts();
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return Whether the baudrate field is set.
*/
boolean hasBaudrate();
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The enum numeric value on the wire for baudrate.
*/
int getBaudrateValue();
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The baudrate.
*/
cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE getBaudrate();
}
/**
* Protobuf type {@code cmvr.msgs.CANCardParameter}
*/
public static final class CANCardParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cmvr.msgs.CANCardParameter)
CANCardParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use CANCardParameter.newBuilder() to construct.
private CANCardParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CANCardParameter() {
brand_ = 0;
type_ = 0;
channelId_ = 0;
interface_ = 0;
baudrate_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CANCardParameter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return cmvr.msgs.CanCardParameter.internal_static_cmvr_msgs_CANCardParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cmvr.msgs.CanCardParameter.internal_static_cmvr_msgs_CANCardParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cmvr.msgs.CanCardParameter.CANCardParameter.class, cmvr.msgs.CanCardParameter.CANCardParameter.Builder.class);
}
/**
* Protobuf enum {@code cmvr.msgs.CANCardParameter.CANCardBrand}
*/
public enum CANCardBrand
implements com.google.protobuf.ProtocolMessageEnum {
/**
* FAKE_CAN = 0;
*/
FAKE_CAN(0),
/**
* ESD_CAN = 1;
*/
ESD_CAN(1),
/**
* SOCKET_CAN_RAW = 2;
*/
SOCKET_CAN_RAW(2),
/**
* HERMES_CAN = 3;
*/
HERMES_CAN(3),
UNRECOGNIZED(-1),
;
/**
* FAKE_CAN = 0;
*/
public static final int FAKE_CAN_VALUE = 0;
/**
* ESD_CAN = 1;
*/
public static final int ESD_CAN_VALUE = 1;
/**
* SOCKET_CAN_RAW = 2;
*/
public static final int SOCKET_CAN_RAW_VALUE = 2;
/**
* HERMES_CAN = 3;
*/
public static final int HERMES_CAN_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CANCardBrand valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CANCardBrand forNumber(int value) {
switch (value) {
case 0: return FAKE_CAN;
case 1: return ESD_CAN;
case 2: return SOCKET_CAN_RAW;
case 3: return HERMES_CAN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapPCI_CARD = 0;
*/
PCI_CARD(0),
/**
* USB_CARD = 1;
*/
USB_CARD(1),
UNRECOGNIZED(-1),
;
/**
* PCI_CARD = 0;
*/
public static final int PCI_CARD_VALUE = 0;
/**
* USB_CARD = 1;
*/
public static final int USB_CARD_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CANCardType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CANCardType forNumber(int value) {
switch (value) {
case 0: return PCI_CARD;
case 1: return USB_CARD;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapCHANNEL_ID_ZERO = 0;
*/
CHANNEL_ID_ZERO(0),
/**
* CHANNEL_ID_ONE = 1;
*/
CHANNEL_ID_ONE(1),
/**
* CHANNEL_ID_TWO = 2;
*/
CHANNEL_ID_TWO(2),
/**
* CHANNEL_ID_THREE = 3;
*/
CHANNEL_ID_THREE(3),
/**
* CHANNEL_ID_FOUR = 4;
*/
CHANNEL_ID_FOUR(4),
/**
* CHANNEL_ID_FIVE = 5;
*/
CHANNEL_ID_FIVE(5),
/**
* CHANNEL_ID_SIX = 6;
*/
CHANNEL_ID_SIX(6),
/**
* CHANNEL_ID_SEVEN = 7;
*/
CHANNEL_ID_SEVEN(7),
UNRECOGNIZED(-1),
;
/**
* CHANNEL_ID_ZERO = 0;
*/
public static final int CHANNEL_ID_ZERO_VALUE = 0;
/**
* CHANNEL_ID_ONE = 1;
*/
public static final int CHANNEL_ID_ONE_VALUE = 1;
/**
* CHANNEL_ID_TWO = 2;
*/
public static final int CHANNEL_ID_TWO_VALUE = 2;
/**
* CHANNEL_ID_THREE = 3;
*/
public static final int CHANNEL_ID_THREE_VALUE = 3;
/**
* CHANNEL_ID_FOUR = 4;
*/
public static final int CHANNEL_ID_FOUR_VALUE = 4;
/**
* CHANNEL_ID_FIVE = 5;
*/
public static final int CHANNEL_ID_FIVE_VALUE = 5;
/**
* CHANNEL_ID_SIX = 6;
*/
public static final int CHANNEL_ID_SIX_VALUE = 6;
/**
* CHANNEL_ID_SEVEN = 7;
*/
public static final int CHANNEL_ID_SEVEN_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CANChannelId valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CANChannelId forNumber(int value) {
switch (value) {
case 0: return CHANNEL_ID_ZERO;
case 1: return CHANNEL_ID_ONE;
case 2: return CHANNEL_ID_TWO;
case 3: return CHANNEL_ID_THREE;
case 4: return CHANNEL_ID_FOUR;
case 5: return CHANNEL_ID_FIVE;
case 6: return CHANNEL_ID_SIX;
case 7: return CHANNEL_ID_SEVEN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapNATIVE = 0;
*/
NATIVE(0),
/**
* VIRTUAL = 1;
*/
VIRTUAL(1),
/**
* SLCAN = 2;
*/
SLCAN(2),
UNRECOGNIZED(-1),
;
/**
* NATIVE = 0;
*/
public static final int NATIVE_VALUE = 0;
/**
* VIRTUAL = 1;
*/
public static final int VIRTUAL_VALUE = 1;
/**
* SLCAN = 2;
*/
public static final int SLCAN_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CANInterface valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CANInterface forNumber(int value) {
switch (value) {
case 0: return NATIVE;
case 1: return VIRTUAL;
case 2: return SLCAN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapBCAN_BAUDRATE_1M = 0;
*/
BCAN_BAUDRATE_1M(0),
/**
* BCAN_BAUDRATE_500K = 1;
*/
BCAN_BAUDRATE_500K(1),
/**
* BCAN_BAUDRATE_250K = 2;
*/
BCAN_BAUDRATE_250K(2),
/**
* BCAN_BAUDRATE_150K = 3;
*/
BCAN_BAUDRATE_150K(3),
/**
* BCAN_BAUDRATE_NUM = 4;
*/
BCAN_BAUDRATE_NUM(4),
UNRECOGNIZED(-1),
;
/**
* BCAN_BAUDRATE_1M = 0;
*/
public static final int BCAN_BAUDRATE_1M_VALUE = 0;
/**
* BCAN_BAUDRATE_500K = 1;
*/
public static final int BCAN_BAUDRATE_500K_VALUE = 1;
/**
* BCAN_BAUDRATE_250K = 2;
*/
public static final int BCAN_BAUDRATE_250K_VALUE = 2;
/**
* BCAN_BAUDRATE_150K = 3;
*/
public static final int BCAN_BAUDRATE_150K_VALUE = 3;
/**
* BCAN_BAUDRATE_NUM = 4;
*/
public static final int BCAN_BAUDRATE_NUM_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BAUDRATE valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BAUDRATE forNumber(int value) {
switch (value) {
case 0: return BCAN_BAUDRATE_1M;
case 1: return BCAN_BAUDRATE_500K;
case 2: return BCAN_BAUDRATE_250K;
case 3: return BCAN_BAUDRATE_150K;
case 4: return BCAN_BAUDRATE_NUM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return Whether the brand field is set.
*/
@java.lang.Override public boolean hasBrand() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The enum numeric value on the wire for brand.
*/
@java.lang.Override public int getBrandValue() {
return brand_;
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The brand.
*/
@java.lang.Override public cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand getBrand() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand result = cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand.valueOf(brand_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand.UNRECOGNIZED : result;
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return Whether the type field is set.
*/
@java.lang.Override public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The type.
*/
@java.lang.Override public cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType getType() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType result = cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType.valueOf(type_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType.UNRECOGNIZED : result;
}
public static final int CHANNEL_ID_FIELD_NUMBER = 3;
private int channelId_;
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return Whether the channelId field is set.
*/
@java.lang.Override public boolean hasChannelId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The enum numeric value on the wire for channelId.
*/
@java.lang.Override public int getChannelIdValue() {
return channelId_;
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The channelId.
*/
@java.lang.Override public cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId getChannelId() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId result = cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId.valueOf(channelId_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId.UNRECOGNIZED : result;
}
public static final int INTERFACE_FIELD_NUMBER = 4;
private int interface_;
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return Whether the interface field is set.
*/
@java.lang.Override public boolean hasInterface() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The enum numeric value on the wire for interface.
*/
@java.lang.Override public int getInterfaceValue() {
return interface_;
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The interface.
*/
@java.lang.Override public cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface getInterface() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface result = cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface.valueOf(interface_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface.UNRECOGNIZED : result;
}
public static final int NUM_PORTS_FIELD_NUMBER = 5;
private int numPorts_;
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return Whether the numPorts field is set.
*/
@java.lang.Override
public boolean hasNumPorts() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return The numPorts.
*/
@java.lang.Override
public int getNumPorts() {
return numPorts_;
}
public static final int BAUDRATE_FIELD_NUMBER = 6;
private int baudrate_;
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return Whether the baudrate field is set.
*/
@java.lang.Override public boolean hasBaudrate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The enum numeric value on the wire for baudrate.
*/
@java.lang.Override public int getBaudrateValue() {
return baudrate_;
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The baudrate.
*/
@java.lang.Override public cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE getBaudrate() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE result = cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE.valueOf(baudrate_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeEnum(1, brand_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(2, type_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeEnum(3, channelId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeEnum(4, interface_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeUInt32(5, numPorts_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeEnum(6, baudrate_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, brand_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, channelId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, interface_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(5, numPorts_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, baudrate_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof cmvr.msgs.CanCardParameter.CANCardParameter)) {
return super.equals(obj);
}
cmvr.msgs.CanCardParameter.CANCardParameter other = (cmvr.msgs.CanCardParameter.CANCardParameter) obj;
if (hasBrand() != other.hasBrand()) return false;
if (hasBrand()) {
if (brand_ != other.brand_) return false;
}
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (type_ != other.type_) return false;
}
if (hasChannelId() != other.hasChannelId()) return false;
if (hasChannelId()) {
if (channelId_ != other.channelId_) return false;
}
if (hasInterface() != other.hasInterface()) return false;
if (hasInterface()) {
if (interface_ != other.interface_) return false;
}
if (hasNumPorts() != other.hasNumPorts()) return false;
if (hasNumPorts()) {
if (getNumPorts()
!= other.getNumPorts()) return false;
}
if (hasBaudrate() != other.hasBaudrate()) return false;
if (hasBaudrate()) {
if (baudrate_ != other.baudrate_) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBrand()) {
hash = (37 * hash) + BRAND_FIELD_NUMBER;
hash = (53 * hash) + brand_;
}
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
}
if (hasChannelId()) {
hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
hash = (53 * hash) + channelId_;
}
if (hasInterface()) {
hash = (37 * hash) + INTERFACE_FIELD_NUMBER;
hash = (53 * hash) + interface_;
}
if (hasNumPorts()) {
hash = (37 * hash) + NUM_PORTS_FIELD_NUMBER;
hash = (53 * hash) + getNumPorts();
}
if (hasBaudrate()) {
hash = (37 * hash) + BAUDRATE_FIELD_NUMBER;
hash = (53 * hash) + baudrate_;
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cmvr.msgs.CanCardParameter.CANCardParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(cmvr.msgs.CanCardParameter.CANCardParameter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code cmvr.msgs.CANCardParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return Whether the brand field is set.
*/
@java.lang.Override public boolean hasBrand() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The enum numeric value on the wire for brand.
*/
@java.lang.Override public int getBrandValue() {
return brand_;
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @param value The enum numeric value on the wire for brand to set.
* @return This builder for chaining.
*/
public Builder setBrandValue(int value) {
bitField0_ |= 0x00000001;
brand_ = value;
onChanged();
return this;
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return The brand.
*/
@java.lang.Override
public cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand getBrand() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand result = cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand.valueOf(brand_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand.UNRECOGNIZED : result;
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @param value The brand to set.
* @return This builder for chaining.
*/
public Builder setBrand(cmvr.msgs.CanCardParameter.CANCardParameter.CANCardBrand value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
brand_ = value.getNumber();
onChanged();
return this;
}
/**
*
* CAN卡驱动类型配置 | 根据所用的CAN卡硬件型号或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardBrand brand = 1;
* @return This builder for chaining.
*/
public Builder clearBrand() {
bitField0_ = (bitField0_ & ~0x00000001);
brand_ = 0;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return Whether the type field is set.
*/
@java.lang.Override public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
bitField0_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return The type.
*/
@java.lang.Override
public cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType getType() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType result = cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType.valueOf(type_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType.UNRECOGNIZED : result;
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(cmvr.msgs.CanCardParameter.CANCardParameter.CANCardType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* CAN卡硬件接口类型配置 | 根据所用的CAN卡硬件接口类型或驱动类型配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANCardType type = 2;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
onChanged();
return this;
}
private int channelId_ = 0;
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return Whether the channelId field is set.
*/
@java.lang.Override public boolean hasChannelId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The enum numeric value on the wire for channelId.
*/
@java.lang.Override public int getChannelIdValue() {
return channelId_;
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @param value The enum numeric value on the wire for channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelIdValue(int value) {
bitField0_ |= 0x00000004;
channelId_ = value;
onChanged();
return this;
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return The channelId.
*/
@java.lang.Override
public cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId getChannelId() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId result = cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId.valueOf(channelId_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId.UNRECOGNIZED : result;
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @param value The channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelId(cmvr.msgs.CanCardParameter.CANCardParameter.CANChannelId value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
channelId_ = value.getNumber();
onChanged();
return this;
}
/**
*
* CAN卡端口号配置 | 根据所连接的CAN卡端口号配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANChannelId channel_id = 3;
* @return This builder for chaining.
*/
public Builder clearChannelId() {
bitField0_ = (bitField0_ & ~0x00000004);
channelId_ = 0;
onChanged();
return this;
}
private int interface_ = 0;
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return Whether the interface field is set.
*/
@java.lang.Override public boolean hasInterface() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The enum numeric value on the wire for interface.
*/
@java.lang.Override public int getInterfaceValue() {
return interface_;
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @param value The enum numeric value on the wire for interface to set.
* @return This builder for chaining.
*/
public Builder setInterfaceValue(int value) {
bitField0_ |= 0x00000008;
interface_ = value;
onChanged();
return this;
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return The interface.
*/
@java.lang.Override
public cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface getInterface() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface result = cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface.valueOf(interface_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface.UNRECOGNIZED : result;
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @param value The interface to set.
* @return This builder for chaining.
*/
public Builder setInterface(cmvr.msgs.CanCardParameter.CANCardParameter.CANInterface value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
interface_ = value.getNumber();
onChanged();
return this;
}
/**
*
* CAN卡软件接口配置
*
*
* optional .cmvr.msgs.CANCardParameter.CANInterface interface = 4;
* @return This builder for chaining.
*/
public Builder clearInterface() {
bitField0_ = (bitField0_ & ~0x00000008);
interface_ = 0;
onChanged();
return this;
}
private int numPorts_ ;
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return Whether the numPorts field is set.
*/
@java.lang.Override
public boolean hasNumPorts() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return The numPorts.
*/
@java.lang.Override
public int getNumPorts() {
return numPorts_;
}
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @param value The numPorts to set.
* @return This builder for chaining.
*/
public Builder setNumPorts(int value) {
bitField0_ |= 0x00000010;
numPorts_ = value;
onChanged();
return this;
}
/**
*
* CAN卡端口数量配置
*
*
* optional uint32 num_ports = 5;
* @return This builder for chaining.
*/
public Builder clearNumPorts() {
bitField0_ = (bitField0_ & ~0x00000010);
numPorts_ = 0;
onChanged();
return this;
}
private int baudrate_ = 0;
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return Whether the baudrate field is set.
*/
@java.lang.Override public boolean hasBaudrate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The enum numeric value on the wire for baudrate.
*/
@java.lang.Override public int getBaudrateValue() {
return baudrate_;
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @param value The enum numeric value on the wire for baudrate to set.
* @return This builder for chaining.
*/
public Builder setBaudrateValue(int value) {
bitField0_ |= 0x00000020;
baudrate_ = value;
onChanged();
return this;
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return The baudrate.
*/
@java.lang.Override
public cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE getBaudrate() {
@SuppressWarnings("deprecation")
cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE result = cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE.valueOf(baudrate_);
return result == null ? cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE.UNRECOGNIZED : result;
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @param value The baudrate to set.
* @return This builder for chaining.
*/
public Builder setBaudrate(cmvr.msgs.CanCardParameter.CANCardParameter.BAUDRATE value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
baudrate_ = value.getNumber();
onChanged();
return this;
}
/**
*
* CAN卡波特率配置
*
*
* optional .cmvr.msgs.CANCardParameter.BAUDRATE baudrate = 6;
* @return This builder for chaining.
*/
public Builder clearBaudrate() {
bitField0_ = (bitField0_ & ~0x00000020);
baudrate_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:cmvr.msgs.CANCardParameter)
}
// @@protoc_insertion_point(class_scope:cmvr.msgs.CANCardParameter)
private static final cmvr.msgs.CanCardParameter.CANCardParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new cmvr.msgs.CanCardParameter.CANCardParameter();
}
public static cmvr.msgs.CanCardParameter.CANCardParameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser