Форум программистов, компьютерный форум, киберфорум
C++ Builder
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
 
Рейтинг 4.76/25: Рейтинг темы: голосов - 25, средняя оценка - 4.76
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18

Преобразование неизвестного формата (.US0) в .txt

11.01.2013, 23:34. Показов 5274. Ответов 30
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Подскажите пожалуйста способ, как преобразовать формат .US0 (его структура известна) в .txt в Builder C++. Например, как с использованием посимвольного чтения сделать вывод на экран информации из заголовка файла и так далее, а в следствии сохранения этой информации в файле текстового формата в определенной последовательности?
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
11.01.2013, 23:34
Ответы с готовыми решениями:

Преобразование визуальных данных из формата RGB в YUV (4:2:0)
Помогите, пожалуйста, добрые люди. При создании программы преобразовании визуальных данных из формата RGB в YUV наткнулся на проблему в...

Преобразовать текст из *.txt (в любой кодировке) в картинку формата *.bmp
Привет) Нужна помощь с написанием программы..нужна информация) Задание: Написать программу, которая преобразует текст из *.txt (в...

Преобразование исходного текстового формата txt в таблицу xls
Здравствуйте, подскажите пожалуйста как перевести из *.txt файла в *.xls, просмотрев несколько видеороликов на Youtube, я только изобразил...

30
 Аватар для BRcr
4043 / 2333 / 292
Регистрация: 03.02.2011
Сообщений: 5,066
Записей в блоге: 10
03.03.2013, 14:11
Студворк — интернет-сервис помощи студентам
Это руководство мало чего говорит о самом формате, мучай препода, пока не выдаст все, что знает.
0
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
03.03.2013, 14:15  [ТС]
Хорошо, завтра его помучаю)))
0
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
06.03.2013, 19:47  [ТС]
Вот здесь есть полная структура, там описано, как хранится информация - значения параметров и длина информации в файла типа US0 с укороченным индексом.
Вложения
Тип файла: docx Структура файла.docx (20.1 Кб, 14 просмотров)
0
 Аватар для BRcr
4043 / 2333 / 292
Регистрация: 03.02.2011
Сообщений: 5,066
Записей в блоге: 10
08.03.2013, 15:52
Всех читательниц прекрасного пола поздравляю с восьмым днем весны!

На досуге поглядел, что там за us0.
Вот таким кодом вычитываем заголовки:
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
struct us0_file_head {
    char us0_letters[5];
    char device_name[9];
    char test_name[9];
    char test_date[9];
    float start_time;
    float end_time;
    unsigned short records_count;
    char RF;
    unsigned int commentary_length;
    char *commentary;
    float time_fix;
    us0_file_head( ) {
        commentary = NULL;
    }
    ~us0_file_head( ) {
        if ( commentary ) {
            delete[]commentary;
        }
    }
    void fill_in( ifstream &in ) {
        in.read( us0_letters, 4 );
        in.read( device_name, 8 );
        in.read( test_name, 8 );
        in.read( test_date, 8 );
        in.read( ( char * ) &start_time, 4 );
        in.read( ( char * ) &end_time, 4 );
        in.read( ( char * ) &records_count, 2 );
        in.read( ( char * ) &RF, 1 );
        in.read( ( char * ) &commentary_length, 1 );
        in.read( ( char * ) &time_fix, 4 );
        commentary = new char[commentary_length + 1];
        in.read( commentary, commentary_length - 4 );
        commentary[commentary_length] = '\0';
    }
    void out( ostream &o ) {
        o << "us0_letters = " << us0_letters <<
                       "\ndevice_name = " << device_name <<
                       "\ntest_name = " << test_name <<
                       "\ntest_date = " << test_date <<
                       "\nstart_time = " << start_time <<
                       "\nend_time = " << end_time <<
                       "\nrecords_count = " << records_count <<
                       "\nRF = " << RF <<
                       "\ncommentary_length = " << commentary_length <<
                       "\ntime_fix = " << time_fix <<
                       "\ncommentary = " << commentary;
    }
};
struct record_head {
    char object_name[13];
    unsigned short index;
    unsigned short object_format;
    unsigned short object_type;
    float a0, a1;
    char param_dimension[9];
     unsigned short param_length;
    void fill_in( ifstream &in ) {
        in.read( object_name, 12 );
        in.read( ( char * ) &index, 2 );
        in.read( ( char * ) &object_format, 1 );
        in.read( ( char * ) &object_type, 1 );
        in.read( ( char * ) &a0, 4 );
        in.read( ( char * ) &a1, 4 );
        in.read( param_dimension, 8 );
    }
    void out( ostream &o ) {
        o << "\n\nobject_name = " << object_name <<
                       "\nindex = " << index <<
                       "\nobject_format = " << object_format <<
                       "\nobject_type = " << object_type <<
                       "\na0 = " << a0 <<
                       "\na1 = " << a1 <<
                       "\nparam_dimension = " << param_dimension;
    }
};
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    using namespace std;
    //////////////////////////////////////
    ifstream in( "Rvd.us0" );
    ofstream out( "rvd.txt" );
    us0_file_head fh;
    vector <record_head> records;
    record_head temp;
 
    SecureZeroMemory( &fh, sizeof( us0_file_head ) );
 
    fh.fill_in( in );
    fh.out( cout );
    fh.out( out );
 
    for ( size_t i = 0; i < fh.records_count; ++i ) {
        SecureZeroMemory( &temp, sizeof( record_head ) );
        temp.fill_in( in );
        records.push_back( temp );
        records.back( ).out( cout );
        records.back( ).out( out );
    }
    in.close( );
    out.close( );
Я решил не вычитывать структурки целиком, хоть выравнивание и позволяет, так как строковые параметры в составе структур в файл записаны зачастую без завершающих нулей и все равно придется их вручную дописывать.

Вот выход с тестового файла в виде текста:
Кликните здесь для просмотра всего текста
us0_letters = УС0
device_name = 8K82K3
test_name = ПPОГPАММ
test_date = 15.08.97
start_time = 0
end_time = 921.656
records_count = 260
RF = 
commentary_length = 4
time_fix = 0
commentary =

object_name = ВРЕМЯ-СЕК
index = 0
object_format = 4
object_type = 0
a0 = 0
a1 = 0
param_dimension = CEK

object_name = ГПШ31
index = 34
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = KГ/CM2

object_name = HC2
index = 35
object_format = 4
object_type = 3
a0 = -15
a1 = 15
param_dimension = M/C

object_name = HC3
index = 36
object_format = 4
object_type = 3
a0 = -15
a1 = 15
param_dimension = M/C

object_name = HC4
index = 37
object_format = 4
object_type = 3
a0 = -15
a1 = 15
param_dimension = M/C

object_name = БC2
index = 38
object_format = 4
object_type = 3
a0 = -20
a1 = 20
param_dimension = M/C

object_name = БC3
index = 39
object_format = 4
object_type = 3
a0 = -20
a1 = 20
param_dimension = M/C

object_name = БC4
index = 40
object_format = 4
object_type = 3
a0 = -20
a1 = 20
param_dimension = M/C

object_name = УT-31
index = 41
object_format = 4
object_type = 3
a0 = -50
a1 = 50
param_dimension = MA

object_name = УT-32
index = 42
object_format = 4
object_type = 3
a0 = -50
a1 = 50
param_dimension = MA

object_name = УT-33
index = 43
object_format = 4
object_type = 3
a0 = -50
a1 = 50
param_dimension = MA

object_name = УT-34
index = 44
object_format = 4
object_type = 3
a0 = -50
a1 = 50
param_dimension = MA

object_name = УПKP31
index = 45
object_format = 4
object_type = 3
a0 = -45
a1 = 45
param_dimension = ГPAДУC

object_name = УПKP33
index = 46
object_format = 4
object_type = 3
a0 = -45
a1 = 45
param_dimension = ГPAДУC

object_name = УПKP32
index = 47
object_format = 4
object_type = 3
a0 = -45
a1 = 45
param_dimension = ГPAДУC

object_name = УПKP34
index = 48
object_format = 4
object_type = 3
a0 = -45
a1 = 45
param_dimension = Й

object_name = УПP31
index = 49
object_format = 4
object_type = 3
a0 = -150
a1 = 150
param_dimension = ГPAДУC

object_name = TT
index = 50
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = T-Г
index = 51
object_format = 4
object_type = 3
a0 = -10
a1 = 10
param_dimension = ГPAДУC

object_name = PT
index = 52
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = P-Г
index = 53
object_format = 4
object_type = 3
a0 = -10
a1 = 10
param_dimension = ГPAДУC

object_name = BT
index = 54
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = B-Г
index = 55
object_format = 4
object_type = 3
a0 = -10
a1 = 10
param_dimension = ГPAДУC

object_name = TБ-31
index = 56
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = AMПEP

object_name = KБ-31
index = 57
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = HБ-31
index = 58
object_format = 4
object_type = 3
a0 = 24
a1 = 34
param_dimension = BOЛЬT

object_name = PГC
index = 59
object_format = 4
object_type = 3
a0 = 0
a1 = 6
param_dimension = BOЛЬT

object_name = POC
index = 60
object_format = 4
object_type = 3
a0 = 0
a1 = 6
param_dimension = BOЛЬT

object_name = ПДC-3
index = 61
object_format = 4
object_type = 3
a0 = -42
a1 = 42
param_dimension = ГPAДУC

object_name = OДФK31
index = 62
object_format = 4
object_type = 3
a0 = 0
a1 = 200
param_dimension = KГ/CM2

object_name = OДЭ31
index = 63
object_format = 4
object_type = 3
a0 = 0
a1 = 15
param_dimension = KГ/CM2

object_name = ГДЭ31
index = 64
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = KГ/CM2

object_name = ПCT-31
index = 65
object_format = 4
object_type = 3
a0 = 0
a1 = 250
param_dimension = KГ/CM2

object_name = OДHP-31
index = 66
object_format = 4
object_type = 3
a0 = 0
a1 = 15
param_dimension = KГ/CM2

object_name = ГДHP-31
index = 67
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = KГ/CM2

object_name = OПHP31
index = 68
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = KГ/CM2

object_name = ГПHP31
index = 69
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = KГ/CM2

object_name = OПH31
index = 70
object_format = 4
object_type = 3
a0 = 0
a1 = 400
param_dimension = KГ/CM2

object_name = OП-32
index = 71
object_format = 4
object_type = 3
a0 = -2
a1 = 10
param_dimension = EД.ПEP.

object_name = БП-32
index = 72
object_format = 4
object_type = 3
a0 = -1.5
a1 = 1.5
param_dimension = EД.ПEP.

object_name = HП-32
index = 73
object_format = 4
object_type = 3
a0 = -1.5
a1 = 1.5
param_dimension = EД.ПEP.

object_name = HБГ31
index = 74
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = ATM

object_name = БГ31
index = 75
object_format = 4
object_type = 3
a0 = 0
a1 = 6
param_dimension = ATM

object_name = ДMГO31
index = 76
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = ATM

object_name = БO31
index = 77
object_format = 4
object_type = 3
a0 = 0
a1 = 6
param_dimension = ATM

object_name = HБO31
index = 78
object_format = 4
object_type = 3
a0 = 0
a1 = 10
param_dimension = ATM

object_name = TCT2
index = 79
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCT3
index = 80
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCT4
index = 81
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCP2
index = 82
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCP3
index = 83
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCP4
index = 84
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCB2
index = 85
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCB3
index = 86
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = TCB4
index = 87
object_format = 4
object_type = 3
a0 = -1560
a1 = 1560
param_dimension = Г.CM

object_name = B2T
index = 88
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = HC
index = 89
object_format = 4
object_type = 3
a0 = -20
a1 = 20
param_dimension = M/C

object_name = БC
index = 90
object_format = 4
object_type = 3
a0 = -40
a1 = 40
param_dimension = M/C

object_name = THC
index = 91
object_format = 4
object_type = 3
a0 = -40
a1 = 40
param_dimension = MKA

object_name = TБC
index = 92
object_format = 4
object_type = 3
a0 = -40
a1 = 40
param_dimension = MKA

object_name = T-ГПC31
index = 93
object_format = 4
object_type = 3
a0 = 0
a1 = 490
param_dimension = ГPAДУC

object_name = TOДФK31
index = 94
object_format = 4
object_type = 3
a0 = 0
a1 = 960
param_dimension = ГPAДУC

object_name = T-MГO31
index = 95
object_format = 4
object_type = 3
a0 = 0
a1 = 490
param_dimension = ГPAДУC

object_name = T2T
index = 96
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = T3T
index = 97
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = T4T
index = 98
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = B3T
index = 99
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = P3T
index = 100
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = P4T
index = 101
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = B4T
index = 102
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = HПT31-21
index = 103
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT31-22
index = 104
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT31-31
index = 105
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT31-32
index = 106
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT31-41
index = 107
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT31-42
index = 108
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT32-1
index = 109
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT32-2
index = 110
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = HПT32-3
index = 111
object_format = 4
object_type = 3
a0 = 34
a1 = 46
param_dimension = BOЛЬT

object_name = B
index = 112
object_format = 4
object_type = 3
a0 = -30
a1 = 30
param_dimension = ГPAД/CEK

object_name = P
index = 113
object_format = 4
object_type = 3
a0 = -30
a1 = 30
param_dimension = ГPAД/CEK

object_name = T
index = 114
object_format = 4
object_type = 3
a0 = -30
a1 = 30
param_dimension = ГPAД/CEK

object_name = ДДO-31
index = 115
object_format = 4
object_type = 3
a0 = 250
a1 = 1
param_dimension = MM.PT.CT

object_name = ДПO-31
index = 116
object_format = 4
object_type = 3
a0 = 400
a1 = 1
param_dimension = MM.PT.CT

object_name = ЗAУД-A
index = 117
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = ???

object_name = ЗAУД-Б
index = 118
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = ???

object_name = ЗAУД-B
index = 119
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = ???

object_name = KФKД-A
index = 120
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = KФKД-Б
index = 121
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ЛК1-3___Kmin
index = 122
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД.

object_name = ЛК1-3___Kmax
index = 123
object_format = 4
object_type = 3
a0 = 200
a1 = 512
param_dimension = ДB.EД.

object_name = ЛК3-3___Kmin
index = 124
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД.

object_name = ЛК3-3___Kmax
index = 125
object_format = 4
object_type = 3
a0 = 200
a1 = 512
param_dimension = ДB.EД.

object_name = ЛК4-3___Kmin
index = 126
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД.

object_name = ЛК4-3___Kmax
index = 127
object_format = 4
object_type = 3
a0 = 200
a1 = 512
param_dimension = ДB.EД.

object_name = ЛК5-3___Kmin
index = 128
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД,

object_name = ЛК5-3___Kmax
index = 129
object_format = 4
object_type = 3
a0 = 250
a1 = 512
param_dimension = ДB.EД.

object_name = ЛК6-3___Kmin
index = 130
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД.

object_name = ЛК6-3___Kmax
index = 131
object_format = 4
object_type = 3
a0 = 200
a1 = 512
param_dimension = ДB.EД.

object_name = ЛК7-3___Kmin
index = 132
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДB.EД.

object_name = ЛК7-3___Kmax
index = 133
object_format = 4
object_type = 3
a0 = 200
a1 = 512
param_dimension = ДB.EД.

object_name = КСТ-31
index = 134
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = АТИ

object_name = КСТ-32
index = 135
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = АТИ

object_name = КСТ-33
index = 136
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = АТИ

object_name = КСТ-34
index = 137
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = АТИ

object_name = 3ПСТА
index = 138
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = ЗПСТБ
index = 139
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = 3ПСТВ
index = 140
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = КПСА
index = 141
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = КПСБ
index = 142
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = КПСВ
index = 143
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ???

object_name = КП-3Ф
index = 144
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = КОД-КЗД
index = 145
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПСС-3-УГ-УО
index = 146
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПТП2-Ф
index = 147
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПТП3-Ф
index = 148
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПТП4-Ф
index = 149
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = СКТ-1,2,3Ф
index = 150
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = СКТВ-1,2,3Ф
index = 151
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ИАКЛКИЗ123Ф
index = 152
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = КФВ-КДВ-САДУ
index = 153
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ОГФЗОГДЗСОГЧ
index = 154
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПМОЗПСГАПМГЗ
index = 155
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ПТPЗПСГБ-ПТД
index = 156
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ЗДPГСТ3ВД21
index = 157
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = КП3ВКГЗСГОН6
index = 158
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = PК3-ПК-ГК
index = 159
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = ОЛ1-ВД32
index = 160
object_format = 4
object_type = 3
a0 = 0
a1 = 100
param_dimension = ПPOЦEHT

object_name = P2T
index = 161
object_format = 4
object_type = 3
a0 = -3.1
a1 = 3.1
param_dimension = ГPAДУC

object_name = ЛК3-3___Kmin
index = 162
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК3-3___Kmax
index = 163
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК4-3___Kmin
index = 164
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК4-3___Kmax
index = 165
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК5-3___Kmin
index = 166
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК5-3___Kmax
index = 167
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК6-3___Kmin
index = 168
object_format = 4
object_type = 3
a0 = 20
a1 = 200
param_dimension = ДВ.ЕД.

object_name = ЛК6-3___Kmax
index = 169
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК2-3___Kmin
index = 170
object_format = 4
object_type = 3
a0 = 0
a1 = 512
param_dimension = ДB.EД

object_name = ЛК2-3___Kmax
index = 171
object_format = 4
object_type = 3
a0 = 0
a1 = 512
param_dimension = ДB.EД

object_name = ЛК7-3___Kmax
index = 172
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК1-3___Kmin
index = 173
object_format = 4
object_type = 3
a0 = 20
a1 = 100
param_dimension = вольт

object_name = ЛК1-3___Kmax
index = 174
object_format = 4
object_type = 3
a0 = 250
a1 = 512
param_dimension = вольт

object_name = ЛК2-3___Kmin
index = 175
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ЛК2-3___Kmax
index = 176
object_format = 4
object_type = 3
a0 = 0
a1 = 0
param_dimension = вольт

object_name = ОП32-ЗУ
index = 177
object_format = 4
object_type = 3
a0 = -2
a1 = 10
param_dimension = EД.ПEP.

object_name = КП3-1
index = 178
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КП3-2
index = 179
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КП3-3
index = 180
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПК
index = 181
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ОЛ1
index = 182
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПСС3
index = 183
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = УГ3
index = 184
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = УО3
index = 185
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КОД3
index = 186
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КЗД3
index = 187
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = НP
index = 188
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КОP2
index = 189
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КОP3
index = 190
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КОP4
index = 191
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПТП-2
index = 192
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПТП-3
index = 193
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПТП-4
index = 194
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПPТ-2
index = 195
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПPТ-3
index = 196
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПPТ-4
index = 197
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННТ-2
index = 198
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННP-2
index = 199
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННВ-2
index = 200
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННТ-3
index = 201
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННP-3
index = 202
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННВ-3
index = 203
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННТ-4
index = 204
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННP-4
index = 205
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ННВ-4
index = 206
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПСГА
index = 207
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПСГБ
index = 208
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПСГВ
index = 209
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КФА
index = 210
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КФБ
index = 211
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КФВ
index = 212
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КДА
index = 213
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КДБ
index = 214
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = КДВ
index = 215
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ОГФ3
index = 216
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ОГД3
index = 217
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПФ3
index = 218
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПД3
index = 219
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = САДУ
index = 220
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СОГЧ
index = 221
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ЗДP3
index = 222
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМГ3
index = 223
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМО3
index = 224
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВКГ3
index = 225
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ГСТ3
index = 226
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВД32
index = 227
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ГК
index = 228
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = PК3
index = 229
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМГ2
index = 230
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМО2
index = 231
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВД21-В
index = 232
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПТP3
index = 233
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПТД
index = 234
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СГОН6
index = 235
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ИАКЛК3-1
index = 236
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ИАКЛК3-2
index = 237
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ИАКЛК3-3
index = 238
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = PК2-1
index = 239
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = PК2-2
index = 240
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = PК2-3
index = 241
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМГ3-1
index = 242
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМГ3-2
index = 243
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ПМГ3-3
index = 244
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ГСТ3-1
index = 245
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ГСТ3-2
index = 246
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ГСТ3-3
index = 247
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ППК3-1
index = 248
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ППК3-2
index = 249
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ППК3-3
index = 250
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВКГ3-1
index = 251
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВКГ3-2
index = 252
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ВКГ3-3
index = 253
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СКТ-1
index = 254
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СКТ-2
index = 255
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СКТ-3
index = 256
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБО3-1
index = 257
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБО3-2
index = 258
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБО3-3
index = 259
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБГ3-1
index = 260
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБГ3-2
index = 261
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СБГ3-3
index = 262
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СД31-1
index = 263
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СД31-2
index = 264
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = СД31-3
index = 265
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = 1ВДШ-1
index = 266
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = 1ВДШ-2
index = 267
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = 1ВДШ-3
index = 268
object_format = 4
object_type = 1
a0 = 0
a1 = 0
param_dimension =

object_name = ИАКЛКИ3-1
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = АКЛКИ3-2
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = АКЛКИ3-3
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 19А-1
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 19А-2
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 19А-3
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 18-1
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 18-2
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = 18-3
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = КТВ-1
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = КТВ-2
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = КТВ-3
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = ПВУ
index = 1025
object_format = 1
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name = ВПВУ
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =

object_name =
index = 0
object_format = 0
object_type = 0
a0 = 0
a1 = 0
param_dimension =


Кстати, будешь текстовый файл открывать - там кодировка OEM 866, так как такая кодировка данных в тестовом us0.

В итоге имеем структуру us0_file_head и вектор структур record_head - можно вычитывать данные. Непонятно только, как их вычитывать:
Цитата Сообщение от BRcr Посмотреть сообщение
Что за массивы неопределенной длины - где задается их размер? Что за "структура измерительной системы"?
Цитата Сообщение от BRcr Посмотреть сообщение
Как потом идут данные? Что они из себя представляют и где именно задается размер каждого отдельно взятого куска данных?
И как осуществляется привязка ко времени каждого измерения(параметра)?

Добавлено через 4 минуты
И насчет "Структура файла.docx" - такой вариант лучше картинки, конечно, но все равно особой ясности не вносит. Эти обрывки неструктурированной информации, по недоразумению именуемые описанием структуры файла, явно составлял какой-то неполноценный гражданин.
1
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
08.03.2013, 21:15  [ТС]
Я эти вопросы дипломнику задам и ответы напишу здесь))) Спасибо!
0
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
11.03.2013, 21:25  [ТС]
В блоке информации, параметры хранятся следующим образом: "индекс - значение". Индекс параметра у нас имеется в паспортах, это то, что уже выведено в текстовый файл, грубо говоря это идентификатор параметра. И к этому параметру привязывается значение.
Потом идет снова индекс - значение, индекс - значение.

В блоке информации, параметры идут друг за другом, каждое значение параметра определяется каждый раз индексом. В УС0 информация хранится не по блокам, разделенным по типам параметров, а просто все параметры вперемешку.

Время здесь идет просто отдельным параметром, определяемое индексом, так же, как и остальные параметры.

Все значения каких-либо параметров привязываются ко времени следующим образом: после прохождения индекса времени и его значения, происходит привязка всех следующих значений различных параметров к этому значению времени. И так до следующего индекса времени.

В этом минус этого типа файлов - чтобы вытащить информацию, нужно прогонять потоком всю инфу((

Вот вроде и все, что необходимо нужно было))

Может скайп написать, можно вопросы обсудить какие-либо)
0
 Аватар для BRcr
4043 / 2333 / 292
Регистрация: 03.02.2011
Сообщений: 5,066
Записей в блоге: 10
11.03.2013, 22:32
Цитата Сообщение от Omniknight Посмотреть сообщение
В этом минус этого типа файлов - чтобы вытащить информацию, нужно прогонять потоком всю инфу((
Нет, не нужно, разве что вытаскивать надо именно всю информацию. Можно еще и оффсет посчитать по заголовкам, ну да ладно...

Пара вопросов так и осталась без ответа, посему буду считать из несущественными. Вытащить кучку численных значений - как два пальца об асфальт.
0
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
11.03.2013, 22:55  [ТС]
Прикольно, когда человеку говоришь, как должно работать, а он делает это, и при том в видит несколько развитий событий. Я только могу алгоритмы составлять, а с применением их на практике пробелы.

Спасибо тебе за помощь ).
0
0 / 0 / 0
Регистрация: 11.01.2013
Сообщений: 18
23.05.2013, 11:38  [ТС]
Кто-нибудь может помочь с написанием программы? Не получается вот код программы:
C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#include <vcl.h>
#pragma hdrstop
 
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
//                  US0 FILE FORMAT STRUCTURE
//---------------------------------------------------------------------------
struct us0_file_head
{
    char us0_letters[5];
    char device_name[9];
    char test_name[9];
    char test_date[9];
    float start_time;
    float end_time;
    unsigned short records_count;
    char RF;
    unsigned int commentary_length;
    char *commentary;
    float time_fix;
    us0_file_head( )
    {
        commentary = NULL;
    }
 
    ~us0_file_head( )
    {
        if ( commentary )
        {
            delete[]commentary;
        }
    }
 
void fill_in( ifstream &in )
    {
        in.read( us0_letters, 4 );
        in.read( device_name, 8 );
        in.read( test_name, 8 );
        in.read( test_date, 8 );
        in.read( ( char * ) &start_time, 4 );
        in.read( ( char * ) &end_time, 4 );
        in.read( ( char * ) &records_count, 2 );
        in.read( ( char * ) &RF, 1 );
        in.read( ( char * ) &commentary_length, 1 );
        in.read( ( char * ) &time_fix, 4 );
        commentary = new char[commentary_length + 1];
        in.read( commentary, commentary_length - 4 );
        commentary[commentary_length] = '\0';
    }
};
 
struct record_head {
    char object_name[13];
    unsigned short index;
    unsigned short object_format;
    unsigned short object_type;
    float a0, a1;
    char param_dimension[9];
     unsigned short param_length;
    void fill_in( ifstream &in ) {
        in.read( object_name, 12 );
        in.read( ( char * ) &index, 2 );
        in.read( ( char * ) &object_format, 1 );
        in.read( ( char * ) &object_type, 1 );
        in.read( ( char * ) &a0, 4 );
        in.read( ( char * ) &a1, 4 );
        in.read( param_dimension, 8 );
    }
    void out( ostream &o ) {
        o << "\n\nobject_name = " << object_name <<
                       "\nindex = " << index <<
                       "\nobject_format = " << object_format <<
                       "\nobject_type = " << object_type <<
                       "\na0 = " << a0 <<
                       "\na1 = " << a1 <<
                       "\nparam_dimension = " << param_dimension;
    }
};
us0_file_head fh;
vector <record_head> records;
record_head temp;
ifstream in;
 
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OpenFileClick(TObject *Sender)
{
    if(OpenDialog->Execute())
    {
        AnsiString FileName = OpenDialog->FileName;
        in.open(FileName.c_str());
        if(!in.is_open()) MessageBox(NULL, "Не могу открыть файл!", "Ошибка", MB_OK);
        SecureZeroMemory(&fh, sizeof( us0_file_head ));
        fh.fill_in(in);
        int RecCount = fh.records_count;
        AnsiString DeviceName = fh.device_name;
        StatusBar->Panels[0].Items[0]->Text = "Устройство: " + DeviceName;
        StatusBar->Panels[0].Items[0]->Width = 200;
        StatusBar->Panels[0].Add();
        StatusBar->Panels[0].Items[1]->Text = "Записей: " + IntToStr(RecCount);
        for ( size_t i = 0; i < fh.records_count; ++i )
        {
            SecureZeroMemory( &temp, sizeof( record_head ) );
            temp.fill_in( in );
            records.push_back( temp );
            AnsiString param_string;
 
            AnsiString temp_str;
            param_string.printf("%s", &temp.object_name);
            param_string += "  ";
            param_string += temp_str.printf("%d", &temp.a0);
            param_string += "  ";
            param_string += temp_str.printf("%d", &temp.a1);
            param_string += "  ";
            param_string += temp_str.printf("%s", &temp.param_dimension);
            //temp.object_name + " " + FloatToStr(temp.a0) + " " + FloatToStr(temp.a1) + temp.param_dimension
            CheckListBox->Items->Add(param_string);
        }
        in.close( );
    }
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ExportCheckedClick(TObject *Sender)
{
    if(SaveDialog->Execute())
    {
        TStringList *Strings = new TStringList();
        for(int i=0;i<CheckListBox->Count;i++)
        {
            if(CheckListBox->Checked[i])
            {
                Strings->Add(CheckListBox->Items->Strings[i]);
                //Strings->Add(CheckListBox->Items[i].Text);
            }
        }
        Strings->SaveToFile(SaveDialog->FileName);
    }
}
//---------------------------------------------------------------------------
 
void __fastcall TForm1::ExportAllClick(TObject *Sender)
{
    CheckListBox->SelectAll();
    if(SaveDialog->Execute())
    {
        TStringList *Strings = new TStringList();
        for(int i=0;i<CheckListBox->Count;i++)
        {
            if(CheckListBox->Checked[i])
            {
                Strings->Add(CheckListBox->Items->Strings[i]);
                //Strings->Add(CheckListBox->Items[i].Text);
            }
        }
        Strings->SaveToFile(SaveDialog->FileName);
    }
}
Она не работает, не выводит в текстовый файл требуемую информацию. Подскажите, что нужно сделать.
0
0 / 0 / 0
Регистрация: 03.09.2020
Сообщений: 2
09.09.2020, 23:41
Omniknight, здраствуйте , не могли бы вы выложить ссылку на облако еще раз , буду премного благодарен )

Добавлено через 14 минут
Omniknight, Здраствуйте , не могли бы вы снова кинуть ссылку на облако, буду премного благодарен)
0
Модератор
 Аватар для D1973
9926 / 6463 / 2457
Регистрация: 21.01.2014
Сообщений: 27,418
Записей в блоге: 3
10.09.2020, 04:52
Цитата Сообщение от LEBOmi Посмотреть сообщение
Omniknight, здраствуйте
LEBOmi, вряд ли он специально для Вас откликнется, после более чем семилетнего отсутствия на форуме...

Не по теме:

И слово "здравствуйте" пишется с буквой "в"

0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
10.09.2020, 04:52
Помогаю со студенческими работами здесь

Чтение из файла неизвестного формата
Всем привет.Я изучаю си,по работе и по учебе параллельно.Практически дошел до струтур,но дальше,включая чтение из файла пока не добрался.Но...

Чтение бинарных файлов неизвестного формата
Доброго времени суток всем. Вот гуляя по просторам интернетов регулярно натыкаюсь на программы которые могут например, читать файлы игр,...

Считать побайтно файл неизвестного формата зная его структуру
Столкнулся с проблемой, нужно считать файл, у файла не прописано расширение, известна байтовая структура: заголовок файла: 1 байт:...

Загрузить в мемо текст из неизвестного .txt с известным path
Привет. Подскажите как залить в Memo файл *.txt в заданной папке. Файл меняет свое название. Наличие его постоянно, то есть проверка не...

Исследование "неизвестного" формата (отрезать начало файла до определённого заголовка)
Здравствуйте! Программированию я учусь собственными силами, о преподаваемом в университетах или на курсах не имею ни малейшего понятия....


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
31
Ответ Создать тему
Новые блоги и статьи
Автозаполнение реквизита при выборе элемента справочника
Maks 27.03.2026
Программный код из решения ниже на примере нетипового документа "ЗаявкаНаРемонтСпецтехники" разработанного в конфигурации КА2. При выборе "Спецтехники" (Тип Справочник. Спецтехника), заполняется. . .
Сумматор с применением элементов трёх состояний.
Hrethgir 26.03.2026
Тут. https:/ / fips. ru/ EGD/ ab3c85c8-836d-4866-871b-c2f0c5d77fbc Первый документ красиво выглядит, но без схемы. Это конечно не даёт никаких плюсов автору, но тем не менее. . . всё может быть. . .
Автозаполнение реквизитов при создании документа
Maks 26.03.2026
Программный код из решения ниже размещается в модуле объекта документа, в процедуре "ПриСозданииНаСервере". Алгоритм проверки заполнения реализован для исключения перезаписи значения реквизита,. . .
Команды формы и диалоговое окно
Maks 26.03.2026
1. Команда формы "ЗаполнитьЗапчасти". Программный код из решения ниже на примере нетипового документа "ЗаявкаНаРемонтСпецтехники" разработанного в конфигурации КА2. В качестве источника данных. . .
Кому нужен AOT?
DevAlt 26.03.2026
Решил сделать простой ланчер Написал заготовку: dotnet new console --aot -o UrlHandler var items = args. Split(":"); var tag = items; var id = items; var executable = args;. . .
Отправка уведомления на почту при изменении наименования справочника
Maks 24.03.2026
Программная отправка письма электронной почты на примере изменения наименования типового справочника "Склады" в конфигурации БП3. Перед реализацией необходимо выполнить настройку системной учетной. . .
модель ЗдравоСохранения 5. Меньше увольнений- больше дохода!
anaschu 24.03.2026
Теперь система здравосохранения уменьшает количество увольнений. 9TO2GP2bpX4 a42b81fb172ffc12ca589c7898261ccb/ https:/ / rutube. ru/ video/ a42b81fb172ffc12ca589c7898261ccb/ Слева синяя линия -. . .
Midnight Chicago Blues
kumehtar 24.03.2026
Такой Midnight Chicago Blues, знаешь?. . Когда вечерние улицы становятся ночными, а ты не можешь уснуть. Ты идёшь в любимый старый бар, и бармен наливает тебе виски. Ты смотришь на пролетающие. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru