jtt808

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 9 Imported by: 1

README

g-jtt808

GNSS system for operational vehicles—General specifications for vehicle terminal communication protocol

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvHEX

func ConvHEX(data []byte) (s string)

func Escape

func Escape(data []byte) ([]byte, error)

Escape 转义

func Tag

func Tag(f reflect.StructField) (t string, length int, err error)

func Unescape

func Unescape(data []byte) ([]byte, error)

Unescape 反转义

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(msg any) Decoder

func (Decoder) Decode

func (d Decoder) Decode(b []byte) (err error)

type Encoder

type Encoder struct {
	OnEncodedBodyHandle func(bodyBytes *[]byte)
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(msg any) Encoder

func (Encoder) Encode

func (e Encoder) Encode(calcChecksumHandle func([]byte) byte) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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