V3.1E
This commit is contained in:
BIN
UnitPrinc.dcu
BIN
UnitPrinc.dcu
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 39
|
Left = 1294
|
||||||
Top = 183
|
Top = 168
|
||||||
Width = 1212
|
Width = 1212
|
||||||
Height = 664
|
Height = 664
|
||||||
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
|
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
|
||||||
|
|||||||
@@ -3760,7 +3760,7 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if aiguillage[index].position<>const_droit then
|
if aiguillage[index].position=const_devie then
|
||||||
begin
|
begin
|
||||||
if NivDebug=3 then AfficheDebug('133 - aiguillage '+intToSTR(Adr)+' Pris en pointe dévié',clyellow);
|
if NivDebug=3 then AfficheDebug('133 - aiguillage '+intToSTR(Adr)+' Pris en pointe dévié',clyellow);
|
||||||
// AdrPrec:=Adr; // JU
|
// AdrPrec:=Adr; // JU
|
||||||
@@ -3820,7 +3820,8 @@ begin
|
|||||||
|
|
||||||
// AdrPrec:=Adr; // JU
|
// AdrPrec:=Adr; // JU
|
||||||
if Adr=0 then
|
if Adr=0 then
|
||||||
begin Affiche('136 - Erreur fatale',clRed);
|
begin
|
||||||
|
Affiche('136 - Erreur fatale',clRed);
|
||||||
if NivDebug>=1 then AfficheDebug('136 - Erreur fatale',clRed);
|
if NivDebug>=1 then AfficheDebug('136 - Erreur fatale',clRed);
|
||||||
suivant_alg3:=9999;exit;
|
suivant_alg3:=9999;exit;
|
||||||
end;
|
end;
|
||||||
@@ -3835,8 +3836,13 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Affiche('138 - Erreur fatale - Aucun cas Aiguillage',clred);
|
if NivDebug=3 then
|
||||||
if NivDebug=3 then AfficheDebug('138 - Erreur fatale - Aucun cas Aiguillage',clred);
|
begin
|
||||||
|
s:='138 - Aiguillage '+IntToSTR(adr)+' non résolu';
|
||||||
|
if aiguillage[index].position=const_inconnu then s:=s+' car position inconnue';
|
||||||
|
AfficheDebug(s,clred);
|
||||||
|
end;
|
||||||
|
|
||||||
suivant_alg3:=9999;exit;
|
suivant_alg3:=9999;exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3874,7 +3880,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// rechercher le port de destination de la tjd
|
// rechercher le port de destination de la tjd
|
||||||
Adr2:=0;A:=#0;
|
Adr2:=0;A:='Z';
|
||||||
if aiguillage[index].position=const_droit then
|
if aiguillage[index].position=const_droit then
|
||||||
begin
|
begin
|
||||||
A:=aiguillage[index].DDroitB;
|
A:=aiguillage[index].DDroitB;
|
||||||
@@ -3909,6 +3915,15 @@ begin
|
|||||||
Affiche(s,clred);
|
Affiche(s,clred);
|
||||||
suivant_alg3:=9996;
|
suivant_alg3:=9996;
|
||||||
exit;
|
exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if NivDebug=3 then
|
||||||
|
begin
|
||||||
|
s:='Erreur 1022 position TJD '+intToSTR(adr)+' non résolue car position inconnue';
|
||||||
|
affichedebug(s,clred);
|
||||||
|
end;
|
||||||
|
suivant_alg3:=9996;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3983,7 +3998,7 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
s:='Erreur 1022, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
s:='Erreur 1023, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
if nivDebug=3 then AfficheDebug(s,clred);
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
Affiche(s,clred);
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
@@ -4025,7 +4040,7 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
s:='Erreur 1023, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
s:='Erreur 1024, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
if nivDebug=3 then AfficheDebug(s,clred);
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
Affiche(s,clred);
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
@@ -4054,7 +4069,7 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
s:='Erreur 1024, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
s:='Erreur 1025, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
if nivDebug=3 then AfficheDebug(s,clred);
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
Affiche(s,clred);
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;
|
Suivant_alg3:=9998;
|
||||||
@@ -4084,7 +4099,7 @@ begin
|
|||||||
substitue;
|
substitue;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
s:='1025 - Erreur fatale - position TJD/S '+IntToSTR(Adr)+'/'+intToSTR(AdrTJDP)+' inconnue';
|
s:='1026 - Erreur fatale - position TJD/S '+IntToSTR(Adr)+'/'+intToSTR(AdrTJDP)+' inconnue';
|
||||||
Affiche(s,clred);
|
Affiche(s,clred);
|
||||||
AfficheDebug(s,clred);
|
AfficheDebug(s,clred);
|
||||||
suivant_alg3:=9999;exit;
|
suivant_alg3:=9999;exit;
|
||||||
@@ -4506,7 +4521,7 @@ begin
|
|||||||
//if resultatOU then Affiche('VRAI final',clyellow) else affiche('FAUX final',clred);
|
//if resultatOU then Affiche('VRAI final',clyellow) else affiche('FAUX final',clred);
|
||||||
if NivDebug=3 then
|
if NivDebug=3 then
|
||||||
begin
|
begin
|
||||||
s:='Conditions de carré suivant aiguillages: ';
|
s:='Conditions supp. de carré suivant aiguillages: ';
|
||||||
if ResultatOU then s:=s+'vrai : le signal doit afficher carré' else s:=s+'faux : le signal ne doit pas afficher de carré';
|
if ResultatOU then s:=s+'vrai : le signal doit afficher carré' else s:=s+'faux : le signal ne doit pas afficher de carré';
|
||||||
AfficheDebug(s,clyellow);
|
AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
@@ -4588,7 +4603,7 @@ end;
|
|||||||
// si renvoie 0, pas trouvé le signal suivant.
|
// si renvoie 0, pas trouvé le signal suivant.
|
||||||
// rang=1 pour feu suivant, 2 pour feu suivant le 1, etc
|
// rang=1 pour feu suivant, 2 pour feu suivant le 1, etc
|
||||||
// Dans AdresseFeuSuivant : adresse du feu suivant (variable globale)
|
// Dans AdresseFeuSuivant : adresse du feu suivant (variable globale)
|
||||||
function etat_signal_suivant(adresse,rang : integer) : integer ;
|
function etat_signal_suivant(adresse,rang : integer) : integer ;
|
||||||
var num_feu,etat,AdrFeu,i,j,prec,AdrSuiv : integer;
|
var num_feu,etat,AdrFeu,i,j,prec,AdrSuiv : integer;
|
||||||
aspect,combine : word;
|
aspect,combine : word;
|
||||||
TypePrec,TypeActuel : integer;
|
TypePrec,TypeActuel : integer;
|
||||||
@@ -4634,7 +4649,6 @@ begin
|
|||||||
if feux[i].Btype_suiv1=2 then TypeActuel:=2;
|
if feux[i].Btype_suiv1=2 then TypeActuel:=2;
|
||||||
if feux[i].Btype_suiv1=4 then TypeActuel:=2; // aiguillage triple
|
if feux[i].Btype_suiv1=4 then TypeActuel:=2; // aiguillage triple
|
||||||
if feux[i].Btype_suiv1=5 then TypeActuel:=3; // le type du feu 1=détécteur 2=aig 5=bis
|
if feux[i].Btype_suiv1=5 then TypeActuel:=3; // le type du feu 1=détécteur 2=aig 5=bis
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
inc(j);
|
inc(j);
|
||||||
if nivDebug=3 then AfficheDebug('Itération '+IntToSTR(j),clyellow);
|
if nivDebug=3 then AfficheDebug('Itération '+IntToSTR(j),clyellow);
|
||||||
@@ -4648,7 +4662,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
//if nivDebug=3 then AfficheDebug('Engagement j='+IntToSTR(j)+' '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow);
|
//if nivDebug=3 then AfficheDebug('Engagement j='+IntToSTR(j)+' '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow);
|
||||||
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
|
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
|
||||||
|
|
||||||
if Nivdebug=3 then AfficheDebug('Suivant='+intToSTR(AdrSuiv),clyellow);
|
if Nivdebug=3 then AfficheDebug('Suivant='+intToSTR(AdrSuiv),clyellow);
|
||||||
prec:=actuel;TypePrec:=TypeActuel;
|
prec:=actuel;TypePrec:=TypeActuel;
|
||||||
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
||||||
@@ -4667,7 +4680,6 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// si le suivant est un détecteur comporte t-il un signal?
|
// si le suivant est un détecteur comporte t-il un signal?
|
||||||
AdrFeu:=0;
|
AdrFeu:=0;
|
||||||
if (TypeActuel=1) then // détecteur?
|
if (TypeActuel=1) then // détecteur?
|
||||||
@@ -4709,7 +4721,6 @@ begin
|
|||||||
if (NivDebug=3) and (adrFeu=0) then AfficheDebug('Pas Trouvé de feu suivant au feu Adr='+IntToSTR(ADresse),clOrange);
|
if (NivDebug=3) and (adrFeu=0) then AfficheDebug('Pas Trouvé de feu suivant au feu Adr='+IntToSTR(ADresse),clOrange);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// renvoie l'adresse de l'aiguille si elle est déviée après le signal et ce jusqu'au prochain signal
|
// renvoie l'adresse de l'aiguille si elle est déviée après le signal et ce jusqu'au prochain signal
|
||||||
// sinon renvoie 0
|
// sinon renvoie 0
|
||||||
// adresse=adresse du signal
|
// adresse=adresse du signal
|
||||||
@@ -5057,6 +5068,7 @@ function PresTrainPrec(AdrFeu : integer) : boolean;
|
|||||||
var PresTrain : boolean;
|
var PresTrain : boolean;
|
||||||
j,i,Det_initial,Adr_El_Suiv,Btype_el_suivant,DetPrec1,DetPrec2,DetPrec3,DetPrec4 : integer;
|
j,i,Det_initial,Adr_El_Suiv,Btype_el_suivant,DetPrec1,DetPrec2,DetPrec3,DetPrec4 : integer;
|
||||||
begin
|
begin
|
||||||
|
If NivDebug=3 then AfficheDebug('Proc PresTrainPrec('+intToSTR(AdrFeu)+') ---------------',clOrange);
|
||||||
i:=index_feu(Adrfeu);
|
i:=index_feu(Adrfeu);
|
||||||
if i=0 then
|
if i=0 then
|
||||||
begin
|
begin
|
||||||
@@ -5072,7 +5084,7 @@ begin
|
|||||||
j:=1;
|
j:=1;
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
if NivDebug=3 then afficheDebug('Séquence '+IntToSTR(j)+' de recherche des 4 détecteurs précédents-----',clOrange);
|
if NivDebug=3 then afficheDebug('Séquence '+IntToSTR(j)+' de recherche des 4 détecteurs précédents-----',clYellow);
|
||||||
if (j=1) then
|
if (j=1) then
|
||||||
begin
|
begin
|
||||||
det_initial:=feux[i].Adr_det1;Adr_El_Suiv:=feux[i].Adr_el_suiv1;
|
det_initial:=feux[i].Adr_det1;Adr_El_Suiv:=feux[i].Adr_el_suiv1;
|
||||||
@@ -5155,10 +5167,14 @@ var Adr_det,etat,Aig,Adr_El_Suiv,
|
|||||||
code,combine : word;
|
code,combine : word;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
s:='Traitement du feu '+intToSTR(Adrfeu)+'------------------------------------';
|
|
||||||
|
|
||||||
if signalDebug=AdrFeu then AffSignal:=true;
|
if signalDebug=AdrFeu then AffSignal:=true;
|
||||||
if AffSignal then AfficheDebug(s,clOrange);
|
if AffSignal then
|
||||||
|
begin
|
||||||
|
s:='Traitement du feu '+intToSTR(Adrfeu)+'------------------------------------';
|
||||||
|
AfficheDebug(s,clOrange);
|
||||||
|
end;
|
||||||
index:=index_feu(Adrfeu);
|
index:=index_feu(Adrfeu);
|
||||||
if AdrFeu<>0 then
|
if AdrFeu<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -5176,17 +5192,16 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// signal non directionnel
|
// signal non directionnel
|
||||||
etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant
|
etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant
|
||||||
if AffSignal then
|
if AffSignal then
|
||||||
begin
|
begin
|
||||||
code_to_aspect(etat,code,combine);
|
code_to_aspect(etat,code,combine);
|
||||||
s:='Etat signal suivant ('+intToSTR(AdresseFeuSuivant)+') est ';
|
s:='Etat_signal_suivant ('+intToSTR(AdresseFeuSuivant)+') est ';
|
||||||
s:=s+' à '+etatSign[code];
|
s:=s+' à '+etatSign[code];
|
||||||
if Combine<>0 then s:=s+' + '+etatSign[combine];
|
if Combine<>0 then s:=s+' + '+etatSign[combine];
|
||||||
AfficheDebug(s,clyellow);
|
AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// signaux traités spécifiquement
|
// signaux traités spécifiquement
|
||||||
{
|
{
|
||||||
if (AdrFeu=201) then
|
if (AdrFeu=201) then
|
||||||
@@ -5714,7 +5729,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
//s:='Evt Det '+intToSTR(adresse)+'='+intToSTR(etat01);
|
//s:='Evt Det '+intToSTR(adresse)+'='+intToSTR(etat01);
|
||||||
s:='Tick='+IntToSTR(tick)+' Evt Det='+IntToSTR(adresse)+'='+intToSTR(etat01);
|
s:='Tick='+IntToSTR(tick)+' Evt Det='+IntToSTR(adresse)+'='+intToSTR(etat01);
|
||||||
|
|
||||||
Affiche(s,clyellow);
|
Affiche(s,clyellow);
|
||||||
if not(TraceListe) then AfficheDebug(s,clyellow);
|
if not(TraceListe) then AfficheDebug(s,clyellow);
|
||||||
end;
|
end;
|
||||||
@@ -5843,7 +5857,11 @@ begin
|
|||||||
Affiche('Raz Evts ',clLime);
|
Affiche('Raz Evts ',clLime);
|
||||||
end;
|
end;
|
||||||
s:='Tick='+IntToSTR(tick)+' Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos);
|
s:='Tick='+IntToSTR(tick)+' Evt Aig '+intToSTR(adresse)+'='+intToSTR(pos);
|
||||||
if pos=const_droit then s:=s+' droit' else s:=s+' dévié';
|
case pos of
|
||||||
|
const_droit : s:=s+' droit';
|
||||||
|
const_devie : s:=s+' dévié';
|
||||||
|
const_inconnu : s:=s+' inconnu';
|
||||||
|
end;
|
||||||
if inv then s:=s+' INV';
|
if inv then s:=s+' INV';
|
||||||
if AffAigDet then
|
if AffAigDet then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Reference in New Issue
Block a user