// Code generated by "stringer -type ErrorClass -trimprefix ErrorClass"; DO NOT EDIT.

package socketcan

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[ErrorClassTxTimeout-1]
	_ = x[ErrorClassLostArbitration-2]
	_ = x[ErrorClassController-4]
	_ = x[ErrorClassProtocolViolation-8]
	_ = x[ErrorClassTransceiver-16]
	_ = x[ErrorClassNoAck-32]
	_ = x[ErrorClassBusOff-64]
	_ = x[ErrorClassBusError-128]
	_ = x[ErrorClassRestarted-256]
}

const (
	_ErrorClass_name_0 = "TxTimeoutLostArbitration"
	_ErrorClass_name_1 = "Controller"
	_ErrorClass_name_2 = "ProtocolViolation"
	_ErrorClass_name_3 = "Transceiver"
	_ErrorClass_name_4 = "NoAck"
	_ErrorClass_name_5 = "BusOff"
	_ErrorClass_name_6 = "BusError"
	_ErrorClass_name_7 = "Restarted"
)

var (
	_ErrorClass_index_0 = [...]uint8{0, 9, 24}
)

func (i ErrorClass) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _ErrorClass_name_0[_ErrorClass_index_0[i]:_ErrorClass_index_0[i+1]]
	case i == 4:
		return _ErrorClass_name_1
	case i == 8:
		return _ErrorClass_name_2
	case i == 16:
		return _ErrorClass_name_3
	case i == 32:
		return _ErrorClass_name_4
	case i == 64:
		return _ErrorClass_name_5
	case i == 128:
		return _ErrorClass_name_6
	case i == 256:
		return _ErrorClass_name_7
	default:
		return "ErrorClass(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
