AutosarOS
Counter.h File Reference

Counter management. More...

#include "Types.h"
Include dependency graph for Counter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

StatusType Counter_IncrementCounter (CounterType counterID)
 Increment counter. More...
 
StatusType Counter_GetCounterValue (CounterType counterID, TickRefType value)
 Read current counter value. More...
 
StatusType Counter_GetElapsedValue (CounterType counterID, TickRefType value, TickRefType elapsedValue)
 Get elapse counter value. More...
 

Detailed Description

Counter management.

Date
2020-06-15
Author
Pascal Romahn

Definition in file Counter.h.

Function Documentation

◆ Counter_GetCounterValue()

StatusType Counter_GetCounterValue ( CounterType  counterID,
TickRefType  value 
)

Read current counter value.

This service reads the current count value of a counter.

Parameters
counterIDCounter which tick value should be read
valueContains the current tick value of the counter
Returns
E_OK No errors
E_OS_ID The counterID was not valid
E_OS_PARAM_POINTER Pointer parameter is invalid

Definition at line 51 of file Counter.c.

Here is the caller graph for this function:

◆ Counter_GetElapsedValue()

StatusType Counter_GetElapsedValue ( CounterType  counterID,
TickRefType  value,
TickRefType  elapsedValue 
)

Get elapse counter value.

This service gets the number of ticks between the current tick value and a previously read tick value.

Parameters
counterIDThe counter to be read
valuePreviously read tick value (contains the current tick afterwards)
elapsedValueDifference between previous and current value
Returns
E_OK No errors
E_OS_ID The counterID was not valid
E_OS_VALUE The given value was not valid
E_OS_PARAM_POINTER Pointer parameter is invalid

Definition at line 78 of file Counter.c.

◆ Counter_IncrementCounter()

StatusType Counter_IncrementCounter ( CounterType  counterID)

Increment counter.

This service increments a software counter.

Parameters
counterIDCounter to be incremented
Returns
E_OK No errors
E_OS_ID The counterID was not valid or the counter is implemented in hardware

Definition at line 21 of file Counter.c.

Here is the call graph for this function: