protoparse

package
v0.0.0-...-85027f2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

CRC16

Functions

func BytesToInt

func BytesToInt(b []byte) int

字节转换成整形

func CheckCRC16Sum

func CheckCRC16Sum(data []byte) uint16

func CheckCRC16Sum(data []byte) int16 {

func CheckSum

func CheckSum(data []byte) byte

累计和校验返回最后一个字节

func GuoYaoCheckSum

func GuoYaoCheckSum(data []byte) byte

累计和校验返回最后一个字节

func Int64ToBytes

func Int64ToBytes(n int64) []byte

int64整形转换成8字节

func IntToBytes

func IntToBytes(n int) []byte

整形转换成字节

func KehuaPacketToCtrl

func KehuaPacketToCtrl(devType byte, msgType int, seq int, SN []byte, gunNum byte, message []byte) []byte

送报文

func PacketToChargeBow

func PacketToChargeBow(msgType byte, chargeBowAddrBytes []byte, message []byte) []byte

发送充电弓报文增加报文头

func PacketToCtrl

func PacketToCtrl(msgType byte, ctrlAddrBytes []byte, message []byte) []byte

发送集控器报文增加报文头

func PacketToExtCtrl

func PacketToExtCtrl(msgType byte, ctrlAddrBytes []byte, message []byte, encodingType byte, usingaes int) []byte

发送集控器报文增加报文头 EncodingType: 消息体编码类型,Protobuf为0x01;JSON为0x02

func SnailPacketToCtrl

func SnailPacketToCtrl(msgType int, seq byte, message []byte) []byte

蜗牛之家发送报文

func UnPackIeslab

func UnPackIeslab(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

积成电子解析

func Unpack

func Unpack(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据报文头和长度寻找一帧,放到readerChannel中

func UnpackChargeBow

func UnpackChargeBow(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据报文头和长度寻找一帧,放到readerChannel中

func UnpackChengDian

func UnpackChengDian(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据橙电报文头和长度寻找一帧,放到readerChannel中

func UnpackCostar

func UnpackCostar(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

///////聚电104协议////////////

func UnpackDongXu

func UnpackDongXu(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

///////DongXu协议////////////

func UnpackEnPlus

func UnpackEnPlus(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据万泊报文头和长度寻找一帧,放到readerChannel中

func UnpackGuoYao

func UnpackGuoYao(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据国耀报文头和长度寻找一帧,放到readerChannel中

func UnpackKehua

func UnpackKehua(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

///////科华桩协议////////////

func UnpackLvNeng

func UnpackLvNeng(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

绿能报文头和长度寻找一帧,放到readerChannel中

func UnpackNewYunkc

func UnpackNewYunkc(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

///////最新版本云快充协议////////////

func UnpackSinExcel

func UnpackSinExcel(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据盛弘报文头和长度寻找一帧,放到readerChannel中

func UnpackSnail

func UnpackSnail(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据蜗牛之家报文头和长度寻找一帧,放到readerChannel中

func UnpackSse

func UnpackSse(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据蜗牛之家报文头和长度寻找一帧,放到readerChannel中

func UnpackTeld

func UnpackTeld(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据盛弘报文头和长度寻找一帧,放到readerChannel中

func UnpackXiaMen

func UnpackXiaMen(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据厦门报文头和长度寻找一帧,放到readerChannel中

func UnpackXinYe

func UnpackXinYe(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据新页报文头和长度寻找一帧,放到readerChannel中

func UnpackXingXing

func UnpackXingXing(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据星星报文头和长度寻找一帧,放到readerChannel中

func UnpackYongLian

func UnpackYongLian(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

根据永联报文头和长度寻找一帧,放到readerChannel中

func UnpackYunkc

func UnpackYunkc(buffer []byte, readerChannel chan []byte, lastRecvTime *int64, consumeIfExist *bool) []byte

///////云快充104协议////////////

func UsMBCRC16

func UsMBCRC16(pucFrame []byte, usLen int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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