util

package
v0.0.0-...-f0dea4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByBitNegation

func ByBitNegation(s string) (num int)

func Crc

func Crc(data []byte) []byte

传入 modbus 数据内容,返回 crc校验码

func CrcOk

func CrcOk(data []byte) bool
返回CRC校验是否成功

/

func DecimalToAny

func DecimalToAny(num, n, count int) string

func GenSignal

func GenSignal(s int) string

func GetCtrlStr

func GetCtrlStr(cnum int, ctype int) string

控制器指令下发

cnum:第几路控制 ctype: 控制状态 1开 0关闭

func GetNegative

func GetNegative(s string) float64

func GetSignalOffset

func GetSignalOffset(s int) uint

func GetctrlLen

func GetctrlLen(len int) int

func HexDec

func HexDec(h string) (n int64)

十六转十进制

func InitTables

func InitTables(db *gorm.DB, tname string, fslice []string)

func Str2DEC

func Str2DEC(s string) (num int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL