services

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSecKeyUnsupported = errors.New("SecKey.dll is only supported on windows")

Functions

func IntToBig

func IntToBig(num uint32) []byte

func MyHexParser

func MyHexParser(
	filepath string,
	blockSize int) (dataLen []byte, startAddr []byte, data [][]byte, err error)

func MyHexParserFirstSegment

func MyHexParserFirstSegment(
	filepath string,
	blockSize int) (dataLen []byte, startAddr []byte, data [][]byte, err error)

func MyHexParserWithLengths

func MyHexParserWithLengths(
	filepath string,
	blockSize int,
	addrLen int,
	sizeLen int) (dataLen []byte, startAddr []byte, data [][]byte, err error)

func SplitBlock

func SplitBlock(data []byte, bs int) [][]byte

Types

type HexSegment

type HexSegment struct {
	Address uint32
	Data    []byte
	Blocks  [][]byte
}

func ParseHexSegments

func ParseHexSegments(filepath string, blockSize int) ([]HexSegment, error)

type ReadDataByIdentifier

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

func NewReadDataByIdentifier

func NewReadDataByIdentifier(client *uds_client.UDSClient) *ReadDataByIdentifier

func (*ReadDataByIdentifier) ReadDataByIdentifier

func (r *ReadDataByIdentifier) ReadDataByIdentifier(dids ...uint16) (*ReadDataByIdentifierResponse, error)

func (*ReadDataByIdentifier) ReadDataByIdentifierWithLengths

func (r *ReadDataByIdentifier) ReadDataByIdentifierWithLengths(lengths map[uint16]int, dids ...uint16) (*ReadDataByIdentifierResponse, error)

func (*ReadDataByIdentifier) SetTimeout

func (r *ReadDataByIdentifier) SetTimeout(timeout time.Duration)

type ReadDataByIdentifierResponse

type ReadDataByIdentifierResponse struct {
	Values map[uint16][]byte
	Raw    []byte
}

type RequestDownload

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

func NewRequestDownload

func NewRequestDownload(client *uds_client.UDSClient) *RequestDownload

func (*RequestDownload) RequestDownload

func (r *RequestDownload) RequestDownload(address, size uint64, addrLen, sizeLen int) (*RequestDownloadResponse, error)

func (*RequestDownload) RequestDownloadWithFormat

func (r *RequestDownload) RequestDownloadWithFormat(address, size uint64, addrLen, sizeLen int, dataFormat byte) (*RequestDownloadResponse, error)

func (*RequestDownload) SetTimeout

func (r *RequestDownload) SetTimeout(timeout time.Duration)

type RequestDownloadResponse

type RequestDownloadResponse struct {
	MaxLength uint64
	Raw       []byte
}

type RequestTransferExit

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

func NewRequestTransferExit

func NewRequestTransferExit(client *uds_client.UDSClient) *RequestTransferExit

func (*RequestTransferExit) RequestTransferExit

func (r *RequestTransferExit) RequestTransferExit(data []byte) (*RequestTransferExitResponse, error)

func (*RequestTransferExit) SetTimeout

func (r *RequestTransferExit) SetTimeout(timeout time.Duration)

type RequestTransferExitResponse

type RequestTransferExitResponse struct {
	ParameterRecord []byte
	Raw             []byte
}

type RoutineControl

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

func NewRoutineControl

func NewRoutineControl(client *uds_client.UDSClient) *RoutineControl

func (*RoutineControl) RoutineControl

func (r *RoutineControl) RoutineControl(controlType byte, routineID uint16, data []byte) (*RoutineControlResponse, error)

func (*RoutineControl) SetTimeout

func (r *RoutineControl) SetTimeout(timeout time.Duration)

type RoutineControlResponse

type RoutineControlResponse struct {
	ControlType  byte
	RoutineID    uint16
	StatusRecord []byte
	Raw          []byte
}

type SecurityAccess

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

func NewSecurityAccess

func NewSecurityAccess(client *uds_client.UDSClient) *SecurityAccess

func (*SecurityAccess) ComputeKey

func (s *SecurityAccess) ComputeKey(_ int, _ []byte) ([]byte, error)

func (*SecurityAccess) ComputeKeyWithLength

func (s *SecurityAccess) ComputeKeyWithLength(_ int, _ []byte, _ int) ([]byte, error)

func (*SecurityAccess) RequestSeed

func (s *SecurityAccess) RequestSeed(_ byte, _ byte, _ []byte) ([]byte, error)

func (*SecurityAccess) SecurityAccess

func (s *SecurityAccess) SecurityAccess(_ byte, _ byte) ([]byte, error)

func (*SecurityAccess) SecurityAccessWithLength

func (s *SecurityAccess) SecurityAccessWithLength(_ byte, _ byte, _ int) ([]byte, error)

func (*SecurityAccess) SecurityAccessWithSeedData

func (s *SecurityAccess) SecurityAccessWithSeedData(_ byte, _ byte, _ []byte) ([]byte, error)

func (*SecurityAccess) SecurityAccessWithSeedDataAndLength

func (s *SecurityAccess) SecurityAccessWithSeedDataAndLength(_ byte, _ byte, _ []byte, _ int) ([]byte, error)

func (*SecurityAccess) SendKey

func (s *SecurityAccess) SendKey(_ byte, _ byte, _ []byte) ([]byte, error)

func (*SecurityAccess) SetTimeout

func (s *SecurityAccess) SetTimeout(timeout time.Duration)

type TransferData

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

func NewTransferData

func NewTransferData(client *uds_client.UDSClient) *TransferData

func (*TransferData) SetTimeout

func (t *TransferData) SetTimeout(timeout time.Duration)

func (*TransferData) TransferBlocks

func (t *TransferData) TransferBlocks(blocks [][]byte, startSeq byte) (*TransferDataResponse, byte, error)

func (*TransferData) TransferData

func (t *TransferData) TransferData(sequenceNumber byte, data []byte) (*TransferDataResponse, error)

func (*TransferData) TransferHexFile

func (t *TransferData) TransferHexFile(filepath string, blockSize int, startSeq byte) (*TransferDataResponse, byte, error)

type TransferDataResponse

type TransferDataResponse struct {
	SequenceNumber  byte
	ParameterRecord []byte
	Raw             []byte
}

Jump to

Keyboard shortcuts

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