a2l

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UTF8  encodingEnum = "UTF8"
	UTF16 encodingEnum = "UTF16"
	UTF32 encodingEnum = "UTF32"
)
View Source
const (
	UBYTE dataTypeEnum = ubyteToken
	SBYTE dataTypeEnum = sbyteToken
	UWORD dataTypeEnum = uwordToken
	SWORD dataTypeEnum = swordToken
	ULONG dataTypeEnum = ulongToken
	SLONG dataTypeEnum = slongToken
)
View Source
const (
	BYTE dataSizeEnum = byteToken
	WORD dataSizeEnum = wordToken
	LONG dataSizeEnum = longToken
)
View Source
const (
	PBYTE     addrTypeEnum = pbyteToken
	PWORD     addrTypeEnum = pwordToken
	PLONG     addrTypeEnum = plongToken
	PLONGLONG addrTypeEnum = plonLongToken
	/*DIRECT: If an adjustable or measurable object is defined with indirect addressing
	(ADDRESS_TYPE is not DIRECT) and if the used interface does not support indirect
	addressing, it is the responsibility of the MC-System to dereference the object’s
	address before accessing the data or configuring measurement lists.*/
	DIRECT addrTypeEnum = directToken
)
View Source
const (
	INTERN attributeEnum = internToken
	EXTERN attributeEnum = externToken
)
View Source
const (

	//String value in ASCII format.
	ASCII typeEnum = asciiToken
	//Curve Datatype of a characteristic is like an array for the y axis plus an axis description on the x axis
	Curve typeEnum = curveToken
	//Map defines a two dimensional array
	Map typeEnum = mapToken
	//Cuboid defines a three dimensional array mostly represented as an array of Maps
	Cuboid typeEnum = cuboidToken

	//Value Block is a a array with one, two or up to three dimensions.
	ValBlk typeEnum = valBlkToken
	//Value is used in characteristics that only have one value like e.g. "1.0"
	Value typeEnum = valueToken
)
View Source
const (

	//Identical defines a OneToOne conversion from hex to decimal
	Identical conversionTypeEnum = identicalToken
	Form      conversionTypeEnum = formToken
	Linear    conversionTypeEnum = linearToken
	RatFunc   conversionTypeEnum = ratFuncToken
	TabIntp   conversionTypeEnum = tabIntpToken
	TabNointp conversionTypeEnum = tabNointpToken
	//Tab Verb is a table to convert numeric values into strings. e.g.: 1 -> "True"
	TabVerb conversionTypeEnum = tabVerbToken
)
View Source
const (

	/* curves which share a common axis are deposited in columns;
	each row of memory contains values for all the shared axis curves
	at a given axis breakpoint.
	Required in order to represent characteristics which correspond to
	arrays of structures in ECU program code.*/
	AlternateCurves indexModeEnum = alternateCurvesToken
	/*AlternateWithX defines that values of a map are
	stored in columns and the columns of table values alternate with the
	respective X-coordinates. A map of format
	 9 8 7
	[0 1 2
	 3 4 5
	 6 7 8]
	could be stored within the hex file as an array of format
	[9,0,3,6,8,1,4,7,7,2,5,8]
	The order of axis points and table values can be defined differently
	by the position statement in the FNC_VALUE
	In case of a curve the values of x-Axis and values alternate.*/
	AlternateWithX indexModeEnum = alternateWithXToken
	/*AlternateWithY defines that values of a map are
	deposited in rows, the rows of table values alternate with the
	respective Y-coordinates. A map of format
	9 [0 1 2
	8  3 4 5
	7  6 7 8]
	could be within the hex file as an array of format
	[9,0,1,2,8,3,4,5,7,6,7,8]
	The order of axis points and table values can be defined differently
	by the position statement in the FNC_VALUE
	Only applicable to maps*/
	AlternateWithY indexModeEnum = alternateWithYToken
	/*Column Direction defines that values of a map
	[0 1 2
	 3 4 5
	 6 7 8]
	are stored within the hex file as an array of format
	[0,3,6,1,4,7,2,5,8]	*/
	ColumnDir indexModeEnum = columnDirToken
	/*Row Direction defines that values of a map
	[0 1 2
	 3 4 5
	 6 7 8]
	are stored within the hex file as an array of format
	[0,1,2,3,4,5,6,7,8]	*/
	RowDir indexModeEnum = rowDirToken
)
View Source
const (
	Absolute   modeEnum = absoluteToken
	Difference modeEnum = differenceToken
)

Variables

This section is empty.

Functions

This section is empty.

Types

type A2L

type A2L struct {
	Asap2Version asap2Version
	A2mlVersion  a2mlVersion
	Project      Project
}

A2L is the main struct returned by the a2l package. it contains all datatypes parsed from the .a2l file

func ParseFromFile

func ParseFromFile(filepath string) (A2L, error)

ParseFromFile is the main exported function to be called from a2l package. it takes an .a2l file and parses it

type Characteristic

type Characteristic struct {
	Name string

	LongIdentifier string

	Type    typeEnum
	TypeSet bool
	Address string

	//Deposit is the identifier of the corresponding record layout
	Deposit    string
	DepositSet bool
	// contains filtered or unexported fields
}

type DependentCharacteristic

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

type DisplayIdentifier

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

type FncValues added in v0.9.9

type FncValues struct {
	//Position of table values (function values) in the deposit structure (description of sequence of elements in the data record).
	Position    uint16
	PositionSet bool
	//Datatype of the table values
	Datatype    dataTypeEnum
	DatatypeSet bool
	/*IndexMode for characteristic maps, curves and value blocks,
	this field is used to describe how the 2-dimensional table values
	are mapped onto the 1-dimensional address space*/
	IndexMode    indexModeEnum
	IndexModeSet bool
	/*Addresstype defines the addressing of the table values:
	Enumeration for description of the addressing of table
	values or axis point values:
	PBYTE:	The relevant memory location has a 1 byte pointer
			to this table value or axis point value.
	PWORD:	The relevant memory location has a 2 byte pointer
			to this table value or axis point value.
	PLONG:	The relevant memory location has a 4 byte pointer
			to this table value or axis point value.
	DIRECT:	The relevant memory location has the first table value
			or axis point value, all others follow with incrementing address. */
	Addresstype    addrTypeEnum
	AddresstypeSet bool
}

FncValues defines the way the data of a specific record layout is stored within the hex file.

type Formula

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

type FunctionList

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

type IfData

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

type LeftShift

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

type MapList

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

type MaxGrad

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

type MaxRefresh

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

type Module added in v0.9.9

type Module struct {
	Name string

	AxisPts map[string]axisPts

	Characteristics map[string]Characteristic
	CompuMethods    map[string]compuMethod
	CompuTabs       map[string]compuTab
	CompuVTabs      map[string]compuVTab
	CompuVTabRanges map[string]compuVTabRange

	Functions map[string]function
	Groups    map[string]group

	Measurements  map[string]measurement
	ModCommon     modCommon
	ModPar        modPar
	RecordLayouts map[string]RecordLayout

	Units map[string]unit
	// contains filtered or unexported fields
}

type Monotony

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

type Number

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

type Project

type Project struct {
	Name string

	Modules []Module
	// contains filtered or unexported fields
}

type RecordLayout added in v0.9.9

type RecordLayout struct {
	Name                 string
	NameSet              bool
	AlignmentByte        alignmentByte
	AlignmentFloat16Ieee alignmentFloat16Ieee
	AlignmentFloat32Ieee alignmentFloat32Ieee
	AlignmentFloat64Ieee alignmentFloat64Ieee
	AlignmentInt64       alignmentInt64
	AlignmentLong        alignmentLong
	AlignmentWord        alignmentWord
	AxisPtsX             axisPtsX
	AxisPtsY             axisPtsY
	AxisPtsZ             axisPtsZ
	AxisPts4             axisPts4
	AxisPts5             axisPts5
	AxisRescaleX         axisRescaleX
	DistOpX              distOpX
	DistOpY              distOpY
	DistOpZ              distOpZ
	DistOp4              distOp4
	DistOp5              distOp5
	FixNoAxisPtsX        fixNoAxisPtsX
	FixNoAxisPtsY        fixNoAxisPtsY
	FixNoAxisPtsZ        fixNoAxisPtsZ
	FixNoAxisPts4        fixNoAxisPts4
	FixNoAxisPts5        fixNoAxisPts5
	FncValues            FncValues
	Identification       identification
	NoAxisPtsX           noAxisPtsX
	NoAxisPtsY           noAxisPtsY
	NoAxisPtsZ           noAxisPtsZ
	NoAxisPts4           noAxisPts4
	NoAxisPts5           noAxisPts5
	NoRescaleX           noRescaleX
	OffsetX              offsetX
	OffsetY              offsetY
	OffsetZ              offsetZ
	Offset4              offset4
	Offset5              offset5
	Reserved             reserved
	RipAddrW             ripAddrW
	RipAddrX             ripAddrX
	RipAddrY             ripAddrY
	RipAddrZ             ripAddrZ
	RipAddr4             ripAddr4
	RipAddr5             ripAddr5
	SrcAddrX             srcAddrX
	SrcAddrY             srcAddrY
	SrcAddrZ             srcAddrZ
	SrcAddr4             srcAddr4
	SrcAddr5             srcAddr5
	ShiftOpX             shiftOpX
	ShiftOpY             shiftOpY
	ShiftOpZ             shiftOpZ
	ShiftOp4             shiftOp4
	ShiftOp5             shiftOp5
	StaticRecordLayout   staticRecordLayoutKeyword
	StaticAddressOffsets staticAddressOffsetsKeyword
}

type RightShift

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

type SignExtendKeyword added in v0.9.3

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

type StepSize

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

type SystemConstant added in v0.9.9

type SystemConstant struct {
	Name     string
	NameSet  bool
	Value    string
	ValueSet bool
}

type VirtualCharacteristic

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

Source Files

Jump to

Keyboard shortcuts

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