concox

package
v0.0.0-...-258f086 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParserLogin                        = 0x01
	ParserLocationX3                   = 0x22
	ParserLocationGT06                 = 0x12
	ParserStatus                       = 0x13
	ParserAlarmX3                      = 0x26
	ParserAlarmX3V2                    = 0x27
	ParserAlarmGT06                    = 0x16
	ParserWifiInformation              = 0x2c
	ParserLBSLocationX3                = 0x28
	ParserLBSLocationGT06              = 0x18
	ParserInformation                  = 0x94
	ParserTimeCalibration              = 0x8a
	ParserOnlineCommand                = 0xaf
	ParserOnlineCommandResponse        = 0x15
	ParserOnlineCommandLongResponse    = 0x21
	ParserOnlineCommandRequestStartBit = 0x70
	ParserStartBit                     = 0x78
	ParserLongStartBit                 = 0x79
	ParserEndBitFirst                  = 0x0d
	ParserEndBitEnd                    = 0x0a
	ParserTimeCalibrationLength        = 0x0b
	ParserResponseLength               = 0x05
	ParserOnlineCommandProtocol        = 0x80
)
View Source
const (
	ParserLoginStr                     = "Login"
	ParserLocationStr                  = "Location"
	ParserStatusStr                    = "Status"
	ParserAlarmStr                     = "Alarm"
	ParserWifiInformationStr           = "Wifi Information"
	ParserLBSLocationStr               = "LBS Location"
	ParserInformationStr               = "Information"
	ParserTimeCalibrationStr           = "Time Calibration"
	ParserOnlineCommandResponseStr     = "Online Command Response"
	ParserOnlineCommandLongResponseStr = "Online Command Response Long"
)

Variables

This section is empty.

Functions

func CrcChecker

func CrcChecker(data []byte) bool

func CreatePackageForDevice

func CreatePackageForDevice(message string) []byte

func GenerateCrc

func GenerateCrc(data []byte) (byte, byte)

func GeneratePackageSN

func GeneratePackageSN() (byte, byte)

func GetEndBytes

func GetEndBytes(input []byte) []byte

func GetPackageType

func GetPackageType(input []byte) byte

func GetStartBytes

func GetStartBytes(input []byte) []byte

func IsLogin

func IsLogin(input []byte) bool

func IsLongPackage

func IsLongPackage(input []byte) bool

func IsNormalPackage

func IsNormalPackage(input []byte) bool

func IsOnlineCommandRequest

func IsOnlineCommandRequest(input []byte) bool

func IsPacketFromDevice

func IsPacketFromDevice(input []byte) bool

func IsPacketFromSite

func IsPacketFromSite(input []byte) bool

func ValidateEndBytes

func ValidateEndBytes(input []byte) bool

func ValidatePackage

func ValidatePackage(input []byte) bool

func ValidateStartBytes

func ValidateStartBytes(input []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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