|
CCS Modul P_TRACE |
$Id: p_trace.C,v 1.6 2006/01/05 10:51:36 cvs Exp $
---------------------------------------------------------------------
Kurzbeschreibung: Für Traceing auf K-Line und CAN
---------------------------------------------------------------------
Projekt: CCS
Sourcefile: p_trace.C
Autor: RtW2/TEF72-Keppler (12.08.2005)
Zielsystem: HP9000/V743 (HP-RT 3.01), Linux
Sprache: ANSI-C/C++
---------------------------------------------------------------------
Prototyp:
int p_trace
(shm_stringpointer *zeilen_wert // <I> Inputfield of INTERPRETERLIST
,long index1 // <I> INDEX in list
,long anzahl) // <I> Number of Elements for Loaddfile
---------------------------------------------------------------------
Aufruf:
error = p_trace
(zeilen_wert // <I> Inputfield of INTERPRETERLIST
,index1 // <I> INDEX in list
,anzahl) // <I> Number of Elements for Loaddfile
if (error != 0) // Fehlerbeschreibung ...
{
// Fehlerhandling ...
}
---------------------------------------------------------------------
Function description:
This modul handel's the the tracing on the K-Line and on CAN.
You can start the tracing with TRACE_MODE=T_ON. The Prüfliste is going on.
You can stop the tracing and read back the traced data with TRACE_MODE=READ.
Tracing on CAN:
It is possible to trace all date received on a defined CAN-ID. All
traced data are stored in a file hold on the SKM.
It is possible to trace more then one ID. But the traced Data are hold
in different files/buffers, one for each CAN-ID.
In a second step you can read back the data from SKM and store in a
array.
Tracing on K-Line:
It is possible to trace all received Bytes on the K-Line. It is not
possible to send parallel to the tacing data to the ECU over the k-line.
Parameter discription :
Inputparameter:1 FILENAME: It means the filename used in the SKM for storing the traced
data. (maxlen = 80 Char.)2 FILESIZE: Size of the file in Byte. (0...100000)
If the number of the traced data reach the filesize, the
tracing will be stopped.3 TR_INTERFACE:Type of communication-line.
CAN = tracing on CAN
K = tracing on K-Line4 TRACE_MODE: T_ON = switch on tracing all received data.
This module is leave after setting up the job.
If you want to trace 5 Seconds, you have to insert
a waitingtime for 5 seconds after this module.
READ= Switch off tracing and read data from file <FILENAME>.
All data are transfered from the SKM-File to the array in
<RETURNARRAY>
ATTENTION: If you want to read data, the Inputparameter must be the
same as in TRACE_MODE=T_ON, because the buffername is build in dependence
of the Inputparameter.5 CAN_ID:Read-Identifier on CAN-bus which should be traced.6 CAN_IDLEN:
[11,29] 11/29 bit identifier.7 MAXTIME:
Maximal time to trace. [ms]
Is this time up, the trace will be end.
Returnparameter:8 RETURNARRAY: The return parameter from the SKM are stored here, if
MODE=READ_DATA.9 ERROR: != 0 if an error has occured.