1461 lines
47 KiB
Plaintext
Executable File
1461 lines
47 KiB
Plaintext
Executable File
//**********************************************************************
|
|
//*
|
|
//* INPA Library-Funktionen BMW_STD.SRC
|
|
//*
|
|
//* mindestens INPA 5.0.1
|
|
//*
|
|
//**********************************************************************
|
|
//* Drexel TI-430
|
|
//**********************************************************************
|
|
//* History:
|
|
//* 05.05.2000 rd V0.01 Ersterstellung
|
|
//* 23.06.2000 rd V0.02 Überarbeitung für E65 und E85
|
|
//* 04.07.2000 rd V0.03 Überarbeitung der Funktionen
|
|
//* 08.11.2000 rd V0.04 AIF Lesen Results überarbeitet
|
|
//* 01.03.2001 rd V0.05 m_status_flag neu hinzu
|
|
//* 02.03.2001 rd V0.06 m_steuern_flag neu hinzu
|
|
//* 18.05.2001 rd V0.07 AIF-Ausgabe verbessert
|
|
//* 25.04.2002 rd V0.08 Erweiterung HS_LESEN
|
|
//* 25.04.2002 rd V1.00 Freigabe
|
|
//* 24.09.2002 rd V1.01 Erweiterung Ident für DS2
|
|
//* 19.11.2002 rd V1.02 FS_MODE erweitert um PCODEs
|
|
//* 16.02.2004 rd V2.00 Umstellung auf 32-Bit Version
|
|
//* rd V2.00 Entfernung EldiAuftragLesen, EldiAuftragEingeben
|
|
//**********************************************************************
|
|
string package="2.00";
|
|
|
|
//**********************************************************************
|
|
//*
|
|
//* Globale Variablen
|
|
//*
|
|
//**********************************************************************
|
|
|
|
// Umrechnungsfaktoren deutsch / englisch
|
|
real m_c = @1.0 oder 1.8@; // Grad Celsius -> Fahrenheit z = x * m_c + a_c
|
|
real a_c = @0.0 oder 32.0@;
|
|
real m_km = @1.0 oder 0.6214@; // km -> miles z = x * m_km
|
|
real m_l = @1.0 oder 0.2642@; // Liter -> Gallon US z = x * m_l
|
|
|
|
// für Info
|
|
string sgbd_ecu;
|
|
string sgbd_origin;
|
|
string sgbd_revision;
|
|
string sgbd_package;
|
|
string sgbd_sprache;
|
|
string sgbd_comment;
|
|
string gruppe_ecu;
|
|
string gruppe_origin;
|
|
string gruppe_revision;
|
|
string gruppe_comment;
|
|
|
|
// für Status-Menü
|
|
bool m_status_flag=TRUE;
|
|
// True Status-Menü wird angezeigt
|
|
|
|
// für Steuern-Menü
|
|
bool m_steuern_flag=TRUE;
|
|
// True Steuern-Menü wird angezeigt
|
|
|
|
// für FS_LESEN speichern
|
|
bool fs_lesen_save_as_flag;
|
|
|
|
// für IS_LESEN speichern
|
|
bool is_lesen_save_as_flag;
|
|
|
|
// für HS_LESEN speichern
|
|
bool hs_lesen_save_as_flag;
|
|
|
|
// für FS_LESEN
|
|
bool fs_lesen_flag;
|
|
// True wenn JOB vorhanden
|
|
|
|
// für IS_LESEN
|
|
bool is_lesen_flag;
|
|
// True wenn JOB vorhanden
|
|
|
|
// für HS_LESEN
|
|
bool hs_lesen_flag;
|
|
// True wenn JOB vorhanden
|
|
|
|
// Handle für FS_LESEN
|
|
int f_ort_nr_buffer = 0;
|
|
int f_ort_text_buffer = 0;
|
|
|
|
// für Ident Screen
|
|
bool ds2_flag=FALSE;
|
|
// False Ident Screen für BMW Fast
|
|
// True Ident Screen für DS2
|
|
|
|
// für SPEICHER_LESEN
|
|
bool speicher_lesen_flag;
|
|
// True wenn JOB vorhanden
|
|
bool speicher_lesen_lar_flag;
|
|
bool speicher_lesen_uifm_flag;
|
|
bool speicher_lesen_romi_flag;
|
|
bool speicher_lesen_romx_flag;
|
|
bool speicher_lesen_nvram_flag;
|
|
bool speicher_lesen_ramis_flag;
|
|
bool speicher_lesen_ramxx_flag;
|
|
bool speicher_lesen_flash_flag;
|
|
bool speicher_lesen_ramil_flag;
|
|
|
|
// für Speicher lesen Ausgabe
|
|
string speicher_lesen_text = "";
|
|
string speicher_lesen_seg_adr_anz = "";
|
|
string speicher_lesen_adresse = "0x000000";
|
|
int speicher_lesen_anzahl = 64;
|
|
|
|
//**********************************************************************
|
|
//*
|
|
//* Deklaration der Funktionen
|
|
//*
|
|
//**********************************************************************
|
|
extern ScriptInit(); // befindet sich im Hauptprogramm
|
|
|
|
#include "BATTERIE.SRC"
|
|
#include "GRP_INFO.SRC"
|
|
#include "SGBDINFO.SRC"
|
|
#include "SGBDINPA.SRC"
|
|
#include "GRPCHECK.SRC"
|
|
#include "FS_LESEN.SRC"
|
|
#include "INITEXIT.SRC"
|
|
|
|
// **************************
|
|
// *** Hauptmenü ***
|
|
// **************************
|
|
MENU m_main()
|
|
{
|
|
INIT {
|
|
setmenutitle("@Hauptmenü@");
|
|
|
|
if ((fs_lesen_flag == TRUE) ||
|
|
(is_lesen_flag == TRUE) ||
|
|
(hs_lesen_flag == TRUE))
|
|
{
|
|
setitem( 4 , "@Fehler@" , TRUE);
|
|
}
|
|
|
|
if (m_status_flag == TRUE)
|
|
{
|
|
setitem( 5 , "@Status@" , TRUE);
|
|
}
|
|
|
|
if (m_steuern_flag == TRUE)
|
|
{
|
|
setitem( 6 , "@Steuern@" , TRUE);
|
|
}
|
|
|
|
if (speicher_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@Speicher@" , TRUE);
|
|
}
|
|
}
|
|
ITEM( 1 ,"@Info@") {
|
|
setscreen(s_info,TRUE);
|
|
}
|
|
ITEM( 2 ,"@Ident@") {
|
|
if (ds2_flag == TRUE)
|
|
setscreen(s_ident_ds2,TRUE);
|
|
else
|
|
setscreen(s_ident,TRUE);
|
|
}
|
|
ITEM( 3 ,"") {
|
|
setscreen(s_main,TRUE);
|
|
}
|
|
ITEM( 4 ,"") {
|
|
if ((fs_lesen_flag == TRUE) ||
|
|
(is_lesen_flag == TRUE) ||
|
|
(hs_lesen_flag == TRUE))
|
|
{
|
|
setscreen( s_fehler ,TRUE);
|
|
setmenu(m_fehler);
|
|
}
|
|
else
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 5 ,"") {
|
|
if (m_status_flag == TRUE)
|
|
{
|
|
setscreen(s_status,TRUE);
|
|
setmenu(m_status);
|
|
}
|
|
else
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 6 ,"") {
|
|
if (m_steuern_flag == TRUE)
|
|
{
|
|
setscreen(s_steuern,TRUE);
|
|
setmenu(m_steuern);
|
|
}
|
|
else
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 7 ,"") {
|
|
if (speicher_lesen_flag == TRUE)
|
|
{
|
|
setscreen(s_speicher,TRUE);
|
|
setmenu(m_speicher);
|
|
}
|
|
else
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 8 ,"@Auswahl@") {
|
|
start();
|
|
select(TRUE);
|
|
}
|
|
ITEM(18 ,"@Gesamt@") {
|
|
start();
|
|
deselect();
|
|
}
|
|
ITEM( 9 ,"@Druck@") {
|
|
printscreen();
|
|
}
|
|
ITEM( 10 ,"@Ende@") {
|
|
exit();
|
|
}
|
|
ITEM( 11, "@KVP@") {
|
|
setscreen(s_info,TRUE);
|
|
callwin( "kvp_edit "+titel+";"+version+";"+sgbd+": "+sgbd_ecu+";"+sgbd_revision);
|
|
}
|
|
ITEM( 12 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 13 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 14 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 15 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 16 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 17 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 19 ,"") {
|
|
setscreen( s_main ,TRUE);
|
|
}
|
|
ITEM( 20 ,"@Exit@") {
|
|
exit();
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Fehlermenü ***
|
|
// **************************
|
|
MENU m_fehler()
|
|
{
|
|
int ErrorCode;
|
|
int SpeicherUnterDateiNameLaenge=0;
|
|
int ReturnedValue;
|
|
string CurrentDirectory;
|
|
string SpeichernKommentar1="";
|
|
string SpeichernKommentar2="";
|
|
string SpeicherUnterDateiName="";
|
|
string DateiLesenZeile="";
|
|
string DateiLesenPuffer="";
|
|
bool DateiLesenEOF;
|
|
string DateiName="";
|
|
|
|
INIT {
|
|
setmenutitle("@Fehlerspeicher@");
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 1 , "@FS lesen@" , TRUE);
|
|
setitem( 2 , "@FS löschen@" , TRUE);
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 3 , "@IS lesen@" , TRUE);
|
|
setitem( 4 , "@IS löschen@" , TRUE);
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 5 , "@HS lesen@" , TRUE);
|
|
setitem( 6 , "@HS löschen@" , TRUE);
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
}
|
|
ITEM( 1 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
userboxopen(0,8,35,5,50,"@Fehlerspeicher lesen@","");
|
|
userboxftextout(0,"@Der Fehlerspeicher wird gelesen!@ @... bitte warten@",1,3,0,0);
|
|
INPAapiFsMode_neu(0x7FF,"w","","",""); // alles Anzeigen
|
|
INPAapiFsLesen_neu(sgbd,"na_fs.tmp");
|
|
userboxclose(0);
|
|
DateiName="na_fs.tmp";
|
|
viewopen(DateiName,"@Fehlerspeicher lesen@");
|
|
setitem( 9 , "@FS drucken@" , TRUE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", TRUE);
|
|
}
|
|
}
|
|
ITEM( 2 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
INPAapiJob(sgbd,"FS_LOESCHEN","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
userboxopen(0,8,35,5,50,"@Fehlerspeicher löschen@","");
|
|
userboxftextout(0,"@Der Fehlerspeicher wurde gelöscht!@",1,3,0,0);
|
|
}
|
|
}
|
|
ITEM( 3 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
userboxopen(0,8,35,5,50,"@Infospeicher lesen@","");
|
|
userboxftextout(0,"@Der Infospeicher wird gelesen!@ @... bitte warten@",1,3,0,0);
|
|
INPAapiFsMode_neu(0x7FF,"w","","","IS_LESEN"); // alles Anzeigen
|
|
INPAapiFsLesen_neu(sgbd,"na_fs.tmp");
|
|
userboxclose(0);
|
|
DateiName="na_fs.tmp";
|
|
viewopen(DateiName,"@Infospeicher lesen@");
|
|
setitem( 8 , "@IS drucken@" , TRUE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", TRUE);
|
|
}
|
|
}
|
|
ITEM( 4 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
INPAapiJob(sgbd,"IS_LOESCHEN","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
userboxopen(0,8,35,5,50,"@Infospeicher löschen@","");
|
|
userboxftextout(0,"@Der Infospeicher wurde gelöscht!@",1,3,0,0);
|
|
}
|
|
}
|
|
ITEM( 5 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
userboxopen(0,8,35,5,50,"@Historienspeicher lesen@","");
|
|
userboxftextout(0,"@Der Historienspeicher wird gelesen!@ @... bitte warten@",1,3,0,0);
|
|
INPAapiFsMode_neu(0x7FF,"w","","","HS_LESEN"); // alles Anzeigen
|
|
INPAapiFsLesen_neu(sgbd,"na_fs.tmp");
|
|
userboxclose(0);
|
|
DateiName="na_fs.tmp";
|
|
viewopen(DateiName,"@Historienspeicher lesen@");
|
|
setitem( 7 , "@HS drucken@" , TRUE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", TRUE);
|
|
}
|
|
}
|
|
ITEM( 6 ,"") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
INPAapiJob(sgbd,"HS_LOESCHEN","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
userboxopen(0,8,35,5,50,"@Historienspeicher löschen@","");
|
|
userboxftextout(0,"@Der Historienspeicher wurde gelöscht!@",1,3,0,0);
|
|
}
|
|
}
|
|
ITEM( 7 ,"") {
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
printfile(ErrorCode, DateiName, "", "",TRUE);
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM( 8 ,"") {
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
printfile(ErrorCode, DateiName, "", "",TRUE);
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM( 9 ,"") {
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
printfile(ErrorCode, DateiName, "", "",TRUE);
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM(17 ,"") {
|
|
if ((hs_lesen_flag == TRUE) && (hs_lesen_save_as_flag == TRUE))
|
|
{
|
|
input2text(SpeichernKommentar1,SpeichernKommentar2,
|
|
"@Kommentar@",
|
|
"@Geben Sie den zu speichernden Kommentar ein@",
|
|
"","");
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
space(SpeicherUnterDateiName,256);
|
|
strlen(SpeicherUnterDateiNameLaenge,SpeicherUnterDateiName);
|
|
|
|
GetCurrentDirectory(256,CurrentDirectory,ReturnedValue);
|
|
SaveAsDialogBox("",SpeicherUnterDateiName,SpeicherUnterDateiNameLaenge,SpeicherUnterDateiNameLaenge);
|
|
SetCurrentDirectory(CurrentDirectory,ReturnedValue);
|
|
if (SpeicherUnterDateiNameLaenge > 0)
|
|
{
|
|
DateiLesenPuffer="";
|
|
fileopen("na_fs.tmp","r");
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
while (DateiLesenEOF == FALSE)
|
|
{
|
|
DateiLesenPuffer=DateiLesenPuffer+DateiLesenZeile;
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
if (DateiLesenEOF == FALSE) DateiLesenPuffer=DateiLesenPuffer+LF;
|
|
}
|
|
fileclose();
|
|
|
|
DateiName=SpeicherUnterDateiName;
|
|
fileopen(DateiName,"w");
|
|
if (SpeichernKommentar1 + SpeichernKommentar2 != "")
|
|
{
|
|
filewrite( " @K O M M E N T A R@");
|
|
filewrite( " -----------------");
|
|
filewrite( "");
|
|
if (SpeichernKommentar1 != "") filewrite(SpeichernKommentar1);
|
|
if (SpeichernKommentar2 != "") filewrite(SpeichernKommentar2);
|
|
filewrite( "-------------------------------------------------------------");
|
|
filewrite("");
|
|
}
|
|
filewrite(DateiLesenPuffer);
|
|
fileclose();
|
|
|
|
viewclose();
|
|
viewopen(DateiName,"@Historienspeicher speichern@: "+DateiName);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM(18 ,"") {
|
|
if ((is_lesen_flag == TRUE) && (is_lesen_save_as_flag == TRUE))
|
|
{
|
|
input2text(SpeichernKommentar1,SpeichernKommentar2,
|
|
"@Kommentar@",
|
|
"@Geben Sie den zu speichernden Kommentar ein@",
|
|
"","");
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
space(SpeicherUnterDateiName,256);
|
|
strlen(SpeicherUnterDateiNameLaenge,SpeicherUnterDateiName);
|
|
|
|
GetCurrentDirectory(256,CurrentDirectory,ReturnedValue);
|
|
SaveAsDialogBox("",SpeicherUnterDateiName,SpeicherUnterDateiNameLaenge,SpeicherUnterDateiNameLaenge);
|
|
SetCurrentDirectory(CurrentDirectory,ReturnedValue);
|
|
if (SpeicherUnterDateiNameLaenge > 0)
|
|
{
|
|
DateiLesenPuffer="";
|
|
fileopen("na_fs.tmp","r");
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
while (DateiLesenEOF == FALSE)
|
|
{
|
|
DateiLesenPuffer=DateiLesenPuffer+DateiLesenZeile;
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
if (DateiLesenEOF == FALSE) DateiLesenPuffer=DateiLesenPuffer+LF;
|
|
}
|
|
fileclose();
|
|
|
|
DateiName=SpeicherUnterDateiName;
|
|
fileopen(DateiName,"w");
|
|
if (SpeichernKommentar1 + SpeichernKommentar2 != "")
|
|
{
|
|
filewrite( " @K O M M E N T A R@");
|
|
filewrite( " -----------------");
|
|
filewrite( "");
|
|
if (SpeichernKommentar1 != "") filewrite(SpeichernKommentar1);
|
|
if (SpeichernKommentar2 != "") filewrite(SpeichernKommentar2);
|
|
filewrite( "-------------------------------------------------------------");
|
|
filewrite("");
|
|
}
|
|
filewrite(DateiLesenPuffer);
|
|
fileclose();
|
|
|
|
viewclose();
|
|
viewopen(DateiName,"@Infospeicher speichern@: "+DateiName);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
if (fs_lesen_save_as_flag == TRUE) setitem(19 , "@FS speichern@", FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM(19 ,"") {
|
|
if ((fs_lesen_flag == TRUE) && (fs_lesen_save_as_flag == TRUE))
|
|
{
|
|
input2text(SpeichernKommentar1,SpeichernKommentar2,
|
|
"@Kommentar@",
|
|
"@Geben Sie den zu speichernden Kommentar ein@",
|
|
"","");
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
space(SpeicherUnterDateiName,256);
|
|
strlen(SpeicherUnterDateiNameLaenge,SpeicherUnterDateiName);
|
|
|
|
GetCurrentDirectory(256,CurrentDirectory,ReturnedValue);
|
|
SaveAsDialogBox("",SpeicherUnterDateiName,SpeicherUnterDateiNameLaenge,SpeicherUnterDateiNameLaenge);
|
|
SetCurrentDirectory(CurrentDirectory,ReturnedValue);
|
|
if (SpeicherUnterDateiNameLaenge > 0)
|
|
{
|
|
DateiLesenPuffer="";
|
|
fileopen("na_fs.tmp","r");
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
while (DateiLesenEOF == FALSE)
|
|
{
|
|
DateiLesenPuffer=DateiLesenPuffer+DateiLesenZeile;
|
|
fileread(DateiLesenZeile, DateiLesenEOF );
|
|
if (DateiLesenEOF == FALSE) DateiLesenPuffer=DateiLesenPuffer+LF;
|
|
}
|
|
fileclose();
|
|
|
|
DateiName=SpeicherUnterDateiName;
|
|
fileopen(DateiName,"w");
|
|
if (SpeichernKommentar1 + SpeichernKommentar2 != "")
|
|
{
|
|
filewrite( " @K O M M E N T A R@");
|
|
filewrite( " -----------------");
|
|
filewrite( "");
|
|
if (SpeichernKommentar1 != "") filewrite(SpeichernKommentar1);
|
|
if (SpeichernKommentar2 != "") filewrite(SpeichernKommentar2);
|
|
filewrite( "-------------------------------------------------------------");
|
|
filewrite("");
|
|
}
|
|
filewrite(DateiLesenPuffer);
|
|
fileclose();
|
|
|
|
viewclose();
|
|
viewopen(DateiName,"@Fehlerspeicher speichern@: "+DateiName);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
userboxclose(0);
|
|
viewclose();
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 9 , "@FS drucken@" , FALSE);
|
|
}
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
setitem( 8 , "@IS drucken@" , FALSE);
|
|
if (is_lesen_save_as_flag == TRUE) setitem(18 , "@IS speichern@", FALSE);
|
|
}
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
setitem( 7 , "@HS drucken@" , FALSE);
|
|
if (hs_lesen_save_as_flag == TRUE) setitem(17 , "@HS speichern@", FALSE);
|
|
}
|
|
}
|
|
}
|
|
ITEM( 10 ,"@Zurück@") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
setscreen( s_main ,TRUE);
|
|
setmenu( m_main );
|
|
}
|
|
ITEM( 20 ,"@Exit@") {
|
|
userboxclose(0);
|
|
viewclose();
|
|
exit();
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Speichermenü ***
|
|
// **************************
|
|
MENU m_speicher()
|
|
{
|
|
int input_ok=0;
|
|
int input_state;
|
|
string text_var;
|
|
|
|
INIT {
|
|
setmenutitle("@Speicher lesen@");
|
|
if (speicher_lesen_lar_flag==TRUE) setitem( 1 , "@LAR@" , TRUE);
|
|
if (speicher_lesen_flash_flag==TRUE) setitem( 2 , "@FLASH@", TRUE);
|
|
if (speicher_lesen_uifm_flag==TRUE) setitem( 3 , "@UIFM@" , TRUE);
|
|
if (speicher_lesen_romi_flag==TRUE) setitem( 4 , "@ROMI@" , TRUE);
|
|
if (speicher_lesen_ramis_flag==TRUE) setitem( 5 , "@RAMIS@", TRUE);
|
|
if (speicher_lesen_ramil_flag==TRUE) setitem( 6 , "@RAMIL@", TRUE);
|
|
if (speicher_lesen_nvram_flag==TRUE) setitem( 7 , "@NVRAM@", TRUE);
|
|
if (speicher_lesen_romx_flag==TRUE) setitem(14 , "@ROMX@" , TRUE);
|
|
if (speicher_lesen_ramxx_flag==TRUE) setitem(15 , "@RAMXX@", TRUE);
|
|
}
|
|
ITEM( 1 ,"") {
|
|
if (speicher_lesen_lar_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@LAR lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@LAR lesen@";
|
|
speicher_lesen_seg_adr_anz="LAR;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 2 ,"") {
|
|
if (speicher_lesen_flash_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@FLASH lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@FLASH lesen@";
|
|
speicher_lesen_seg_adr_anz="FLASH;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 3 ,"") {
|
|
if (speicher_lesen_uifm_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@UIFM lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@UIFM lesen@";
|
|
speicher_lesen_seg_adr_anz="UIFM;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 4 ,"") {
|
|
if (speicher_lesen_romi_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@ROMI lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@ROMI lesen@";
|
|
speicher_lesen_seg_adr_anz="ROMI;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 5 ,"") {
|
|
if (speicher_lesen_ramis_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@RAMIS lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@RAMIS lesen@";
|
|
speicher_lesen_seg_adr_anz="RAMIS;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 6 ,"") {
|
|
if (speicher_lesen_ramil_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@RAMIL lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@RAMIL lesen@";
|
|
speicher_lesen_seg_adr_anz="RAMIL;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 7 ,"") {
|
|
if (speicher_lesen_nvram_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@NVRAM lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@NVRAM lesen@";
|
|
speicher_lesen_seg_adr_anz="NVRAM;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 8 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 9 ,"@Druck@") {
|
|
printscreen();
|
|
}
|
|
ITEM( 10 ,"@Zurück@") {
|
|
setscreen( s_main ,TRUE);
|
|
setmenu( m_main );
|
|
}
|
|
ITEM( 11 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 12 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 13 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 14 ,"") {
|
|
if (speicher_lesen_romx_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@ROMX lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@ROMX lesen@";
|
|
speicher_lesen_seg_adr_anz="ROMX;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 15 ,"") {
|
|
if (speicher_lesen_ramxx_flag==TRUE)
|
|
{
|
|
input2hexnum(speicher_lesen_adresse,speicher_lesen_anzahl,"@RAMXX lesen@",
|
|
"@Es ist darauf zu achten,@ "+
|
|
"@daß die angegebene Adresse + Anzahl@ "+
|
|
"@der zu lesenden Bytes die Obergrenze@ "+
|
|
"(FFFFFF) @nicht überschreitet.@",
|
|
"@Adresse@ 000000-FFFFFF","@Anzahl der Bytes@ 1-200","000000","FFFFFF",1,200);
|
|
getinputstate(input_state);
|
|
if (input_state==input_ok)
|
|
{
|
|
speicher_lesen_text="@RAMXX lesen@";
|
|
speicher_lesen_seg_adr_anz="RAMXX;"+speicher_lesen_adresse;
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
speicher_lesen_seg_adr_anz=speicher_lesen_seg_adr_anz+";"+text_var;
|
|
setscreen(s_speicher_ausgabe,TRUE);
|
|
}
|
|
}
|
|
else
|
|
setscreen(s_speicher,TRUE);
|
|
}
|
|
ITEM( 16 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 17 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 18 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 19 ,"") {
|
|
setscreen( s_speicher,TRUE);
|
|
}
|
|
ITEM( 20 ,"@Exit@") {
|
|
exit();
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Hauptscreen ***
|
|
// **************************
|
|
SCREEN s_main()
|
|
{
|
|
string text_var;
|
|
|
|
userboxclose(0);
|
|
ftextout("@Hauptmenü@",1,0,1,0);
|
|
ftextout("",3,0,0,0);
|
|
INPAapiJob(sgbd,"IDENT","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
LINE("","")
|
|
{
|
|
ftextout("@BMW Teilenummer@",1,0,0,0);
|
|
ftextout(":",1,19,0,0);
|
|
INPAapiResultText(text_var,"ID_BMW_NR",1,"");
|
|
ftextout(text_var,1,20,0,1);
|
|
|
|
ftextout("@Herstelldatum@",1,43,0,0);
|
|
ftextout(":",1,59,0,0);
|
|
if (ds2_flag==TRUE)
|
|
{
|
|
ftextout("@KW / Jahr@",1,68,0,0);
|
|
ftextout("/",1,63,0,1);
|
|
INPAapiResultText(text_var,"ID_DATUM_KW",1,"");
|
|
ftextout(text_var,1,60,0,1);
|
|
INPAapiResultText(text_var,"ID_DATUM_JAHR",1,"");
|
|
ftextout(text_var,1,65,0,1);
|
|
}
|
|
else
|
|
{
|
|
INPAapiResultText(text_var,"ID_DATUM",1,"");
|
|
ftextout(text_var,1,60,0,1);
|
|
}
|
|
|
|
ftextout("< F1 > @Information@" , 4,5,0,1);
|
|
ftextout("< F2 > @Identifikation@" , 6,5,0,1);
|
|
|
|
if ((fs_lesen_flag == TRUE) ||
|
|
(is_lesen_flag == TRUE) ||
|
|
(hs_lesen_flag == TRUE))
|
|
ftextout("< F4 > @Fehlerspeicher@" ,10,5,0,1);
|
|
|
|
if (m_status_flag == TRUE)
|
|
ftextout("< F5 > @Status lesen@" ,12,5,0,1);
|
|
|
|
if (m_steuern_flag == TRUE)
|
|
ftextout("< F6 > @Ansteuern@" ,14,5,0,1);
|
|
|
|
if (speicher_lesen_flag == TRUE)
|
|
ftextout("< F7 > @Speicher lesen@" ,16,5,0,1);
|
|
|
|
ftextout("< F8 > @Auswahl@" ,18,5,0,1);
|
|
ftextout("< F9 > @Bildschirmdruck@" ,20,5,0,1);
|
|
ftextout("< F10> @Ende@" ,22,5,0,1);
|
|
|
|
ftextout("<Shift> + < F1 > @KVP-Editor@" , 4,45,0,1);
|
|
ftextout("<Shift> + < F8 > @Gesamt@" ,18,45,0,1);
|
|
ftextout("<Shift> + < F10> @Exit@" ,22,45,0,1);
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Infoscreen ***
|
|
// **************************
|
|
SCREEN s_info ()
|
|
{
|
|
int i;
|
|
int slen;
|
|
int pos;
|
|
int pos2;
|
|
int anzahl;
|
|
string temp;
|
|
|
|
ftextout("@Information@",1,0,1,0);
|
|
ftextout("@Nacharbeitsprogramm@",4,0,0,0); ftextout(":", 4,33,0,1); ftextout(titel,4,35,0,1);
|
|
ftextout("@Version@",5,1,0,0); ftextout(":", 5,33,0,1); ftextout(version,5,35,0,1);
|
|
ftextout("@Package@",6,1,0,0); ftextout(":", 6,33,0,1); ftextout(package,6,35,0,1);
|
|
ftextout("@Verantwortung@",7,1,0,0); ftextout(":", 7,33,0,1); ftextout(origin,7,35,0,1);
|
|
|
|
ftextout("@Gruppendatei@",10,0,0,0); ftextout(":",10,33,0,1); ftextout(gruppe,10,35,0,1);
|
|
ftextout("@Bezeichnung@",11,1,0,0); ftextout(":",11,33,0,1); ftextout(gruppe_ecu,11,35,0,1);
|
|
ftextout("@Version@",12,1,0,0); ftextout(":",12,33,0,1); ftextout(gruppe_revision,12,35,0,1);
|
|
ftextout("@Verantwortung@",13,1,0,0); ftextout(":",13,33,0,1); ftextout(gruppe_origin,13,35,0,1);
|
|
ftextout("@Identifizierbare SGBD'en@",14,1,0,0);
|
|
|
|
strlen(slen, gruppe_comment);
|
|
anzahl=44;
|
|
pos=0;
|
|
if ( slen <= anzahl )
|
|
{
|
|
ftextout(":",14,33,0,1); ftextout(gruppe_comment,14,35,0,1);
|
|
}
|
|
else
|
|
{
|
|
instr(pos2, anzahl, gruppe_comment, ",");
|
|
if (pos2 > 0) anzahl=pos2+1;
|
|
midstr(temp, gruppe_comment, pos, anzahl); ftextout(":",14,33,0,1); ftextout(temp,14,35,0,1);
|
|
i=14;
|
|
pos=pos+anzahl;
|
|
while ( pos < slen )
|
|
{
|
|
i=i+1;
|
|
anzahl=75;
|
|
instr(pos2, pos + anzahl, gruppe_comment, ",");
|
|
if (pos2 > 0) anzahl=pos2+1-pos;
|
|
midstr(temp, gruppe_comment, pos, anzahl); ftextout(temp,i,1,0,1);
|
|
pos=pos+anzahl;
|
|
if ( i >= 18 )
|
|
{
|
|
if ( pos < slen ) ftextout(temp+" . . .",i,1,0,1);
|
|
pos=slen;
|
|
}
|
|
}
|
|
}
|
|
|
|
ftextout("@Steuergerätebeschreibungsdatei@",21,0,0,0); ftextout(":",21,33,0,1); ftextout(sgbd,21,35,0,1);
|
|
ftextout("@Steuergerät@",22,1,0,0); ftextout(":",22,33,0,1); ftextout(sgbd_ecu,22,35,0,1);
|
|
ftextout("@Version@",23,1,0,0); ftextout(":",23,33,0,1); ftextout(sgbd_revision,23,35,0,1);
|
|
ftextout("@Package@",24,1,0,0); ftextout(":",24,33,0,1); ftextout(sgbd_package,24,35,0,1);
|
|
ftextout("@Verantwortung@",25,1,0,0); ftextout(":",25,33,0,1); ftextout(sgbd_origin,25,35,0,1);
|
|
ftextout("@Sprache@",26,1,0,0); ftextout(":",26,33,0,1); ftextout(sgbd_sprache,26,35,0,1);
|
|
if (sgbd_comment!="")
|
|
{
|
|
ftextout("@Kommentar@",27,1,0,0);
|
|
ftextout(":",27,33,0,1);
|
|
ftextout(sgbd_comment,27,35,0,1);
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Identscreen DS2 ***
|
|
// **************************
|
|
SCREEN s_ident_ds2()
|
|
{
|
|
ftextout("@Identifikation@",1,0,1,0);
|
|
ftextout("",3,0,0,0);
|
|
INPAapiJob(sgbd,"IDENT","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
LINE("","")
|
|
{
|
|
ftextout("@BMW Teilenummer@",1,0,1,0);
|
|
ftextout(":",1,33,1,0);
|
|
INPAapiResultText(text_var,"ID_BMW_NR",1,"");
|
|
ftextout(text_var,1,35,1,1);
|
|
|
|
ftextout("@Hardwarenummer@",4,0,1,0);
|
|
ftextout(":",4,33,1,0);
|
|
INPAapiResultText(text_var,"ID_HW_NR",1,"");
|
|
ftextout(text_var,4,35,1,1);
|
|
|
|
ftextout("@Softwarenummer@",7,0,1,0);
|
|
ftextout(":",7,33,1,0);
|
|
INPAapiResultText(text_var,"ID_SW_NR",1,"");
|
|
ftextout(text_var,7,35,1,1);
|
|
|
|
ftextout("@Lieferant@",10,0,1,0);
|
|
ftextout(":",10,33,1,0);
|
|
INPAapiResultText(text_var,"ID_LIEF_TEXT",1,"");
|
|
ftextout(text_var,10,35,1,1);
|
|
|
|
ftextout("@Codier-Index@",13,0,1,0);
|
|
ftextout(":",13,33,1,0);
|
|
INPAapiResultText(text_var,"ID_COD_INDEX",1,"");
|
|
ftextout(text_var,13,35,1,1);
|
|
|
|
ftextout("@Diagnose-Index@",16,0,1,0);
|
|
ftextout(":",16,33,1,0);
|
|
INPAapiResultText(text_var,"ID_DIAG_INDEX",1,"");
|
|
ftextout(text_var,16,35,1,1);
|
|
|
|
ftextout("@Bus-Index@",19,0,1,0);
|
|
ftextout(":",19,33,1,0);
|
|
INPAapiResultText(text_var,"ID_BUS_INDEX",1,"");
|
|
ftextout(text_var,19,35,1,1);
|
|
|
|
ftextout("@Herstelldatum@",22,0,1,0);
|
|
ftextout(":",22,33,1,0);
|
|
ftextout("@KW / Jahr@",22,55,1,0);
|
|
ftextout("/",22,41,1,1);
|
|
INPAapiResultText(text_var,"ID_DATUM_KW",1,"");
|
|
ftextout(text_var,22,35,1,1);
|
|
INPAapiResultText(text_var,"ID_DATUM_JAHR",1,"");
|
|
ftextout(text_var,22,45,1,1);
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Identscreen BMW Fast**
|
|
// **************************
|
|
SCREEN s_ident()
|
|
{
|
|
string text_var;
|
|
int ganz_zahl;
|
|
string job_status="???"; // für Job_Statuskontrolle
|
|
bool fehlerflag; // Fehlerflag
|
|
int errorcode; // EDIABAS Fehlernummer
|
|
|
|
ftextout("@Identifikation@",1,0,1,0);
|
|
ftextout("",3,0,0,1);
|
|
|
|
LINE("@Identifikation@","")
|
|
{
|
|
INPAapiJob(sgbd,"IDENT","","");
|
|
INPAapiCheckJobStatus("OKAY");
|
|
|
|
ftextout("@BMW Teilenummer@",1,0,0,0);
|
|
ftextout(":",1,43,0,0);
|
|
INPAapiResultText(text_var,"ID_BMW_NR",1,"");
|
|
ftextout(text_var,1,45,0,1);
|
|
|
|
ftextout("@Codier-Index@",3,0,0,0);
|
|
ftextout(":",3,43,0,0);
|
|
INPAapiResultText(text_var,"ID_COD_INDEX",1,"");
|
|
ftextout(text_var,3,45,0,1);
|
|
|
|
ftextout("@Varianten-Index@",5,0,0,0);
|
|
ftextout(":",5,43,0,0);
|
|
INPAapiResultText(text_var,"ID_VAR_INDEX",1,"");
|
|
ftextout(text_var,5,45,0,1);
|
|
|
|
ftextout("@Diagnose-Index@",7,0,0,0);
|
|
ftextout(":",7,43,0,0);
|
|
INPAapiResultText(text_var,"ID_DIAG_INDEX",1,"");
|
|
ftextout(text_var,7,45,0,1);
|
|
|
|
ftextout("@Hardwarenummer@",9,0,0,0);
|
|
ftextout(":",9,43,0,0);
|
|
INPAapiResultText(text_var,"ID_HW_NR",1,"");
|
|
ftextout(text_var,9,45,0,1);
|
|
|
|
ftextout("@Softwarenummer Funktionssoftware@",11,0,0,0);
|
|
ftextout(":",11,43,0,0);
|
|
INPAapiResultText(text_var,"ID_SW_NR_FSV",1,"");
|
|
ftextout(text_var,11,45,0,1);
|
|
|
|
ftextout("@Softwarenummer Betriebssystem@",13,0,0,0);
|
|
ftextout(":",13,43,0,0);
|
|
INPAapiResultText(text_var,"ID_SW_NR_OSV",1,"");
|
|
ftextout(text_var,13,45,0,1);
|
|
|
|
ftextout("@Softwarenummer Nachrichtenkatalog@",15,0,0,0);
|
|
ftextout(":",15,43,0,0);
|
|
INPAapiResultText(text_var,"ID_SW_NR_MCV",1,"");
|
|
ftextout(text_var,15,45,0,1);
|
|
|
|
ftextout("@Softwarenummer (Reserve) Zur Zeit nicht benutzt@",17,0,0,0);
|
|
ftextout(":",17,43,0,0);
|
|
INPAapiResultText(text_var,"ID_SW_NR_RES",1,"");
|
|
ftextout(text_var,17,45,0,1);
|
|
|
|
ftextout("@Herstelldatum@",19,0,0,0);
|
|
ftextout(":",19,43,0,0);
|
|
INPAapiResultText(text_var,"ID_DATUM",1,"");
|
|
ftextout(text_var,19,45,0,1);
|
|
|
|
ftextout("@Lieferant@",21,0,0,0);
|
|
ftextout(":",21,43,0,0);
|
|
INPAapiResultText(text_var,"ID_LIEF_TEXT",1,"");
|
|
ftextout(text_var,21,45,0,1);
|
|
}
|
|
// *** AIF, Anwender-Information
|
|
// *** auf 2. Seite von IDENT
|
|
|
|
LINE("@Anwender-Information@","")
|
|
{
|
|
INPAapiJob(sgbd,"AIF_LESEN","","");
|
|
INP1apiResultText(fehlerflag,job_status,"JOB_STATUS",1,"");
|
|
INP1apiErrorCode(errorcode);
|
|
ftextout("",10,0,0,0);
|
|
|
|
if (((fehlerflag == FALSE) && (errorcode == 98)) || (job_status != "OKAY"))
|
|
{
|
|
ftextout("@Kein Anwenderinfofeld vorhanden@" ,3,0,0,0);
|
|
}
|
|
else
|
|
{
|
|
INPAapiResultInt(ganz_zahl,"AIF_ANZ_DATEN",1);
|
|
if (ganz_zahl > 18) // lange AIF ausgeben
|
|
{
|
|
ftextout("@Fahrgestell Nr.@",1,0,0,0);
|
|
ftextout(":",1,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_FG_NR",1,"");
|
|
ftextout(text_var,1,45,0,1);
|
|
|
|
ftextout("@Zusammenbau Nr.@",3,0,0,0);
|
|
ftextout(":",3,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ZB_NR",1,"");
|
|
ftextout(text_var,3,45,0,1);
|
|
|
|
ftextout("@Programmier-Datum@",5,0,0,0);
|
|
ftextout(":",5,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_DATUM",1,"");
|
|
ftextout(text_var,5,45,0,1);
|
|
|
|
ftextout("@Datensatz Nr.@",7,0,0,0);
|
|
ftextout(":",7,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_SW_NR",1,"");
|
|
ftextout(text_var,7,45,0,1);
|
|
|
|
ftextout("@Behörden Nr.@",9,0,0,0);
|
|
ftextout(":",9,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_BEHOERDEN_NR",1,"");
|
|
ftextout(text_var,9,45,0,1);
|
|
|
|
ftextout("@Händler Nr.@",11,0,0,0);
|
|
ftextout(":",11,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_HAENDLER_NR",1,"");
|
|
ftextout(text_var,11,45,0,1);
|
|
|
|
ftextout("@Tester Nr.@",13,0,0,0);
|
|
ftextout(":",13,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_SERIEN_NR",1,"");
|
|
ftextout(text_var,13,45,0,1);
|
|
|
|
ftextout("@km-Stand@",15,0,0,0);
|
|
ftextout(":",15,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_KM",1,"");
|
|
ftextout(text_var,15,45,0,1);
|
|
|
|
ftextout("@Programm-Stand@",17,0,0,0);
|
|
ftextout(":",17,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_PROG_NR",1,"");
|
|
ftextout(text_var,17,45,0,1);
|
|
|
|
ftextout("@Adresse AIF@",19,0,0,0);
|
|
ftextout(":",19,43,0,0);
|
|
INPAapiResultInt(ganz_zahl,"AIF_ADRESSE_LOW",1);
|
|
inttohexstring(ganz_zahl,4,text_var);
|
|
ftextout(text_var,19,45,0,1);
|
|
|
|
ftextout("@Anzahl freie AIF@",21,0,0,0);
|
|
ftextout(":",21,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ANZ_FREI",1,"");
|
|
ftextout(text_var,21,45,0,1);
|
|
|
|
ftextout("@Anzahl Daten AIF@",23,0,0,0);
|
|
ftextout(":",23,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ANZ_DATEN",1,"");
|
|
ftextout(text_var,23,45,0,1);
|
|
}
|
|
else //18 Byte -> kurze AIF ausgeben
|
|
{
|
|
ftextout("@Fahrgestell Nr.@",1,0,0,0);
|
|
ftextout(":",1,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_FG_NR",1,"");
|
|
ftextout(text_var,1,45,0,1);
|
|
|
|
ftextout("@Zusammenbau Nr.@",3,0,0,0);
|
|
ftextout(":",3,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ZB_NR",1,"");
|
|
ftextout(text_var,3,45,0,1);
|
|
|
|
ftextout("@Programmier-Datum@",5,0,0,0);
|
|
ftextout(":",5,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_DATUM",1,"");
|
|
ftextout(text_var,5,45,0,1);
|
|
|
|
ftextout("@Adresse AIF@",19,0,0,0);
|
|
ftextout(":",19,43,0,0);
|
|
INPAapiResultInt(ganz_zahl,"AIF_ADRESSE_LOW",1);
|
|
inttohexstring(ganz_zahl,4,text_var);
|
|
ftextout(text_var,19,45,0,1);
|
|
|
|
ftextout("@Anzahl freie AIF@",21,0,0,0);
|
|
ftextout(":",21,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ANZ_FREI",1,"");
|
|
ftextout(text_var,21,45,0,1);
|
|
|
|
ftextout("@Anzahl Daten AIF@",23,0,0,0);
|
|
ftextout(":",23,43,0,0);
|
|
INPAapiResultText(text_var,"AIF_ANZ_DATEN",1,"");
|
|
ftextout(text_var,23,45,0,1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Speicherscreen ***
|
|
// **************************
|
|
SCREEN s_speicher()
|
|
{
|
|
ftextout("@Speicher lesen@",1,0,1,0);
|
|
ftextout("",3,0,0,0);
|
|
LINE("","")
|
|
{
|
|
if (speicher_lesen_lar_flag==TRUE) ftextout("< F1 > @LAR lesen@" , 4,5,0,1);
|
|
if (speicher_lesen_flash_flag==TRUE) ftextout("< F2 > @FLASH lesen@" , 6,5,0,1);
|
|
if (speicher_lesen_uifm_flag==TRUE) ftextout("< F3 > @UIFM lesen@" , 8,5,0,1);
|
|
if (speicher_lesen_romi_flag==TRUE) ftextout("< F4 > @ROMI lesen@" ,10,5,0,1);
|
|
if (speicher_lesen_ramis_flag==TRUE) ftextout("< F5 > @RAMIS lesen@" ,12,5,0,1);
|
|
if (speicher_lesen_ramil_flag==TRUE) ftextout("< F6 > @RAMIL lesen@" ,14,5,0,1);
|
|
if (speicher_lesen_nvram_flag==TRUE) ftextout("< F7 > @NVRAM lesen@" ,16,5,0,1);
|
|
if (speicher_lesen_romx_flag==TRUE) ftextout("<Shift> + < F4 > @ROMX lesen@" ,10,45,0,1);
|
|
if (speicher_lesen_ramxx_flag==TRUE) ftextout("<Shift> + < F5 > @RAMXX lesen@" ,12,45,0,1);
|
|
|
|
ftextout("< F9 > @Bildschirmdruck@" ,20,5,0,1);
|
|
ftextout("< F10> @Zurück@" ,22,5,0,1);
|
|
ftextout("<Shift> + < F10> @Exit@" ,22,45,0,1);
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Speicherscreen ***
|
|
// *** Ausgabe ***
|
|
// **************************
|
|
SCREEN s_speicher_ausgabe()
|
|
{
|
|
string text_var;
|
|
string job_state;
|
|
|
|
ftextout(speicher_lesen_text,1,0,1,0);
|
|
ftextout("",3,0,0,0);
|
|
INPAapiJob(sgbd,"SPEICHER_LESEN",speicher_lesen_seg_adr_anz,"");
|
|
INPAapiResultText(job_state,"JOB_STATUS",1,"");
|
|
LINE("","")
|
|
{
|
|
ftextout("@Startadresse@",1,0,0,0);
|
|
ftextout(":",1,18,0,1);
|
|
ftextout(speicher_lesen_adresse,1,20,0,1);
|
|
ftextout("@Anzahl@",3,0,0,0);
|
|
ftextout(":",3,18,0,1);
|
|
inttostring(speicher_lesen_anzahl,text_var);
|
|
ftextout(text_var,3,20,0,1);
|
|
ftextout("@Daten@",5,0,0,0);
|
|
ftextout(":",5,18,0,1);
|
|
if(job_state != "OKAY")
|
|
ftextout(job_state,5,20,0,1);
|
|
else
|
|
{
|
|
INPAapiResultBinary("DATEN",1);
|
|
hexdump(speicher_lesen_adresse,speicher_lesen_anzahl,5,20);
|
|
}
|
|
}
|
|
}
|
|
|
|
// **************************
|
|
// *** Fehlerscreen ***
|
|
// **************************
|
|
SCREEN s_fehler()
|
|
{
|
|
ftextout("@Fehlerspeicher@",1,0,1,0);
|
|
ftextout("",3,0,0,0);
|
|
LINE("","")
|
|
{
|
|
if (fs_lesen_flag == TRUE)
|
|
{
|
|
ftextout("< F1 > @Fehlerspeicher lesen@" , 4,5,0,1);
|
|
ftextout("< F2 > @Fehlerspeicher löschen@" , 6,5,0,1);
|
|
ftextout("< F9 > @Fehlerspeicher drucken@" ,20,5,0,1);
|
|
if (fs_lesen_save_as_flag == TRUE)
|
|
ftextout("<Shift> + < F9 > @Fehlerspeicher speichern@" ,20,45,0,1);
|
|
|
|
}
|
|
|
|
if (is_lesen_flag == TRUE)
|
|
{
|
|
ftextout("< F3 > @Infospeicher lesen@" , 8,5,0,1);
|
|
ftextout("< F4 > @Infospeicher löschen@" ,10,5,0,1);
|
|
ftextout("< F8 > @Infospeicher drucken@" ,18,5,0,1);
|
|
if (is_lesen_save_as_flag == TRUE)
|
|
ftextout("<Shift> + < F8 > @Infospeicher speichern@" ,18,45,0,1);
|
|
}
|
|
|
|
if (hs_lesen_flag == TRUE)
|
|
{
|
|
ftextout("< F5 > @Historienspeicher lesen@" ,12,5,0,1);
|
|
ftextout("< F6 > @Historienspeicher löschen@" ,14,5,0,1);
|
|
ftextout("< F7 > @Historienspeicher drucken@" ,16,5,0,1);
|
|
if (hs_lesen_save_as_flag == TRUE)
|
|
ftextout("<Shift> + < F7 > @Historienspeicher speichern@",16,45,0,1);
|
|
}
|
|
ftextout("< F10> @Zurück@" ,22,5,0,1);
|
|
ftextout("<Shift> + < F10> @Exit@" ,22,45,0,1);
|
|
}
|
|
}
|
|
// -- EOF --
|