5.1.96. Retrieve registry key (preg_RetrieveKey)

Given a key, search the registry for the corresponding data.

5.1.96.1. Supported targets

All targets

5.1.96.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

5.1.96.3. Description

Given a key, selected through the Registry key mask parameter, the block searches through the ECU's registry to retrieve the key's data. If the key was found then the available outport is set to 1 and the remaing outports set to the key's data. If the key was not found then the available outport is set to zero.

Note

Not all ECUs are programmed with registry data. Older ECUs, do not contain registry data.

The registry contains a checksum. Failure of checksum verification results in the registry being unavailable.

5.1.96.4. Inports

  • sim_available

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport available is set to the value of this inport for simulation purposes.

    Range: 0 or 1

    Value type:Boolean
  • sim_serial

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport serial is set to the value of this inport for simulation purposes.

    Range: [0, 4294967295]

    Value type:Integer
  • sim_shift

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport shift is set to the value of this inport for simulation purposes.

    Range: [1, 3]

    Value type:Integer
  • sim_day

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport day is set to the value of this inport for simulation purposes.

    Range: [1, 31]

    Value type:Integer
  • sim_month

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport month is set to the value of this inport for simulation purposes.

    Range: [1, 12]

    Value type:Integer
  • sim_year

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport year is set to the value of this inport for simulation purposes.

    Range: [1970, 3000]

    Value type:Integer
  • sim_prefix

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport prefix is set to the value of this inport for simulation purposes.

    Range: [0, 99]

    Value type:Integer
  • sim_id

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport id is set to the value of this inport for simulation purposes.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • sim_part

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport part is set to the value of this inport for simulation purposes.

    Range: [0, 999999]

    Value type:Integer
  • sim_issue

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport issue is set to the value of this inport for simulation purposes.

    Range: [0, 255]

    Value type:Integer
  • sim_mod

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport mod is set to the value of this inport for simulation purposes.

    Range: [0, 255]

    Value type:Integer
  • sim_fpart_a

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outports fpart_a are set to the value of these inports for simulation purposes.

    Range: [0, 65535]

    Value type:Integer
  • sim_fpart_b

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outports fpart_b are set to the value of these inports for simulation purposes.

    Range: [0, 65535]

    Value type:Integer
  • sim_fid_a

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport fid_a is set to the value of this inport for simulation purposes.

    Range: ['A', 'Z'] ASCII characters

    Value type:Integer
  • sim_fid_b

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport fid_b is set to the value of this inport for simulation purposes.

    Range: ['A', 'Z'] ASCII characters

    Value type:Integer
  • sim_build_type_a

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport build_type_a is set to the value of this inport for simulation purposes.

    Range: ['A', 'Z'] ASCII characters

    Value type:Integer
  • sim_build_type_b

    Only used under simulation and when the parameter Provide simulation inports is ticked. The outport build_type_b is set to the value of this inport for simulation purposes.

    Range: ['A', 'Z'] ASCII characters

    Value type:Integer
  • sim_value

    Only used under simulation and when the parameter Provide simulation inports is ticked and if the Registry key mask parameter is set to Generic. The outport value is set to the value of this inport for simulation purposes.

    Size: 6

    Range: [0, 255]

    Value type:uint8_T vector

5.1.96.5. Outports

  • available

    Whether the key could be retrieved or not. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: 0 or 1

    Value type:Boolean
  • serial

    The ECU's serial number. Outport available if the Registry key mask parameter is set to ECU serial number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 4294967295]

    Value type:Integer
  • shift

    The team shift at the point of manufacture. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [1, 3]

    Value type:Integer
  • day

    The day of the month at the point of manufacture. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [1, 31]

    Value type:Integer
  • month

    The month of the year at the point of manufacture. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [1, 12]

    Value type:Integer
  • year

    The year at the point of manufacture. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [1970, 3000]

    Value type:Integer
  • prefix

    The prefix of the engineering part number, e.g., 01 from 01T-068165. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 99]

    Value type:Integer
  • id

    The letter of the engineering part number, e.g., T from 01T-068165. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • part

    The remainder of the engineering part number, e.g., 068165 from 01T-068165. Outport available if the Registry key mask parameter is set to ECU date of manufacture. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 999999]

    Value type:Integer
  • issue

    The ECU's PCB issue number, representing the PCB design. Outport available if the Registry key mask parameter is set to ECU PCB issue and modification number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 255]

    Value type:Integer
  • mod

    The ECU's PCB modification number, representing hand modifications to the PCB to match the PCB design intent. Outport available if the Registry key mask parameter is set to ECU PCB issue and modification number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 255]

    Value type:Integer
  • fpart_a

    The pre numerical part to the factory part number, which represents a detailed build specification for the ECU. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 65535]

    Value type:Integer
  • fpart_b

    The post numerical part to the factory part number, which represents a detailed build specification for the ECU. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: [0, 65535]

    Value type:Integer
  • fid_a

    The first letter identifier that separates the pre and post factory part number. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • fid_b

    The second letter identifier that separates the pre and post factory part number. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • build_type_a

    The first letter of a two letter identifier representing the factory part number build type. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • build_type_b

    The second letter of a two letter identifier representing the factory part number build type. Outport available if the Registry key mask parameter is set to ECU factory part number. Under simulation, if the Provide simulation inports parameter isn't ticked, the outport is set to zero. The signal attached to the outport must be set as ExportedGlobal.

    Range: ['A', 'Z'] ASCII character

    Value type:Integer
  • value

    The raw data bytes of the registry key matching the Generic key. Outport available if the Registry key mask parameter is set to Generic. Under simulation, if the Provide simulation inports parameter isn't ticked, each index of the outport is set to 0. This value is also output if outport available shows that the registry is unavailable. The signal attached to the outport must be set as ExportedGlobal.

    Size: 6

    Range: [0, 255]

    Value type:uint8_T vector

5.1.96.6. Mask parameters

  • Registry key

    A drop down to specify the registry key to retrieve.

    Generic

    The raw data of the key matching the Generic key parameter is returned.

    ECU serial

    The serial number is a 32-bit positive integer. Serial numbers across different families of ECUs do not overlap.

    ECU date of manufacture

    The date is composed as (shift) dd:mm:yy, where the shift identifies the team involved in the manufacturing process.

    ECU engineering part number

    The engineering part number matches the pattern: prefix letter engineering-part-number. For instance, the engineering part number assigned to the M250-000 is 01T068165, where 01 represents the prefix, T represents the letter and 068165 represents the engineering part number.

    ECU PCB issue and modification number

    The issue level represents a specific design of PCB. Changes to the issue level may have an effect on the platform library.

    The modification level represents what changes were performed to the PCB after manufacturing to correct issue level design mistakes. Changes to the modification level should not have an effect on the platform library.

    ECU factory part number

    The identifier for the build specification used to create the ECU, matching the pattern value letter value, e.g., 450FT1024.

    ECU factory part number build type

    An indication of the build type, usually appended to the factory part number, e.g., 450FT1024-E2, where E2 indicates second spec. engineering build.

    Value type:List
    Calibratable:No
  • Generic key

    The generic key to read from the registry. Parameter available if the Registry key mask parameter is set to Generic.

    Range: [0, 65535]

    Value type:uint16_T
    Calibratable:Yes, offline
  • Provide simulation inports

    Tick to enable simulation inports.

    Value type:Boolean
    Calibratable:No

5.1.96.7. Notes

All the supported keys for the registry and their corresponding data is defined below. Each Registry key mask parameter selection points to a unique key except for the Generic key parameter which can be used to select any generic key. The table below shows which Registry key dropdown selection maps to which key and also shows the Key ID values that can be used if the Generic registry key is selected.

Note

All numeric values are stored in Motorola format (i.e. MSB first)

Table 5.5. Supported Key/Value pairs

Registry Key SelectionKey IDData bytesDescription
012345
ECU serial number0x0001UnusedSerial NumberECU Serial Number as Integer
ECU date of manufacture0x0002UnusedShift [1...3]DayMonthYearDate of Manufacture
ECU engineering part number0x0003Prefix U8LetterValue U32ECU Engineering Part Number
ECU PCB issue and modification number0x0004UnusedH/W IssueH/W ModHW Issue and Mod State
ECU factory part number0x0005Value U16LetterLetterValue U16Factory Part Number
ECU factory part number build type0x0006UnusedASCIIASCIIFactory Part Number (Build Type)
Generic0x0008Value U48ECU Serial Number as Long Integer
Generic0x0009Value U48Board Serial Number
Generic0x000AASCIIManufacturer Name
Generic0x000BUnusedXETK presentDeveloper Hardware
Generic0x0080Prefix U8LetterValue U32Bootloader Part Number at Manufacture
Generic0x0081UnusedValue U16Bootloader Issue at Manufacture
Generic0x0082ASCIIHardware Product Name Part 1
Generic0x0083ASCIIHardware Product Name Part 2