示例#1
0
 *
 * $Date$
 * $Rev$
 * $Author$
 * $URL$
 *
 */

#include "tpl_debug.h"
#include "tpl_os_resource_kernel.h"
#include <stdio.h>

#define OS_START_SEC_CODE
#include "tpl_memmap.h"
FUNC(void, OS_CODE)
  print_counter(CONSTP2VAR(tpl_counter, AUTOMATIC, OS_CONST) c)
{
#ifdef WITH_DOW /* not all ports have an stdc */
  tpl_time_obj *t = c->first_to;
  
  printf("counter (ticks_per_base=%d, max_allowed_value=%d, min_cycle=%d)\n",
         (int)c->ticks_per_base,
         (int)c->max_allowed_value,
         (int)c->min_cycle);
  printf("    current_tick=%d, current_date=%d\n",
         (int)c->current_tick,
         (int)c->current_date);
  
  while (t != NULL) {
    printf("        date=%lu\n",(uint32)(t->date));
    t = t->next_to;
示例#2
0
/* --------------------------------------------------------------------------- */
/* RTE Event: /Component/EcuAbstraction/IB_EcuAbstraction/Brake_EVENT */

FUNC(void, EcuAbstraction_CODE) RunnableEntity_EcuAbstraction_Receive_func(VAR(float64, AUTOMATIC) DLBrakeValue,
                                                                           VAR(float64, AUTOMATIC) DRBrakeValue,
                                                                           VAR(float64, AUTOMATIC) ULBrakeValue,
                                                                           VAR(float64, AUTOMATIC) URBrakeValue)
{
   /* ... */
}

/* --------------------------------------------------------------------------- */
/* RTE Event: /Component/EcuAbstraction/IB_EcuAbstraction/Send_EVENT */

FUNC(void, EcuAbstraction_CODE) RunnableEntity_WheelSpeed_func(CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) DLWheelSpeed,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) DRWheelSpeed,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) ULWheelSpeed,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) URWheelSpeed,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) CarSpeed,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) SteeringAngle,
                                                               CONSTP2VAR(float64, AUTOMATIC, RTE_APPL_DATA) Gyro)
{
   /* ... */
}

/* --------------------------------------------------------------------------- */
/* RTE Event: /Component/EcuAbstraction/IB_EcuAbstraction/Throttle_EVENT */

FUNC(void, EcuAbstraction_CODE) RunnableEntity_Throttle_func(VAR(float64, AUTOMATIC) Throttle)
{