// Code generated by "stringer -type ProtocolViolationError -trimprefix ProtocolViolationError"; 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[ProtocolViolationErrorUnspecified-0]
	_ = x[ProtocolViolationErrorSingleBit-1]
	_ = x[ProtocolViolationErrorFrameFormat-2]
	_ = x[ProtocolViolationErrorBitStuffing-4]
	_ = x[ProtocolViolationErrorBit0-8]
	_ = x[ProtocolViolationErrorBit1-16]
	_ = x[ProtocolViolationErrorBusOverload-32]
	_ = x[ProtocolViolationErrorActive-64]
	_ = x[ProtocolViolationErrorTx-128]
}

const (
	_ProtocolViolationError_name_0 = "UnspecifiedSingleBitFrameFormat"
	_ProtocolViolationError_name_1 = "BitStuffing"
	_ProtocolViolationError_name_2 = "Bit0"
	_ProtocolViolationError_name_3 = "Bit1"
	_ProtocolViolationError_name_4 = "BusOverload"
	_ProtocolViolationError_name_5 = "Active"
	_ProtocolViolationError_name_6 = "Tx"
)

var (
	_ProtocolViolationError_index_0 = [...]uint8{0, 11, 20, 31}
)

func (i ProtocolViolationError) String() string {
	switch {
	case i <= 2:
		return _ProtocolViolationError_name_0[_ProtocolViolationError_index_0[i]:_ProtocolViolationError_index_0[i+1]]
	case i == 4:
		return _ProtocolViolationError_name_1
	case i == 8:
		return _ProtocolViolationError_name_2
	case i == 16:
		return _ProtocolViolationError_name_3
	case i == 32:
		return _ProtocolViolationError_name_4
	case i == 64:
		return _ProtocolViolationError_name_5
	case i == 128:
		return _ProtocolViolationError_name_6
	default:
		return "ProtocolViolationError(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
