aggiunto trim prog name main

This commit is contained in:
Samuele E. Locatelli
2017-11-02 17:23:10 +01:00
parent cd5703e303
commit 2f2065857b
3 changed files with 14 additions and 2 deletions
+9
View File
@@ -1524,6 +1524,10 @@ Namespace CNC
End Function
''' <summary>
''' restituisce il PROGRAM NAME principale (compreso di PATH!!!)
''' </summary>
''' <returns></returns>
Public Function getPrgNameMain() As Char()
' RIFERIMENTO:
'...
@@ -1551,10 +1555,15 @@ Namespace CNC
End If
End If
Return prgName
End Function
''' <summary>
''' Retituisce nome programma (o SUB program) in esecuzione...
''' </summary>
''' <returns></returns>
Public Function getPrgName() As Focas1.ODBEXEPRG
' RIFERIMENTO:
'...
+1
View File
@@ -12,6 +12,7 @@
<add key="doMemDump" value="false" />
<add key="doSampleMemory" value="false" />
<add key="enableNewFunc" value="true" />
<add key="basePrgMemPath" value="CNCMEMUSERPATH1" />
<!--gestione TIMERS e periodi multipli x thread lenti-->
<add key="startTimerMs" value="250" />
<!-- ciclo corto x invio a server: ms -->
+4 -2
View File
@@ -291,16 +291,18 @@ namespace IOB_WIN
lg.Error(exc, "Errore in getPrgName");
}
// se in test butto fuori nUOVA versione prgName...
if(utils.CRB("enableNewFunc"))
if (utils.CRB("enableNewFunc"))
{
// recupero NUOVO prgName...
try
{
char[] newMainName = FANUC_ref.getPrgNameMain();
string nomeMain = utils.purgedChar2String(newMainName);
// trimmo path del programma, ovvero "CNCMEMUSERPATH1"
nomeMain.Replace(utils.CRS("basePrgMemPath"), "");
lg.Info("PROG_MAIN: {0}", nomeMain);
}
catch(Exception exc)
catch (Exception exc)
{
lg.Error(string.Format("Eccezione in recupero PRG NAME MAIN:{0}{1}", Environment.NewLine, exc));
}