CCS Modul   P_SKMTASK
 
   $Id: p_skmtask.C,v 1.6 2005/09/01 07:11:40 sniff Exp $
   ---------------------------------------------------------------------
   Kurzbeschreibung: 	Communicate with SKM
   ---------------------------------------------------------------------
   Projekt:		CCS
   Sourcefile:		p_skmtask.C
   Autor:		RtW2/TEF32-Wiese (30.10.03)
   Zielsystem:		HP9000/V743 (HP-RT 3.01) /Linux
   Sprache:		ANSI-C/C++
   ---------------------------------------------------------------------
   Prototyp:
   
   int  p_skmtask
   (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_skmtask
   (zeilen_wert	// <I> Inputfield of INTERPRETERLIST
   ,index1	// <I> INDEX in list
   ,anzahl)	// <I> Number of Elements for Loaddfile

   
   if (error != 0) 	// Errordescription ... 
   {
   // Errorhandling ... 
   }
   
   ---------------------------------------------------------------------
   Functiondescription:
   
   This Modul sends parameter to the process or to the skm by itself.
   Different Parameter can manage the function to the skm.
   The number pf Parameters is variable and is different from function to function.  
      
   Input parameter description:
1 PRUEFSCHRITT:
   	Step in plist
2 POSITION:
	Position of step
3 FUNKTION:
   	Only CANSTART realized
4 SUBFUNKTION:
  		Only GM1 realized
5 MODE
  			S:Send G:get L: SendGet
6 SUBMODE
  		Not used
7 PARA1
  			Function Specific see below
   .....
26 PARA20
   
   The Modul sends many parameter to the process skm o.a and works like
   described under funktion and subfunktion
   Not all parameters are used in all funktions
     
   The Parameters are send to SKM with BLOCKTITLE SA.
   
   FUNKTION CANSTART // SUBFUNKTION GM1:
      Funktion like Dokument RB Entry Condition on CAN by AE/EWG Brand from 28.1.03
      - Send "FIRSTSENDMESSAGE" until TOSEND1. 
      - read message from ECU with TOREC1 and compare it with FIRSTREADMESSAGE
      - wait WSEND2
      - send SECONDSENDMESSAGE with TOSEND2
      - read message from ECU with TOREC2 and compare it with SECONDREADMESSAGE
          
      FUNKTION=CANSTART
      SUBFUNKTION: GM1
      MODE:SEND
      SUBMODE=""
      PARA1=SENDIDENTIFIER      :777
      PARA2=SENDIDENTIFIERLEN   :11
      PARA3=READIDENTIFIER      :778
      PARA4=READIDENTIFIERLEN   :11
      PARA5=FIRSTSENDMESSAGE    :075242454E545259
      PARA6=FIRSTREADMESSAGE    :075242454E545259
      PARA7=SECONDSENDMESSAGE   :04495800FF000000
      PARA8=SECONDREADMESSAGE   :04495800FF000000
      PARA9=TOSEND1	(ms) :2000
      PARA10=TOREC1	(ms) :10
      PARA11=WSEND2	(ms) :100
      PARA12=TOSEND2	(ms) :10
      PARA13=TOREC2   	(ms) :100
            
      The communication starts to SKM with SA and switches to function with "CSGM"
      Rof this the data starts with "U""4"<CSGM>
      The data will be send in format (<FORMATBYTE><LENBYTE><LENBYTEDATA>)*n
      FORMATBYTE: U -> The data ist a unsigned long int
                  S -> The data ist a unsigned short int
                  H -> The data ist a hexstring and will be send in binary
                  A -> The data is a charstring and send as is