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

STM32F429 RTC class. More...

#include <RTC_STM32F429.h>

Collaboration diagram for TRTC_STM32F429:
Collaboration graph

Public Member Functions

 TRTC_STM32F429 ()
 Class constructor method. More...
 
 ~TRTC_STM32F429 ()
 Class destructor method. More...
 
VOID Init ()
 RTC initialisation method. More...
 
VOID Done ()
 RTC finalisation method. More...
 
VOID Execute_1ms ()
 RTC 1ms cyclic processing method. More...
 
VOID Execute_Background ()
 RTC background cyclic processing method. More...
 
VOID Set_DateTime (TDate_Time::TDate_Time_Structure *object_DateTime)
 Set date time method. More...
 
VOID Get_DateTime (TDate_Time::TDate_Time_Structure *object_DateTime)
 Get date time method. More...
 
VOID Set_Hardware_RTC (TDate_Time::TDate_Time_Structure *object_DateTime)
 Set Hardware RTC method. More...
 
BOOL Get_Hardware_RTC (TDate_Time::TDate_Time_Structure *object_DateTime)
 Get Hardware RTC method. More...
 
BOOL Get_Hardware_RTC (TDate_Time *object_DateTime)
 Get Hardware RTC method. More...
 
VOID Set_Software_RTC (TDate_Time::TDate_Time_Structure *object_DateTime)
 Set Software RTC method. More...
 
VOID Get_Software_RTC (TDate_Time::TDate_Time_Structure *object_DateTime)
 Get Software RTC method. More...
 
U64 Get_Last_System_Shootdown_Duration_in_ms ()
 Get last system shootdown duration time in miliseconds method. More...
 
U64 Get_Last_System_Shootdown_Duration_in_s ()
 Get last system shootdown duration time in seconds method. More...
 
U64 Get_Actual_System_Runtime_Duration_in_ms ()
 Get actual system runtime duration time in miliseconds method. More...
 
U64 RND (TDate_Time::TDate_Time_Structure *object_DateTime)
 Method for calculating the amount of time elapsed since the beginning of time (01.01.0001) More...
 
U64 RND (U32 y, U32 m, U32 d)
 Method for calculating the amount of time elapsed since the beginning of time (01.01.0001) More...
 
VOID Sync_Virtual_RTC ()
 Synchronise virtual RTC method. More...
 
VOID Send_Information (TProtocol_Base *object_Protocol)
 Send information about RTC hardware driver over communication link protocol. More...
 

Private Member Functions

VOID Increment_RTC_Data_Read_Ready_Error_Counter ()
 Increment hardware RTC read data ready error counter method. More...
 
VOID Take_Runtime_Snapshoot ()
 Take runtime date ant time snapshoot method. More...
 
VOID Recall_Runtime_Snapshoot ()
 Recall last runtime date and time snapshoot method. More...
 
VOID Take_Startup_Snapshoot ()
 Take system startup date and time snapshoot method. More...
 
U64 RND ()
 Debug method. More...
 

Private Attributes

TDate_Time object_Software_RTC_DateTime
 Virtual software RTC. More...
 
U64 u64_Startup_Snapshoot
 System startup data and time snapshoot. More...
 
U64 u64_Last_Runtime_Snapshoot
 Last runtime data and time snapshoot. More...
 
U64 u64_Actual_Runtime_Snapshoot
 Actual runtime data and time snapshoot. More...
 
BOOL bool_Vitrual_RTC_Sync_Request
 Virtual RTC synchronisation request. More...
 
BOOL bool_Software_RTC_Update_Locked
 Software RTC update locked. More...
 
BOOL bool_Initialisation_Error
 RTC initialisation error flag. More...
 
BOOL bool_Hardware_RTC_Data_Lost_Error
 Hardware RTC data lost error flag. More...
 
U32 u32_RTC_Data_Read_Ready_Error_Counter
 RTC data read ready error counter. More...
 

Detailed Description

STM32F429 RTC class.

Constructor & Destructor Documentation

◆ TRTC_STM32F429()

TRTC_STM32F429::TRTC_STM32F429 ( )

Class constructor method.


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

References bool_Hardware_RTC_Data_Lost_Error, bool_Initialisation_Error, bool_Software_RTC_Update_Locked, and bool_Vitrual_RTC_Sync_Request.

◆ ~TRTC_STM32F429()

TRTC_STM32F429::~TRTC_STM32F429 ( )

Class destructor method.


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

Member Function Documentation

◆ Done()

VOID TRTC_STM32F429::Done ( )

RTC finalisation method.


Note
None
Returns
None
Override
Not allowed
Attention
None

◆ Execute_1ms()

VOID TRTC_STM32F429::Execute_1ms ( )

RTC 1ms cyclic processing method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References bool_Software_RTC_Update_Locked, TDate_Time::Increment_ms(), and object_Software_RTC_DateTime.

Referenced by TApplication_Base::System_Task_Handler().

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

◆ Execute_Background()

VOID TRTC_STM32F429::Execute_Background ( )

RTC background cyclic processing method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References bool_Vitrual_RTC_Sync_Request, Sync_Virtual_RTC(), and Take_Runtime_Snapshoot().

Referenced by TApplication_Base::Run(), and TBootloader_Base::Run().

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

◆ Get_Actual_System_Runtime_Duration_in_ms()

U64 TRTC_STM32F429::Get_Actual_System_Runtime_Duration_in_ms ( )

Get actual system runtime duration time in miliseconds method.


Note
None
Returns
U64 - Actual system runtime duration time in miliseconds
Override
Not allowed
Attention
None

References TDate_Time::Get_As_CDT64(), Get_Hardware_RTC(), and u64_Startup_Snapshoot.

Referenced by Send_Information().

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

◆ Get_DateTime()

VOID TRTC_STM32F429::Get_DateTime ( TDate_Time::TDate_Time_Structure object_DateTime)

Get date time method.


Note
None
Parameters
[out]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References Get_Hardware_RTC(), and Get_Software_RTC().

Referenced by TEvent_Manager::Create(), TEvent_Manager::Create_Data_Event(), and TEvent_Manager::Create_Header_Event().

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

◆ Get_Hardware_RTC() [1/2]

BOOL TRTC_STM32F429::Get_Hardware_RTC ( TDate_Time object_DateTime)

Get Hardware RTC method.


Note
None
Parameters
[out]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References TDate_Time::Get_Data(), and Get_Hardware_RTC().

Here is the call graph for this function:

◆ Get_Hardware_RTC() [2/2]

BOOL TRTC_STM32F429::Get_Hardware_RTC ( TDate_Time::TDate_Time_Structure object_DateTime)

◆ Get_Last_System_Shootdown_Duration_in_ms()

U64 TRTC_STM32F429::Get_Last_System_Shootdown_Duration_in_ms ( )

Get last system shootdown duration time in miliseconds method.


Note
None
Returns
U64 - Last system shootdown duration time in miliseconds
Override
Not allowed
Attention
None

References TDate_Time::Get_As_CDT64(), u64_Last_Runtime_Snapshoot, and u64_Startup_Snapshoot.

Referenced by Get_Last_System_Shootdown_Duration_in_s(), and Send_Information().

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

◆ Get_Last_System_Shootdown_Duration_in_s()

U64 TRTC_STM32F429::Get_Last_System_Shootdown_Duration_in_s ( )

Get last system shootdown duration time in seconds method.


Note
None
Returns
U64 - Last system shootdown duration time in seconds
Override
Not allowed
Attention
None

References Get_Last_System_Shootdown_Duration_in_ms().

Here is the call graph for this function:

◆ Get_Software_RTC()

VOID TRTC_STM32F429::Get_Software_RTC ( TDate_Time::TDate_Time_Structure object_DateTime)

Get Software RTC method.


Note
None
Parameters
[out]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References bool_Software_RTC_Update_Locked, TDate_Time::Get(), and object_Software_RTC_DateTime.

Referenced by Get_DateTime(), and Send_Information().

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

◆ Increment_RTC_Data_Read_Ready_Error_Counter()

VOID TRTC_STM32F429::Increment_RTC_Data_Read_Ready_Error_Counter ( )
private

Increment hardware RTC read data ready error counter method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References u32_RTC_Data_Read_Ready_Error_Counter.

Referenced by Get_Hardware_RTC().

Here is the caller graph for this function:

◆ Init()

VOID TRTC_STM32F429::Init ( )

◆ Recall_Runtime_Snapshoot()

VOID TRTC_STM32F429::Recall_Runtime_Snapshoot ( )
private

Recall last runtime date and time snapshoot method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References bool_Hardware_RTC_Data_Lost_Error, and u64_Last_Runtime_Snapshoot.

Referenced by Init().

Here is the caller graph for this function:

◆ RND() [1/3]

U64 TRTC_STM32F429::RND ( )
private

Debug method.


Note
None
Returns
None
Override
Not allowed
Attention
None

◆ RND() [2/3]

U64 TRTC_STM32F429::RND ( TDate_Time::TDate_Time_Structure object_DateTime)

Method for calculating the amount of time elapsed since the beginning of time (01.01.0001)


Note
None
Returns
U64 - Elapsed time since the beginning of time in miliseconds
Override
Not allowed
Attention
None

References TDate_Time::TDate_Time_Structure::u16_Day, TDate_Time::TDate_Time_Structure::u16_Hour, TDate_Time::TDate_Time_Structure::u16_Milisecond, TDate_Time::TDate_Time_Structure::u16_Minute, TDate_Time::TDate_Time_Structure::u16_Month, TDate_Time::TDate_Time_Structure::u16_Second, and TDate_Time::TDate_Time_Structure::u16_Year.

◆ RND() [3/3]

U64 TRTC_STM32F429::RND ( U32  y,
U32  m,
U32  d 
)

Method for calculating the amount of time elapsed since the beginning of time (01.01.0001)


Note
None
Returns
U64 - Elapsed time since the beginning of time in miliseconds
Override
Not allowed
Attention
None

◆ Send_Information()

VOID TRTC_STM32F429::Send_Information ( TProtocol_Base object_Protocol)

Send information about RTC hardware driver over communication link protocol.


Note
This method sends information about RTC hardware driver over specified communication link protocol.
Parameters
[in]*object_Protocol- Pointer to the communication link protocol
Returns
None
Override
Not allowed
Attention
None

References bool_Hardware_RTC_Data_Lost_Error, bool_Initialisation_Error, Get_Actual_System_Runtime_Duration_in_ms(), Get_Hardware_RTC(), Get_Last_System_Shootdown_Duration_in_ms(), Get_Software_RTC(), TProtocol_Base::Transmit_BOOL_Value_As_Decimal(), TProtocol_Base::Transmit_DateTime_Structure_Value_As_String(), TProtocol_Base::Transmit_String(), TProtocol_Base::Transmit_U32_Value_As_Decimal(), TProtocol_Base::Transmit_U64_Value_As_Hex(), TDate_Time::TDate_Time_Structure::u16_Year, u32_RTC_Data_Read_Ready_Error_Counter, u64_Actual_Runtime_Snapshoot, u64_Last_Runtime_Snapshoot, and u64_Startup_Snapshoot.

Referenced by TCommand_RTC::Execute().

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

◆ Set_DateTime()

VOID TRTC_STM32F429::Set_DateTime ( TDate_Time::TDate_Time_Structure object_DateTime)

Set date time method.


Note
None
Parameters
[in]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References Set_Hardware_RTC(), and Set_Software_RTC().

Here is the call graph for this function:

◆ Set_Hardware_RTC()

VOID TRTC_STM32F429::Set_Hardware_RTC ( TDate_Time::TDate_Time_Structure object_DateTime)

Set Hardware RTC method.


Note
None
Parameters
[in]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References bool_Initialisation_Error, TDate_Time::TDate_Time_Structure::u16_Day, TDate_Time::TDate_Time_Structure::u16_Hour, TDate_Time::TDate_Time_Structure::u16_Minute, TDate_Time::TDate_Time_Structure::u16_Month, TDate_Time::TDate_Time_Structure::u16_Second, and TDate_Time::TDate_Time_Structure::u16_Year.

Referenced by Set_DateTime().

Here is the caller graph for this function:

◆ Set_Software_RTC()

VOID TRTC_STM32F429::Set_Software_RTC ( TDate_Time::TDate_Time_Structure object_DateTime)

Set Software RTC method.


Note
None
Parameters
[in]object_DateTime- object date struct
Returns
None
Override
Not allowed
Attention
None

References bool_Software_RTC_Update_Locked, object_Software_RTC_DateTime, and TDate_Time::Set().

Referenced by Set_DateTime().

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

◆ Sync_Virtual_RTC()

VOID TRTC_STM32F429::Sync_Virtual_RTC ( )

Synchronise virtual RTC method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References bool_Software_RTC_Update_Locked, Get_Hardware_RTC(), object_Software_RTC_DateTime, and TDate_Time::Set().

Referenced by Execute_Background(), and Init().

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

◆ Take_Runtime_Snapshoot()

VOID TRTC_STM32F429::Take_Runtime_Snapshoot ( )
private

Take runtime date ant time snapshoot method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References TDate_Time::Get_Compressed_As_U64(), Get_Hardware_RTC(), TDate_Time::TDate_Time_Structure::u16_Year, and u64_Actual_Runtime_Snapshoot.

Referenced by Execute_Background().

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

◆ Take_Startup_Snapshoot()

VOID TRTC_STM32F429::Take_Startup_Snapshoot ( )
private

Take system startup date and time snapshoot method.


Note
None
Returns
None
Override
Not allowed
Attention
None

References bool_Hardware_RTC_Data_Lost_Error, TDate_Time::Get_Compressed_As_U64(), Get_Hardware_RTC(), TDate_Time::TDate_Time_Structure::u16_Year, and u64_Startup_Snapshoot.

Referenced by Init().

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

Member Data Documentation

◆ bool_Hardware_RTC_Data_Lost_Error

BOOL TRTC_STM32F429::bool_Hardware_RTC_Data_Lost_Error
private

Hardware RTC data lost error flag.

Referenced by Init(), Recall_Runtime_Snapshoot(), Send_Information(), Take_Startup_Snapshoot(), and TRTC_STM32F429().

◆ bool_Initialisation_Error

BOOL TRTC_STM32F429::bool_Initialisation_Error
private

RTC initialisation error flag.

Referenced by Get_Hardware_RTC(), Init(), Send_Information(), Set_Hardware_RTC(), and TRTC_STM32F429().

◆ bool_Software_RTC_Update_Locked

BOOL TRTC_STM32F429::bool_Software_RTC_Update_Locked
private

◆ bool_Vitrual_RTC_Sync_Request

BOOL TRTC_STM32F429::bool_Vitrual_RTC_Sync_Request
private

Virtual RTC synchronisation request.

Referenced by Execute_Background(), Init(), and TRTC_STM32F429().

◆ object_Software_RTC_DateTime

TDate_Time TRTC_STM32F429::object_Software_RTC_DateTime
private

Virtual software RTC.

Referenced by Execute_1ms(), Get_Software_RTC(), Set_Software_RTC(), and Sync_Virtual_RTC().

◆ u32_RTC_Data_Read_Ready_Error_Counter

U32 TRTC_STM32F429::u32_RTC_Data_Read_Ready_Error_Counter
private

RTC data read ready error counter.

Referenced by Increment_RTC_Data_Read_Ready_Error_Counter(), Init(), and Send_Information().

◆ u64_Actual_Runtime_Snapshoot

U64 TRTC_STM32F429::u64_Actual_Runtime_Snapshoot
private

Actual runtime data and time snapshoot.

Referenced by Init(), Send_Information(), and Take_Runtime_Snapshoot().

◆ u64_Last_Runtime_Snapshoot

U64 TRTC_STM32F429::u64_Last_Runtime_Snapshoot
private

Last runtime data and time snapshoot.

Referenced by Get_Last_System_Shootdown_Duration_in_ms(), Init(), Recall_Runtime_Snapshoot(), and Send_Information().

◆ u64_Startup_Snapshoot

U64 TRTC_STM32F429::u64_Startup_Snapshoot
private

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