Documentation ¶
Overview ¶
* Created by 丁德鑫 on 2017/10/9 10:22:07 * ============================================== * 包说明:string、byte之间转换等公共函数 * ============================================== * 南京德睿能源研究院版权所有 * ==============================================
Index ¶
- Constants
- func ByteToChargeBowStr(byteBuffer []byte) string
- func ByteToCtrlStr(byteBuffer []byte) string
- func ByteToUint(byteBuffer []byte) uint32
- func ByteToUint16(byteBuffer []byte) uint16
- func ByteToUint16Little(byteBuffer []byte) uint16
- func CheckCtrlAddrErr(ctrladdr string) bool
- func CheckCtrladdrValid(ctrladdr string) bool
- func CheckFileIsExist(filename string) bool
- func FormatDateTime(timeStr string) string
- func FourPrecision(i int32) float64
- func GetCMTimeStrBySec(timeInt int64) string
- func GetCurrentDayStr() string
- func GetCurrentTimeStr() string
- func GetCurrentTimeStrNoSpace() string
- func GetFileSize(fileWithPath string) int64
- func GetOffLineDesc(exitReason byte) string
- func GetShortTimeStrBysec(timeInt int64) string
- func GetSimpleTimeStrByMillsec(timeInt int64) string
- func GetTimeByMillsec(timeInt int64) time.Time
- func GetTimeByTimeStr(timeStr string) time.Time
- func GetTimeByTimeStrWithMillsec(timeStr string) time.Time
- func GetTimeByTimeStrWithMin(timeStr string) (time.Time, error)
- func GetTimeStrByMillsec(timeInt int64) string
- func GetTimeStrBySec(timeInt int64) string
- func Int64Abs(n *int64)
- func IntTo2Bytes(n int) []byte
- func IntTo2LillteBytes(n int) []byte
- func IntToBytes(n int) []byte
- func IntToBytesLittle(n int) []byte
- func IsDirExists(path string) bool
- func Log(v ...interface{})
- func Mkdir(path string) bool
- func ParseVinValue(data interface{}) error
- func SendWorkGroupNotify(url string, userId string, msg string)
- func TwoPrecision(i int32) float64
- func UintToByte(num uint32) []byte
- func VinValidRepair0(vin string) string
- type CtrlInfo
Constants ¶
View Source
const (
LenVin = 17
)
Variables ¶
This section is empty.
Functions ¶
func ByteToChargeBowStr ¶
byte格式的充电弓地址解析为字符串,并将结尾连续的空白符去掉
func ByteToUint16Little ¶
func CheckCtrladdrValid ¶
func FormatDateTime ¶
将2006-01-02T15:04:05.*格式的时间 或者 将2006-01-02 15:04:05.*格式的时间 转为 2006-01-02 15:04:05.000 原因是因为平台返回的时间格式不固定,有的没有毫秒,有的毫秒位数不是3
func GetCMTimeStrBySec ¶
将1970年以来的秒数时间转成直到分的字符串格式 201810241330
func GetCurrentTimeStrNoSpace ¶
func GetCurrentTimeStrNoSpace() string
将获得当前时间转的字符串格式,没有空格,因为工作组通知如果有空格,就推不出来
func GetSimpleTimeStrByMillsec ¶
将1970年以来的带毫秒的时间转成字符串格式
func GetTimeByTimeStr ¶
将固定格式的字符串转成对应的Time类型,例如:"2018-07-11 15:45:12"
func GetTimeByTimeStrWithMillsec ¶
将固定格式的字符串(带毫秒)转成对应的Time类型,例如:"2018-07-11 15:45:12.062"
func GetTimeByTimeStrWithMin ¶
将固定格式的字符串转成对应的Time类型,例如:"201810231040"
func ParseVinValue ¶
func ParseVinValue(data interface{}) error
func SendWorkGroupNotify ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.