Добро пожаловать на форум по автодиагностике, автосканерам! Чтобы общаться на форуме и получить доступ к информации, пожалуйста, зарегистрируйтесь!









Автосканеры, оборудование для диагностики


Вернуться   Форум по автодиагностике, автосканерам, ремонту, обслуживанию и эксплуатации автомобилей > BMW > Диагностика BMW | ремонт электроники
Расширенный поиск

Диагностика BMW | ремонт электроники Все о кодировании, программировании, диагностике BMW. Любые вопросы, а также обсуждение оборудования (BMW ICOM | BMW INPA | BMW SCANNER | BMW OPS | BMW GT1) и программного обеспечения.

  • Диагностика БМВ
В данном разделе форума Вы можете обсудить любые вопросы по диагностике БМВ, а также по работе с оборудованием:

Немного полезного про CAFD - файлы


Ответ
 
LinkBack Опции темы Поиск в этой теме Опции просмотра
Старый 29.08.2014, 23:26   #1 (permalink)
Админ
 
Аватар для Admin
 
Регистрация: 07.09.2008
Сообщений: 3,577
Вы сказали Спасибо: 265
Поблагодарили 13,476 раз(а) в 1,261 сообщениях
Сказал(а) Фууу!: 28
Сказали Фууу! 0 раз(а) в 0 сообщениях
Откуда: Москва
Авто: Ford Fiesta
По умолчанию Немного полезного про CAFD - файлы

Немного полезного про CAFD - файлы. Случайно наткнулся в интернете:

We all know cafd files are required for coding, and that new i-step levels require extra cafd files. But there is more to cafd files...

First, lets look at the file name. The name is in the form of cafd_iiiiiiii.caf.xxx_yyy_zzz

The iiiiiiii is the numeric id of the ECU to which this cafd file applies. Even if the same ECU appears in multiple series (e.g. F10, F20 and F30) there is only one cafd file for the ECU - the ECU id stays the same across series.

xxx, yyy, zzz are the major, minor and patch versions of the cafd file. This number gets bumped up when new functionality is integrated (i-step) into the cafd.

OK, that was boring

But fortunately it is not the end of the story. Now open a cafd file in the e-sys caf editor (please use cafd_000000f9.caf.007_003_167 is you want to follow the examples below] and drill down to Header | Allgemein | Fahrzeugprofil-Info and choose a model series. If I open F020 then I see the following:

PK=FAFP
ID=000009B7
MV=001
SV=000
PV=061
This tells us we want to open the fafp_000009b7.fap.001_000_061 file [you see the pattern]. This is an XML file and you can view it in Internet Explorer by dragging and dropping it on an Internet Explorer window. (You can also view it in an text editor.) Looking at the fafp file header it also tells you in it is for the F20 series... a good double check. But we leave further exploring of this file to another day.

BTW, this also tells us why it is not always enough to just copy the missing cafd's if you want to update your PSdZ data.

Lets get back to the caf editor...

The general format of a cafd file has a Header section (you can explore the rest of it yourself) and a Daten section. Underneath the Daten section you always get a collection of functional groupings (with what we assume are more-or-less related functions within a group); each group has Aktivbedingung and Funktionen sections. I know this is a bit of revision for some/most - sorry

The Aktivbedingung section probably controls whether this functional group is coded for each series listed [I'm not sure if a false() value next to a series will code all default values to the ECU or just not code that section at all]

The Funktionen section has the well know coding variables/options. Below each variable you will get a SpeicherInfo folder (which tells e-sys how to format/assemble this variable as part of the coding data in the ncd file) and one folder for each pre-defined coding value for the variable.

A visual representation looks like this:

Header
Daten

Functional group [e.g. 3000 HMI]

Aktivbedingung
Funktionen

MACRO_PDC

SpeicherInfo
aktiv
nicht_aktiv
MACRO_PDC_TOPVIEW
etc...
Now for the interesting (I hope!) part - search for the CDMM_USB_VIDEO entry. If you expand the entry you will find sections named "none", "first_usb", "second_usb" and "both" - these are the possible values e-sys presents to you in the edit drop-down box when you fdl-edit. The "Werte" value is what gets written to the .ncd coding file when you choose that entry.

You will also see each value has "Bedingung" folders for each series... if you expand that folder you will get an entry called "XPath". It may either read "XPath=false()", "XPath=true()" or something like "XPath=boolean(//cat[@val<"128"][crit[@val=1411]])". The latter ones are most interesting.

But before I go on - among the various values for a variable (coding option), only one of the Bedingung sections should evaluate to true... (either trivially by using true() or a more complicated expression). The werte associated with this value entry is what get used when a ECU is coded based on the FA (vehicle order).

So what exactly does "XPath=boolean(//cat[@val<"128"][crit[@val=1411]])" mean? [see the Bedingung criteria for the "second_usb" value] For starters, as the text might imply it is an XPath query - a means to search XML documents for values. What XML document? The fafp document we identified above of course

For more info on XPath see for example [Только для зарегистрированных...]

The Xpath query is searching the fafp document to see if it can find an element with a category value of less than 128, and an criteria value equal to 1411. Thus is will not match entries like this:
[space inserted after opening "<" else the XML does not display]

< fpElement categoryVal="11" criteriaVal="142">
< fpElement categoryVal="255" criteriaVal="1411">
but will match this entry:

< fa2fpMapping from="0309">
< faElement code="6NR" selector="W" />
< fpElement categoryVal="9" criteriaVal="1411">
< criteriaName>6NR_BMW_APPS< /criteriaName>
< criteriaNameEN>6NR_BMW_APPS< /criteriaNameEN>
< categoryName>Sonderausstattung< /categoryName >
< categoryNameEN>Option< /categoryNameEN>
< /fpElement>
< /fa2fpMapping>
The implication of all of this is that the CDMM_USB_VIDEO variable gets set to "second_usb" when the car includes the "6NR" optional equipment. And that likely this option was available from 0309 (March 09) build onwards.

I'm sure you can see the potential here...

Hint: you can search for @val=1411] in the viewer. Of course, settings related to a specific option may span multiple cafd files.

But there is also a limitation - some things require actual hardware and no amount of coding will make it work.

Side observation - the criteriaVal values seem unique regardless of the categoryVal, as long as the category is <128. Category 255 (model change dates) do have some conflicting criteriaVal value.

p.s. Sorry for the long post but alot to say

Edit: forgot to mention - some variables (options) will only have true() and false() Bedingung values - this probably means that this variable is not influenced by any add-on options. You will see a fair number of these.
Admin вне форума   Ответить с цитированием
Эти 4 пользователя(ей) сказали Спасибо Admin за сообщение:
Ironium (30.08.2014), rus5 (30.08.2014), sana_q (30.08.2014), SLT (15.10.2016)
Ответ

Метки
esys cafd






Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Trackbacks are Вкл.
Pingbacks are Вкл.
Refbacks are Вкл.



Текущее время: 14:55. Часовой пояс GMT +3.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc. Перевод:
zCarot
Автодиагностика и автосканеры.