utils

package module
v0.0.0-...-e025de3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CRC16Table = []uint16{}/* 256 elements not displayed */

Functions

func CRC16CheckSum

func CRC16CheckSum(data []byte) uint16

func DnsSet

func DnsSet(dns1, dns2 string)

设置dns

func GetBetweenStr

func GetBetweenStr(str, start, end string) string

func GetCurrentTime

func GetCurrentTime() int64

获取当前系统时间,返回int64

func GetEthIpByte

func GetEthIpByte(lan string) string

获取设备本机的ip地址

func GetEthMac

func GetEthMac(lan string) (string, error)

获取设备本机的mac地址

func GetEthStatus

func GetEthStatus(lan string) (bool, error)

获取设备本机网口的连接状态

func GetExpendTime

func GetExpendTime(startTime time.Time) int64

输入time.Time 获取两个时间间隔,返回int64

func GetInterval

func GetInterval(lasttime int64) int64

获取两个时间间隔,返回int64

func GetIpFormXaddr

func GetIpFormXaddr(xaddr string) string

func GetSetSystem

func GetSetSystem(url string) bool

通过ntp获取系统时间

func GetWorkPath

func GetWorkPath() string

func GetuIntString

func GetuIntString(digit uint) string

func RebootSystem

func RebootSystem()

func SetSystemTime

func SetSystemTime(dateTime string)

设置系统时间

func SetTimeToHardSystem

func SetTimeToHardSystem()

把当前时间写入硬件系统

Types

This section is empty.

Jump to

Keyboard shortcuts

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