-
Notifications
You must be signed in to change notification settings - Fork 0
0523关于常量的用法
ziyouzy edited this page May 23, 2020
·
1 revision
const (
ValidateModbus = iota
BaseRawCreateCRCOnly
BaseRawCreateModbus
)
//calculatemode:
const (
MbTableMode = iota
)
//endianmode:
const (
Little = iota
Big
)
const (
CheckSuccess = iota
CheckSuccessButEndianContrary
CheckFailed
)
func JudgeCRC16(data []byte) (checkresult int)
func (this *CrcValidator) TestCheckSum(testprocessingmodel int) (crc []byte,err error)
type CrcValidator struct {
modbus []byte
processingmodel int
calculatemode int
endianmode int
}