ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Protected Attributes | List of all members
TSystem_Timer_Base Class Reference

System timer base class. More...

#include <System_Timer_Base.h>

Inheritance diagram for TSystem_Timer_Base:
Inheritance graph
Collaboration diagram for TSystem_Timer_Base:
Collaboration graph

Public Member Functions

U32 Get_Tick ()
 System timer class constructor method. More...
 
virtual U32 Get_Actual_Time ()
 Get actual system time in timer ticks. More...
 
VOID Interrupt ()
 System timer interrupt method. More...
 
VOID Delay_ms (U32 u32_Delay_Value)
 Perform blocked delay given in ms. More...
 
F32 Get_Delta_Time (U32 u32_Start_Timestamp, U32 u32_End_Timestamp)
 Get delta time in seconds. More...
 
BOOL Is_Timeout_ms (U32 u32_Start_Timestamp, U32 u32_Timeout)
 Return statis of the timeout. More...
 
U32 Get_Timespan_ms (U32 u32_Start_Timestamp)
 Return timespan in milliseconds. More...
 
- Public Member Functions inherited from TTimer_Base
 TTimer_Base ()
 User timer class constructor method. More...
 
virtual ~TTimer_Base ()
 User timer class destructor method. More...
 
VOID Interrupt ()
 User timer interrupt method. More...
 
virtual BOOL Configure_Clock (U32 u32_Clock)
 Set user timer input clock frequency method. More...
 
BOOL Set_Interrupt_Frequency (F32 f32_Frequency)
 Set user timer interrupt frequency method. More...
 
virtual VOID Interrupt_Enable (U32 u32_Interrupt_Priority)=0
 Enable interrupt method. More...
 
virtual VOID Interrupt_Disable ()=0
 Disable interrupt method. More...
 
virtual VOID Start ()=0
 Start timer operation method. More...
 
virtual VOID Stop ()=0
 Stop timer operation method. More...
 
F32 Get_Resolution_s ()
 Get timer resolution in seconds. More...
 
F32 Get_Resolution_ms ()
 Get timer resolution in miliseconds. More...
 
F32 Get_Resolution_us ()
 Get timer resolution in microseconds. More...
 
F32 Get_Resolution_ns ()
 Get timer resolution in nanoseconds. More...
 
F32 Get_Interrupt_Frequency ()
 Get Get interrupt frequency in herz. More...
 
F32 Get_Interrupt_Period ()
 Get interrupt period in seconds. More...
 
U32 Time_To_Execution_Loops (F32 f32_Time_Span)
 Convert time to interrupt loops method. More...
 
VOID Init ()
 User timer initialisation method. More...
 
VOID Done ()
 User timer finalisation method. More...
 

Protected Attributes

volatile U32 u32_Tick_Counter = (U32)0
 Timer tick counter. More...
 
- Protected Attributes inherited from TTimer_Base
BOOL bool_Initialisation_Error = (BOOL)false
 Initialisation error. More...
 
F32 f32_Input_Clock = (F32)0.0f
 Timer input frequency in Hz. More...
 
U32 u32_Timer_Clock = (U32)0
 Timer clock in herz. More...
 
U32 u32_Timer_Counts = (U32)0
 Timer counter preset value. More...
 
F32 f32_Resolution_s = (F32)0.0f
 Timer resolution in seconds. More...
 
F32 f32_Resolution_ms = (F32)0.0f
 Timer resolution in miliseconds. More...
 
F32 f32_Resolution_us = (F32)0.0f
 Timer resolution in microseconds. More...
 
F32 f32_Resolution_ns = (F32)0.0f
 Timer resolution in nanoseconds. More...
 
F32 f32_Interrupt_Frequency = (F32)0.0f
 Interrupt frequency in herz. More...
 
F32 f32_Interrupt_Period = (F32)0.0f
 Interrupt period in seconds. More...
 

Detailed Description

System timer base class.

Member Function Documentation

◆ Delay_ms()

VOID TSystem_Timer_Base::Delay_ms ( U32  u32_Delay_Value)

Perform blocked delay given in ms.


Note
None
Parameters
[in]u32_Delay_Value- Blocked delay time in milliseconds.
Returns
None
Override
Not allowed
Attention
Don't use this function within 1 ms task.

References Get_Tick().

Referenced by TP019_14_KG3_DIO2_T1::Chip_Connect(), TFPGA::Configure(), TFPGA_P015_09_CB::Configure(), TFPGA_P017_39_KG3_CB::Configure(), TFPGA_STM32F429::Configure(), TTarget_P013_35_V1_3_CPU::FPGA_Configure(), and TTarget_P017_11_V1::FPGA_Configure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get_Actual_Time()

U32 TSystem_Timer_Base::Get_Actual_Time ( )
virtual

Get actual system time in timer ticks.


Note
Replacement for function Get_System_Time()
Parameters
None
Returns
U32 - Actual time in timer ticks.
Override
Not allowed
Attention
None

References u32_Tick_Counter.

Referenced by TUART1_STM32F410CBU6::Communication_Data_Transmit(), TUART6_STM32F410CBU6::Communication_Data_Transmit(), TUART1_STM32F429::Communication_Data_Transmit(), TUART6_STM32F429::Communication_Data_Transmit(), TUART7_STM32F429::Communication_Data_Transmit(), TEvent_Manager::Create(), TEvent_Manager::Create_Header_Event(), TABCC_Base::Dummy_Command(), ETH_ReadPHYRegister(), ETH_WritePHYRegister(), ethernetif_update_config(), TProtocol_ANVILEX_Master_Over_UART::Execute(), TProtocol_IP_Over_ETHERNET::Execute_1ms(), TABCC_Base::Get_Data_Format_Command(), TABCC_Base::Get_Exception_Command(), TABCC_Base::Get_Exception_Info_Command(), TABCC_Base::Get_Firmware_Version_Command(), TABCC_Base::Get_Module_Type_Command(), TABCC_Base::Get_Network_Type_Command(), TABCC_Base::Get_Parameter_Support_Command(), TABCC_Base::Init(), TCAN1_STM32F429::Init(), TCAN2_STM32F429::Init(), TABCC_Base::Map_ADI_Read_Area_Command(), TABCC_Base::Map_ADI_Write_Area_Command(), TABCC_Base::Network_Setup(), PHY_ETH_Init(), TABCC_Base::Read_Process_Data_Size_Command(), TSPI2_STM32F429::Receive_Byte(), TSPI4_STM32F429::Receive_Byte(), TSPI5_STM32F429::Receive_Byte(), TSPI2_STM32F429::Send_Byte(), TSPI4_STM32F429::Send_Byte(), TSPI5_STM32F429::Send_Byte(), TABCC_Base::Set_Node_Address(), TABCC_Base::Setup_Complete_Command(), TSPI2_STM32F429::Transfer_Byte(), TSPI4_STM32F429::Transfer_Byte(), TSPI5_STM32F429::Transfer_Byte(), TSPI2_STM32F429::Verify_Byte(), TSPI4_STM32F429::Verify_Byte(), TSPI5_STM32F429::Verify_Byte(), and TABCC_Base::Write_Process_Data_Size_Command().

Here is the caller graph for this function:

◆ Get_Delta_Time()

F32 TSystem_Timer_Base::Get_Delta_Time ( U32  u32_Start_Timestamp,
U32  u32_End_Timestamp 
)

Get delta time in seconds.


Note
None
Parameters
[in]u32_Start_Timestamp- Timer start timestamp.
[in]u32_End_Timestamp- Timer end timestamp.
Returns
F32 - Time span in seconds.
Override
Not allowed
Attention
None

References TTimer_Base::f32_Resolution_s.

◆ Get_Tick()

U32 TSystem_Timer_Base::Get_Tick ( )

System timer class constructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

System timer class destructor method

Note
None
Override
Not allowed
Attention
Don't call this method directly.

Provides a system timer tick value in timer ticks as U32

Note
None
Returns
U32 - Actual timer tick value
Override
Not allowed
Attention
This method requered only for compatibility.

References u32_Tick_Counter.

Referenced by TProtocol_CANopen_Slave_Over_CAN::Communication_Block_Data_Receive(), Delay_ms(), TFunction_Block_ABB_SACE_FSM_T1::Execute(), TFunction_Block_PV_Input_Management_FSM::Execute(), and TProtocol_CANopen_Slave_Over_CAN::Execute_1ms().

Here is the caller graph for this function:

◆ Get_Timespan_ms()

U32 TSystem_Timer_Base::Get_Timespan_ms ( U32  u32_Start_Timestamp)

Return timespan in milliseconds.


Note
None
Parameters
[in]u32_Start_Timestamp- Timer start timestamp.
Returns
U32 - Actual timespan in milliseconds
Return values
false- Timeout elapsed
true- Timeout in profress
Override
Not allowed
Attention
None

References u32_Tick_Counter.

Referenced by TFunction_Block_ABB_SACE_FSM_T1::Execute().

Here is the caller graph for this function:

◆ Interrupt()

VOID TSystem_Timer_Base::Interrupt ( )

System timer interrupt method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References object_Application, and u32_Tick_Counter.

◆ Is_Timeout_ms()

BOOL TSystem_Timer_Base::Is_Timeout_ms ( U32  u32_Start_Timestamp,
U32  u32_Timeout 
)

Return statis of the timeout.


Note
None
Parameters
[in]u32_Start_Timestamp- Timer start timestamp.
[in]u32_Timeout- Timeout value in millisecconds.
Returns
BOOL - Timeout status
Return values
false- Timeout elapsed
true- Timeout in profress
Override
Not allowed
Attention
None
Todo:
ANVILEX : Check for possible optimisation using overflow issue

References u32_Tick_Counter.

Referenced by TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_1_Fan_Status_Changer(), TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_2_Fan_Status_Changer(), TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_3_Fan_Status_Changer(), TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_4_Fan_Status_Changer(), TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_5_Fan_Status_Changer(), TFunction_Block_Cabinet_Cooling_System_Model::Cabinet_6_Fan_Status_Changer(), TP019_14_KG3_DIO2_T1::Chip_Programming(), TUART1_STM32F410CBU6::Communication_Data_Transmit(), TUART6_STM32F410CBU6::Communication_Data_Transmit(), TUART1_STM32F429::Communication_Data_Transmit(), TUART6_STM32F429::Communication_Data_Transmit(), TUART7_STM32F429::Communication_Data_Transmit(), TABCC_Base::Dummy_Command(), ETH_ReadPHYRegister(), ETH_WritePHYRegister(), ethernetif_update_config(), TFunction_Block_ABB_SACE_FSM_T1::Execute(), TFunction_Block_PV_Input_Management_FSM::Execute(), TProtocol_ANVILEX_Master_Over_UART::Execute(), TABCC_Base::Get_Data_Format_Command(), TABCC_Base::Get_Exception_Command(), TABCC_Base::Get_Exception_Info_Command(), TABCC_Base::Get_Firmware_Version_Command(), TABCC_Base::Get_Module_Type_Command(), TABCC_Base::Get_Network_Type_Command(), TABCC_Base::Get_Parameter_Support_Command(), TFunction_Block_Cooling_System_Model::He_Fan_State_Changer(), TFunction_Block_Cooling_System_Model::Heater_State_Changer(), TCAN1_STM32F429::Init(), TCAN2_STM32F429::Init(), TABCC_Base::Map_ADI_Read_Area_Command(), TABCC_Base::Map_ADI_Write_Area_Command(), TABCC_Base::Network_Setup(), PHY_ETH_Init(), TFunction_Block_Cooling_System_Model::Pump_State_Changer(), TABCC_Base::Read_Process_Data_Size_Command(), TSPI2_STM32F429::Receive_Byte(), TSPI4_STM32F429::Receive_Byte(), TSPI5_STM32F429::Receive_Byte(), TSPI2_STM32F429::Send_Byte(), TSPI4_STM32F429::Send_Byte(), TSPI5_STM32F429::Send_Byte(), TABCC_Base::Set_Node_Address(), TABCC_Base::Setup_Complete_Command(), TSPI2_STM32F429::Transfer_Byte(), TSPI4_STM32F429::Transfer_Byte(), TSPI5_STM32F429::Transfer_Byte(), TSPI2_STM32F429::Verify_Byte(), TSPI4_STM32F429::Verify_Byte(), TSPI5_STM32F429::Verify_Byte(), TP019_14_KG3_DIO2_T1::Wait_Busy_Bit(), and TABCC_Base::Write_Process_Data_Size_Command().

Here is the caller graph for this function:

Member Data Documentation

◆ u32_Tick_Counter

volatile U32 TSystem_Timer_Base::u32_Tick_Counter = (U32)0
protected

Timer tick counter.

Referenced by Get_Actual_Time(), Get_Tick(), Get_Timespan_ms(), Interrupt(), and Is_Timeout_ms().


The documentation for this class was generated from the following files: