Documentation ¶
Index ¶
- Constants
- func CrcChecker(data []byte) bool
- func CreatePackageForDevice(message string) []byte
- func GenerateCrc(data []byte) (byte, byte)
- func GeneratePackageSN() (byte, byte)
- func GetEndBytes(input []byte) []byte
- func GetPackageType(input []byte) byte
- func GetStartBytes(input []byte) []byte
- func IsLogin(input []byte) bool
- func IsLongPackage(input []byte) bool
- func IsNormalPackage(input []byte) bool
- func IsOnlineCommandRequest(input []byte) bool
- func IsPacketFromDevice(input []byte) bool
- func IsPacketFromSite(input []byte) bool
- func ValidateEndBytes(input []byte) bool
- func ValidatePackage(input []byte) bool
- func ValidateStartBytes(input []byte) bool
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 CreatePackageForDevice ¶
func GenerateCrc ¶
func GeneratePackageSN ¶
func GetEndBytes ¶
func GetPackageType ¶
func GetStartBytes ¶
func IsLongPackage ¶
func IsNormalPackage ¶
func IsOnlineCommandRequest ¶
func IsPacketFromDevice ¶
func IsPacketFromSite ¶
func ValidateEndBytes ¶
func ValidatePackage ¶
func ValidateStartBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.