solar-toolkit/command/failurecode_string.go

34 lines
1.3 KiB
Go
Raw Normal View History

2022-07-16 20:39:26 +00:00
// Code generated by "stringer -type=FailureCode"; DO NOT EDIT.
package command
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[FailureCodeIllegalFunction-1]
_ = x[FailureCodeIllegalDataAddress-2]
_ = x[FailureCodeIllegalDataValue-3]
_ = x[FailureCodeSlaveDeviceFailure-4]
_ = x[FailureCodeAcknowledge-5]
_ = x[FailureCodeSlaveDeviceBusy-6]
_ = x[FailureCodeNegativeAcknowledgement-7]
_ = x[FailureCodeMemoryParityError-8]
_ = x[FailureCodeGatewayPathUnavailable-9]
_ = x[FailureCodeGatewayTargetDeviceFailedToRespond-10]
}
const _FailureCode_name = "FailureCodeIllegalFunctionFailureCodeIllegalDataAddressFailureCodeIllegalDataValueFailureCodeSlaveDeviceFailureFailureCodeAcknowledgeFailureCodeSlaveDeviceBusyFailureCodeNegativeAcknowledgementFailureCodeMemoryParityErrorFailureCodeGatewayPathUnavailableFailureCodeGatewayTargetDeviceFailedToRespond"
var _FailureCode_index = [...]uint16{0, 26, 55, 82, 111, 133, 159, 193, 221, 254, 299}
func (i FailureCode) String() string {
i -= 1
if i >= FailureCode(len(_FailureCode_index)-1) {
return "FailureCode(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _FailureCode_name[_FailureCode_index[i]:_FailureCode_index[i+1]]
}