-
Notifications
You must be signed in to change notification settings - Fork 1
/
HeightSensor_Template.c
41 lines (35 loc) · 1.02 KB
/
HeightSensor_Template.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
*
* \file HeightSensor_Template.c
* \brief Rte Component Template for AUTOSAR SWC: HeightSensor
*
* \author Sprints AUTOSAR Authoring Tool (SAAT) v1.0.2
* Generated on 7/19/2020 06:17 PM
*
* For any inquiries: [email protected]
*
*/
static void GetPosition (SensorPositionType* position)
{
if (position == 0) position = SENSOR_POSITION_STEP_0;
else if (position > 0 && position <= 64) position = SENSOR_POSITION_STEP_1;
else if (position > 64 && position <= 192) position = SENSOR_POSITION_STEP_2;
else if (position > 192 && position <= 255) position = SENSOR_POSITION_STEP_3;
}
#include "Rte_HeightSensor.h"
/**
*
* Runnable HeightSensor_GetPosition
*
* Triggered By:
* - OperationInvokedEventImpl.OIE_ppHeightSensor_GetPosition
*
*/
void HeightSensor_GetPosition (SensorPositionType* position)
{
Std_ReturnType status;
IoPositionSensorReadingType position;
/* Server Call Points */
status = Rte_Call_rpIOGetHeight_IOGet(&position);
GetPosition(&position);
}