CompuScaleElement

XML tag

<COMPU-SCALE>

Module

autosar.datatype

Inherits

Contains the properties for one computation.

Computation Variants

Attributes in use for all variants:

  • label

  • adminData

ValueTable

ValueTable is also known as enumeration.

Factory Method: Computation.createValueTable

Attributes in use:

  • lowerLimit (int)

  • upperLimit (int)

  • textValue (str)

For basic enumerations the value of lowerLimit and upperLimit are equal to each other. You can also set lowerLimit and upperLimit to different values to denote an interval where the textValue applies.

Rational Scaling

Rational scaling, also known as linear scaling.

Factory Method: Computation.createRationalScaling

Attributes in use:

  • lowerLimit

  • upperLimit

  • lowerLimitType

  • upperLimitType

  • numerator

  • denominator

  • offset

BitMask

Factory method: Computation.createBitMask

Attributes in use:

  • mask

  • symbol

Constructor

datatype.CompuScaleElement(lowerLimit, upperLimit[, lowerLimitType = 'CLOSED'][, upperLimitType = 'CLOSED'][, label = None][, symbol = None][, textValue = None][, numerator = None][, denominator = None][, offset = None][, mask = None][, adminData = None])
参数
  • lowerLimit (int, float) – lower limit.

  • upperLimit (int, float) – upper limit.

  • lowerLimitType (str) – lower limit type ('OPEN', 'CLOSED').

  • upperLimitType (str) – upper limit type ('OPEN', 'CLOSED').

  • label (None, str) – Optional label (used instead of name attribute).

  • symbol (None, str) – Optional symbol name.

  • textValue (None, str) – Optional text value (used for enumration).

  • numerator (int, float) – Optional numerator (used for scaling).

  • denominator (int, float) – Optional denominator (used for scaling).

  • denominator – Optional offset (used for scaling).

  • mask (None, int) – mask (used for bit masks).

  • adminData (AdminData) – AdminData.

Attributes

Name

Type

Description

lowerLimit

int

<LOWER-LIMIT>

upperLimit

int

<UPPER-LIMIT>

lowerLimitType

str

INTERVAL-TYPE ('OPEN', 'CLOSED')

upperLimitType

str

INTERVAL-TYPE ('OPEN', 'CLOSED')

label

None, str

<SHORT-LABEL> (used as alternative to name attribute)

symbol

None, str

<SYMBOL>

textValue

None, str

<VT> (used for value table)

numerator

None, int, float

<COMPU-NUMERATOR><V> (used for scaling)

denominator

None, int, float

<COMPU-DENOMINATOR><V> (used for scaling)

offset

None, int, float

<COMPU-NUMERATOR><V> (used for scaling)

mask

None, int

<MASK> (used for bit masks)

adminData

None, AdminData

<ADMIN-DATA>