[성현모] TRA V2 삭제
This commit is contained in:
156
CPXV2 PTS/References/GaudiCfg/help/module/e_pamscripts.html
Normal file
156
CPXV2 PTS/References/GaudiCfg/help/module/e_pamscripts.html
Normal file
@ -0,0 +1,156 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>E_PAMSCRIPTS</TITLE>
|
||||
<META NAME="Generator" CONTENT="KDOC ">
|
||||
</HEAD>
|
||||
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
|
||||
|
||||
<table BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#FFFFCC" NOSAVE >
|
||||
<tr ALIGN=CENTER VALIGN=CENTER NOSAVE>
|
||||
<td NOSAVE><font face="Arial,Helvetica"><font size=+2></font></font>
|
||||
<br><font face="Arial,Helvetica"><font size=+2>CCS Modul <b>E_PAMSCRIPTS</b></font></font>
|
||||
<br> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<PRE>
|
||||
$Id: e_pamscripts.C,v 1.4 2005/04/01 07:37:46 lehmann Exp $
|
||||
---------------------------------------------------------------------
|
||||
Kurzbeschreibung: Initialisierung von Array-Variablen
|
||||
---------------------------------------------------------------------
|
||||
Projekt: CCS
|
||||
Sourcefile: e_pamscripts.C
|
||||
Autor: RtW/TEF72-Juilfs (12.12.95)
|
||||
Zielsystem: HP9000/V743 (HP-RT 2.0x), /Sxxx (HP-UX 9.0x)
|
||||
Sprache: C++
|
||||
---------------------------------------------------------------------
|
||||
Prototyp:
|
||||
MPI Schnittstelle
|
||||
void e_pamscripts(
|
||||
,shm_stringpointer *zeilen_wert
|
||||
,long index1
|
||||
,long anzahl)
|
||||
|
||||
---------------------------------------------------------------------
|
||||
Aufruf: im Vectorinterpreter
|
||||
|
||||
(*funktionen[modulnummer])
|
||||
(Ssp_expand_zeile
|
||||
,Ssp_expand_wert
|
||||
,p_verwaltung->begin_modulblock
|
||||
,p_verwaltung->anzahl_modulparameter);
|
||||
|
||||
---------------------------------------------------------------------
|
||||
Funktionsbeschreibung:
|
||||
Dieses Modul startet einen script auf dem PAM an.
|
||||
|
||||
|
||||
Beschreibung der Modul<75>bergabeparameter:</pre><b><a name="param1">1</a> PRUEFSCHRITT</b><pre>
|
||||
GAUDI Pr<50>fschritt
|
||||
------------------------------</pre><b><a name="param2">2</a> POSITION</b><pre>
|
||||
PAV- Position
|
||||
------------------------------</pre><b><a name="param3">3</a> SCRIPTNAME</b><pre> Scriptname
|
||||
------------------------------</pre><b><a name="param4">4</a> SUB_DIRECTORY</b><pre>
|
||||
Unterverzeichnis. Das Verzeichnis in dem der Script gesucht
|
||||
wird setzt sich aus dem Verzeichnis, das im Service PAMSCIPTS
|
||||
fuer den Pruefstand definiert wurde, und diesem Unterverzeichnis
|
||||
zusammen.
|
||||
------------------------------</pre><b><a name="param5">5</a> PARA_1</b><pre> Parameter 1 mit dem der Script ausgefuehrt wird
|
||||
------------------------------</pre><b><a name="param6">6</a> PARA_2</b><pre> Parameter 2 mit dem der Script ausgefuehrt wird
|
||||
------------------------------</pre><b><a name="param7">7</a> PARA_3</b><pre> Parameter 3 mit dem der Script ausgefuehrt wird
|
||||
------------------------------</pre><b><a name="param8">8</a> PARA_4</b><pre> Parameter 4 mit dem der Script ausgefuehrt wird
|
||||
------------------------------</pre><b><a name="param9">9</a> PARA_5</b><pre> Parameter 5 mit dem der Script ausgefuehrt wird
|
||||
------------------------------</pre><b><a name="param10">10</a> ERGEBNIS</b><pre> Exit code des Scripts
|
||||
------------------------------</pre><b><a name="param11">11</a> FEHLERFLAG</b><pre> TRUE = der Inhalt der Variable wird bei jedem Programmstart gel<65>scht.
|
||||
FALSE = der Inhalt der Variable wird nur beim Laden des Pruefprogrammes gel<65>scht.
|
||||
...
|
||||
---------------------------------------------------------------------
|
||||
|
||||
-- pragmas -----------------------------------------------------------
|
||||
#pragma COPYRIGHT "Robert Bosch GmbH Reutlingen, RtW/TEF72"
|
||||
#pragma VERSIONID "$Id: e_pamscripts.C,v 1.4 2005/04/01 07:37:46 lehmann Exp $"
|
||||
|
||||
-- defines -----------------------------------------------------------
|
||||
#define HEADER "$Id: e_pamscripts.C,v 1.4 2005/04/01 07:37:46 lehmann Exp $"
|
||||
#define EXTERN extern Bei allen Subroutinen
|
||||
|
||||
#define MAX_ANZ_PARAM 5
|
||||
-- includes ----------------------------------------------------------
|
||||
#include "shm_syscom.H"
|
||||
#include <stdlib.h>
|
||||
#include "libccs.H"
|
||||
#include "ccl_defines.H" ccl_definition PREINT
|
||||
-- external functions / variables ------------------------------------
|
||||
-- global variables (nur im "main" erlaubt) -------------------------
|
||||
|
||||
-Begin---------------------------------------------------------------
|
||||
---------------------------------------------------------------------
|
||||
int e_pamscripts(shm_stringpointer *zeilen_wert
|
||||
,long index1
|
||||
,long anzahl)
|
||||
{
|
||||
-- local variables ---------------------------------------------------
|
||||
int i; // Schleifenvariable
|
||||
int ind; // Index
|
||||
int iIndErgebnis; // Index auf die Ergebnis
|
||||
int iIndFehlerflag; // Index auf das Fehlerflag
|
||||
int iStat; // Status
|
||||
Ss_services service; // Service struktur
|
||||
QString strNum; // Nummern string
|
||||
QString strParam; // Parameterstring
|
||||
QString strParamOne; // Parameter
|
||||
QString strScript; // Scriptname
|
||||
QString strSubDir; // Unterverzeichnis
|
||||
QString strRun; // Run String
|
||||
|
||||
//------------------------------------------------------------------
|
||||
if(strcmp(Ssp_vi->job.liststate,PREINT)==0) return 0;
|
||||
|
||||
ind = index1 + 2;
|
||||
strScript = (const char*)*zeilen_wert->ptr[ind];
|
||||
ind++;
|
||||
strSubDir = (const char*)*zeilen_wert->ptr[ind];
|
||||
ind++;
|
||||
strParam = " ";
|
||||
for( i = 0; i < MAX_ANZ_PARAM; i++)
|
||||
{
|
||||
strParamOne = (const char*)*zeilen_wert->ptr[ind];
|
||||
if (strParamOne.isEmpty())
|
||||
strParam += "\"\" ";
|
||||
else
|
||||
strParam += "\"" + strParamOne + "\" ";
|
||||
ind++;
|
||||
}
|
||||
iIndErgebnis = ind;
|
||||
ind ++;
|
||||
iIndFehlerflag = ind;
|
||||
*zeilen_wert->ptr[iIndErgebnis] = "0";
|
||||
*zeilen_wert->ptr[iIndFehlerflag] = "1";
|
||||
if ( get_service ("pamscripts", 1, &service) != 0 )
|
||||
{
|
||||
error_message (ERR_ERROR, HEADER,__LINE__,
|
||||
"Fehlerwert = %i, if Wert = 1, then Service not found !", get_service ("pamscripts", 1, &service));
|
||||
return -1;
|
||||
}
|
||||
strRun = service.directory;
|
||||
strRun += "/" + strSubDir + "/" + strScript;
|
||||
strRun = strRun.lower() + strParam;
|
||||
iStat = system( strRun.latin1() );
|
||||
iStat /= 256;
|
||||
//qDebug(strRun);
|
||||
strNum.setNum(iStat);
|
||||
*zeilen_wert->ptr[iIndErgebnis] = strNum.latin1();
|
||||
if (iStat == 127)
|
||||
{
|
||||
error_message (ERR_ERROR, HEADER,__LINE__,
|
||||
"Script not found: %s", strRun.latin1());
|
||||
return -1;
|
||||
}
|
||||
*zeilen_wert->ptr[iIndFehlerflag] = "0";
|
||||
return 0;
|
||||
}
|
||||
-End of file---------------------------------------------------------
|
||||
Historie:
|
||||
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user