// Code generated by "stringer -type ControllerError -trimprefix ControllerError"; 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[ControllerErrorUnspecified-0]
	_ = x[ControllerErrorRxBufferOverflow-1]
	_ = x[ControllerErrorTxBufferOverflow-2]
	_ = x[ControllerErrorRxWarning-4]
	_ = x[ControllerErrorTxWarning-8]
	_ = x[ControllerErrorRxPassive-16]
	_ = x[ControllerErrorTxPassive-32]
	_ = x[ControllerErrorActive-64]
}

const (
	_ControllerError_name_0 = "UnspecifiedRxBufferOverflowTxBufferOverflow"
	_ControllerError_name_1 = "RxWarning"
	_ControllerError_name_2 = "TxWarning"
	_ControllerError_name_3 = "RxPassive"
	_ControllerError_name_4 = "TxPassive"
	_ControllerError_name_5 = "Active"
)

var (
	_ControllerError_index_0 = [...]uint8{0, 11, 27, 43}
)

func (i ControllerError) String() string {
	switch {
	case i <= 2:
		return _ControllerError_name_0[_ControllerError_index_0[i]:_ControllerError_index_0[i+1]]
	case i == 4:
		return _ControllerError_name_1
	case i == 8:
		return _ControllerError_name_2
	case i == 16:
		return _ControllerError_name_3
	case i == 32:
		return _ControllerError_name_4
	case i == 64:
		return _ControllerError_name_5
	default:
		return "ControllerError(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
