Форум по автодиагностике, автосканерам, ремонту, обслуживанию и эксплуатации автомобилей

Форум по автодиагностике, автосканерам, ремонту, обслуживанию и эксплуатации автомобилей (http://autoprogs.ru/index.php)
-   Диагностика VAG (AUDI / Volkswagen / Skoda / Seat) | ремонт электроники (http://autoprogs.ru/forumdisplay.php?f=228)
-   -   списки имеющихся ZDC (http://autoprogs.ru/showthread.php?t=37633)

BuHT 17.05.2020 00:09

А на а6 как разделяешь? Там же одним файлом несколько блоков идут.

Neo_ 17.05.2020 10:15

Xml пока не разделены, а продублированы.
Напишу прогу для разделения поблочно, когда надоест ручная работа.

список создаёт прога , сканируя вложенные папки:

Audi A7 2011

13

4G0907561 H21 4G0907561B 0053 000000000000000000F75AB9 4G8909863D 0036

----------



----------

package storage;

public class Runner {

public static void main(String[] args) {
UI ui = new UI();
ui.createAndShowGui(new ListCreator(), 200);
}
}

package storage;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class UI {
private JFrame frame = null;
private ListCreator listCreator;
private JButton butListOfUpdates = null;

public void createAndShowGui(ListCreator listCreator, int location) {
this.listCreator = listCreator;
frame = createFrame("ZDC List v2.0", location);
frame.setVisible(true);

}

private JFrame createFrame(String name, int location) {
frame = new JFrame(name);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.setLocation(location, 200);
frame.setSize(600, 65);
frame.setContentPane(createPane());
return frame;
}

private JPanel createPane() {
JPanel TextsPanel = new JPanel(new FlowLayout());
JPanel buttonsPanel = new JPanel(new FlowLayout());
butListOfUpdates = buttonListOfUpdates();
buttonsPanel.add(butListOfUpdates);
buttonsPanel.add(onExit());
TextsPanel.add(buttonsPanel, BorderLayout.SOUTH);
return TextsPanel;
}

private JButton onExit() {
JButton sendMessage = new JButton("Выход");
sendMessage.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
JButton sendMessage = (JButton) event.getSource();
onExit(sendMessage);
}
});
return sendMessage;
}

private void onExit(JButton sendMessage) {
System.exit(0);
}

private JButton buttonListOfUpdates() {
JButton sendMessage = new JButton("Обновить список");
sendMessage.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
JButton sendMessage = (JButton) event.getSource();
listOfUpdates(sendMessage);
}
});
return sendMessage;
}

private void listOfUpdates(JButton sendMessage) {
try {
listCreator.run();
} catch (IOException e) {
butListOfUpdates.setText("ошибка файла");
butListOfUpdates.setEnabled(false);
e.printStackTrace();
}
}

}

package storage;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Queue;

public class ListCreator {
FileChannel fc;
ByteBuffer bf;

private void writeToFile(String message) throws IOException {
byte[] messageBytes = message.getBytes(Charset.forName("UTF-16"));
bf.put(messageBytes);
bf.flip();
fc.write(bf);
bf.clear();
}

public void run() throws IOException {
FileOutputStream fOut;
bf = ByteBuffer.allocateDirect(64 * 1024);
String root = ".\\";
File rootDir = new File(root);
File resultFile = new File(root + "\\list.txt");
fOut = new FileOutputStream(resultFile);
fc = fOut.getChannel();
Queue<File> model = new PriorityQueue<>();
Collections.addAll(model, rootDir.listFiles());
while (!model.isEmpty()) {
File modelFile = model.remove();
if (modelFile.isDirectory()) {
Queue<File> ecu = new PriorityQueue<>();
Collections.addAll(ecu, modelFile.listFiles());
String modelName = "-------" + modelFile.getName() + "-------\n";
writeToFile(modelName);
while (!ecu.isEmpty()) {
File ecuFile = ecu.remove();
if (ecuFile.isDirectory()) {
Queue<File> parameters = new PriorityQueue<>();
Collections.addAll(parameters, ecuFile.listFiles());
while (!parameters.isEmpty()) {
File parametersFile = parameters.remove();
if (parametersFile.isDirectory()) {
String ecuAndParams = ecuFile.getName() + " " + parametersFile.getName() + "\n";
writeToFile(ecuAndParams);
}
}
}
}
}
}
fOut.close();
}
}

BuHT 17.05.2020 13:29

Цитата:

Сообщение от Neo_ (Сообщение 942178)
Xml пока не разделены, а продублированы.
Напишу прогу для разделения поблочно, когда надоест ручная работа.

список создаёт прога , сканируя вложенные папки:

Audi A7 2011

13

4G0907561 H21 4G0907561B 0053 000000000000000000F75AB9 4G8909863D 0036

----------





----------

package storage;

public class Runner {

public static void main(String[] args) {
UI ui = new UI();
ui.createAndShowGui(new ListCreator(), 200);
}
}

package storage;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class UI {
private JFrame frame = null;
private ListCreator listCreator;
private JButton butListOfUpdates = null;

public void createAndShowGui(ListCreator listCreator, int location) {
this.listCreator = listCreator;
frame = createFrame("ZDC List v2.0", location);
frame.setVisible(true);

}

private JFrame createFrame(String name, int location) {
frame = new JFrame(name);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.setLocation(location, 200);
frame.setSize(600, 65);
frame.setContentPane(createPane());
return frame;
}

private JPanel createPane() {
JPanel TextsPanel = new JPanel(new FlowLayout());
JPanel buttonsPanel = new JPanel(new FlowLayout());
butListOfUpdates = buttonListOfUpdates();
buttonsPanel.add(butListOfUpdates);
buttonsPanel.add(onExit());
TextsPanel.add(buttonsPanel, BorderLayout.SOUTH);
return TextsPanel;
}

private JButton onExit() {
JButton sendMessage = new JButton("Выход");
sendMessage.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
JButton sendMessage = (JButton) event.getSource();
onExit(sendMessage);
}
});
return sendMessage;
}

private void onExit(JButton sendMessage) {
System.exit(0);
}

private JButton buttonListOfUpdates() {
JButton sendMessage = new JButton("Обновить список");
sendMessage.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
JButton sendMessage = (JButton) event.getSource();
listOfUpdates(sendMessage);
}
});
return sendMessage;
}

private void listOfUpdates(JButton sendMessage) {
try {
listCreator.run();
} catch (IOException e) {
butListOfUpdates.setText("ошибка файла");
butListOfUpdates.setEnabled(false);
e.printStackTrace();
}
}

}

package storage;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Queue;

public class ListCreator {
FileChannel fc;
ByteBuffer bf;

private void writeToFile(String message) throws IOException {
byte[] messageBytes = message.getBytes(Charset.forName("UTF-16"));
bf.put(messageBytes);
bf.flip();
fc.write(bf);
bf.clear();
}

public void run() throws IOException {
FileOutputStream fOut;
bf = ByteBuffer.allocateDirect(64 * 1024);
String root = ".\\";
File rootDir = new File(root);
File resultFile = new File(root + "\\list.txt");
fOut = new FileOutputStream(resultFile);
fc = fOut.getChannel();
Queue<File> model = new PriorityQueue<>();
Collections.addAll(model, rootDir.listFiles());
while (!model.isEmpty()) {
File modelFile = model.remove();
if (modelFile.isDirectory()) {
Queue<File> ecu = new PriorityQueue<>();
Collections.addAll(ecu, modelFile.listFiles());
String modelName = "-------" + modelFile.getName() + "-------\n";
writeToFile(modelName);
while (!ecu.isEmpty()) {
File ecuFile = ecu.remove();
if (ecuFile.isDirectory()) {
Queue<File> parameters = new PriorityQueue<>();
Collections.addAll(parameters, ecuFile.listFiles());
while (!parameters.isEmpty()) {
File parametersFile = parameters.remove();
if (parametersFile.isDirectory()) {
String ecuAndParams = ecuFile.getName() + " " + parametersFile.getName() + "\n";
writeToFile(ecuAndParams);
}
}
}
}
}
}
fOut.close();
}
}

Прикольно, а то параметрий много, но все не подписаны.

Neo_ 17.05.2020 13:37

Вложений: 1
Эта прога всего лишь создаёт список заранее подписанных папок.

Прикреплена в скомпилированном виде

Neo_ 17.05.2020 17:12

-------Passat 2015-------
09 5Q0937086AJ 028 5Q0937086AJ 0162 V03935267PU 0001
44 5Q0909143E 204 5Q0909143K 2033 3G0074V____ 0139
5F 3Q0035846 820 3Q0035846 0627 5G0CV1v____ 0001
6C 5Q0980556 H07 5Q0980556 0231 3G0525v____ 0008
6D 5Q0959107H H13 5Q0959107H 0253 V03935239W 0001
A5 3Q0980654 H04 3Q0980654 0010 3G0HL1V____ 1211
B7 3Q0959435C 036 3Q0959435C 0709 V03935319BX 0001
BB 5Q0959595B 020 5Q0959595E 0041 V03935272KD 0001
BC 5Q0959595B 020 5Q0959595E 0041 V03935272QC 0001

Neo_ 24.05.2020 16:58

-------Tiguan 2018-------
76 3Q0919294 H08 3Q0919294E 0046 V03935296TQ 0001

Neo_ 25.05.2020 22:14

-------Audi A8 2010-------
34 4G0907553F H19 4G0907553G 0783 00000000000001C5 4H0909553J 0039
44 4G0909144Q H53 4G0909144T 0202 00000000000000000000C354 4H0909852L 0028
55 7P6907357B 001 4H4907357E 0100 000000000000000000669C02 4H0909865F 0022
8F 4H0980945C H14 4H0980945B 0080 000000000000000000000123 4H0909614C 0003
90 4H0980946C H14 4H0980946B 0080 000000000000000000000123 4H0909615C 0003

JONGOO 28.05.2020 16:29

это последняя дата, пожалуйста:shock:

Neo_ 30.05.2020 23:30

-------Audi Q7 2016-------
74 4M0907777B H37 4M0907777L 1244 4M0909576S 0009
74 SQ7 4M0907777B H37 4M0907777L 1244 4M0909576S 0009
74 SQ7 4M8907777C H52 4M8907777CA 2135 4M0909576AF 0006

Ajiekcander 21.08.2020 23:17

Приветствую, всех! Подскажите, может у кого то залежался файл параметрии PLA 3.0 в формате xml для октавии A7 fl? я так понимаю мне нужен файл V03935274DV ?

Обозначение системы PLA 3.0 12K
Версия ПО 0050 Версия АО H07
Номер детали VW/Audi 5QA919298D
Номер детали АО 5QA919298A


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

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