|
ConOpSys V2970
P004.07
ANVILEX control operating system
|
STM32F429 RTC class. More...
#include <RTC_STM32F429.h>

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... | |
STM32F429 RTC class.
| TRTC_STM32F429::TRTC_STM32F429 | ( | ) |
Class constructor method.
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 | ( | ) |
Class destructor method.
| VOID TRTC_STM32F429::Done | ( | ) |
RTC finalisation method.
| VOID TRTC_STM32F429::Execute_1ms | ( | ) |
RTC 1ms cyclic processing method.
References bool_Software_RTC_Update_Locked, TDate_Time::Increment_ms(), and object_Software_RTC_DateTime.
Referenced by TApplication_Base::System_Task_Handler().


| VOID TRTC_STM32F429::Execute_Background | ( | ) |
RTC background cyclic processing method.
References bool_Vitrual_RTC_Sync_Request, Sync_Virtual_RTC(), and Take_Runtime_Snapshoot().
Referenced by TApplication_Base::Run(), and TBootloader_Base::Run().


| U64 TRTC_STM32F429::Get_Actual_System_Runtime_Duration_in_ms | ( | ) |
Get actual system runtime duration time in miliseconds method.
References TDate_Time::Get_As_CDT64(), Get_Hardware_RTC(), and u64_Startup_Snapshoot.
Referenced by Send_Information().


| VOID TRTC_STM32F429::Get_DateTime | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Get date time method.
| [out] | object_DateTime | - object date struct |
References Get_Hardware_RTC(), and Get_Software_RTC().
Referenced by TEvent_Manager::Create(), TEvent_Manager::Create_Data_Event(), and TEvent_Manager::Create_Header_Event().


| BOOL TRTC_STM32F429::Get_Hardware_RTC | ( | TDate_Time * | object_DateTime | ) |
Get Hardware RTC method.
| [out] | object_DateTime | - object date struct |
References TDate_Time::Get_Data(), and Get_Hardware_RTC().

| BOOL TRTC_STM32F429::Get_Hardware_RTC | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Get Hardware RTC method.
| [out] | object_DateTime | - object date struct |
References bool_Initialisation_Error, false, Increment_RTC_Data_Read_Ready_Error_Counter(), NULL, true, 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.
Referenced by Get_Actual_System_Runtime_Duration_in_ms(), Get_DateTime(), Get_Hardware_RTC(), Send_Information(), Sync_Virtual_RTC(), Take_Runtime_Snapshoot(), and Take_Startup_Snapshoot().


| U64 TRTC_STM32F429::Get_Last_System_Shootdown_Duration_in_ms | ( | ) |
Get last system shootdown duration time in miliseconds method.
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().


| U64 TRTC_STM32F429::Get_Last_System_Shootdown_Duration_in_s | ( | ) |
Get last system shootdown duration time in seconds method.
References Get_Last_System_Shootdown_Duration_in_ms().

| VOID TRTC_STM32F429::Get_Software_RTC | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Get Software RTC method.
| [out] | object_DateTime | - object date struct |
References bool_Software_RTC_Update_Locked, TDate_Time::Get(), and object_Software_RTC_DateTime.
Referenced by Get_DateTime(), and Send_Information().


|
private |
Increment hardware RTC read data ready error counter method.
References u32_RTC_Data_Read_Ready_Error_Counter.
Referenced by Get_Hardware_RTC().

| VOID TRTC_STM32F429::Init | ( | ) |
RTC initialisation method.
References bool_Hardware_RTC_Data_Lost_Error, bool_Initialisation_Error, bool_Software_RTC_Update_Locked, bool_Vitrual_RTC_Sync_Request, Recall_Runtime_Snapshoot(), Sync_Virtual_RTC(), Take_Startup_Snapshoot(), u32_RTC_Data_Read_Ready_Error_Counter, u64_Actual_Runtime_Snapshoot, u64_Last_Runtime_Snapshoot, and u64_Startup_Snapshoot.
Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().


|
private |
Recall last runtime date and time snapshoot method.
References bool_Hardware_RTC_Data_Lost_Error, and u64_Last_Runtime_Snapshoot.
Referenced by Init().

|
private |
Debug method.
| 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)
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.
Method for calculating the amount of time elapsed since the beginning of time (01.01.0001)
| VOID TRTC_STM32F429::Send_Information | ( | TProtocol_Base * | object_Protocol | ) |
Send information about RTC hardware driver over communication link protocol.
| [in] | *object_Protocol | - Pointer to the communication link protocol |
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().


| VOID TRTC_STM32F429::Set_DateTime | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Set date time method.
| [in] | object_DateTime | - object date struct |
References Set_Hardware_RTC(), and Set_Software_RTC().

| VOID TRTC_STM32F429::Set_Hardware_RTC | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Set Hardware RTC method.
| [in] | object_DateTime | - object date struct |
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().

| VOID TRTC_STM32F429::Set_Software_RTC | ( | TDate_Time::TDate_Time_Structure * | object_DateTime | ) |
Set Software RTC method.
| [in] | object_DateTime | - object date struct |
References bool_Software_RTC_Update_Locked, object_Software_RTC_DateTime, and TDate_Time::Set().
Referenced by Set_DateTime().


| VOID TRTC_STM32F429::Sync_Virtual_RTC | ( | ) |
Synchronise virtual RTC method.
References bool_Software_RTC_Update_Locked, Get_Hardware_RTC(), object_Software_RTC_DateTime, and TDate_Time::Set().
Referenced by Execute_Background(), and Init().


|
private |
Take runtime date ant time snapshoot method.
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().


|
private |
Take system startup date and time snapshoot method.
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().


|
private |
Hardware RTC data lost error flag.
Referenced by Init(), Recall_Runtime_Snapshoot(), Send_Information(), Take_Startup_Snapshoot(), and TRTC_STM32F429().
|
private |
RTC initialisation error flag.
Referenced by Get_Hardware_RTC(), Init(), Send_Information(), Set_Hardware_RTC(), and TRTC_STM32F429().
|
private |
Software RTC update locked.
Referenced by Execute_1ms(), Get_Software_RTC(), Init(), Set_Software_RTC(), Sync_Virtual_RTC(), and TRTC_STM32F429().
|
private |
Virtual RTC synchronisation request.
Referenced by Execute_Background(), Init(), and TRTC_STM32F429().
|
private |
Virtual software RTC.
Referenced by Execute_1ms(), Get_Software_RTC(), Set_Software_RTC(), and Sync_Virtual_RTC().
|
private |
RTC data read ready error counter.
Referenced by Increment_RTC_Data_Read_Ready_Error_Counter(), Init(), and Send_Information().
|
private |
Actual runtime data and time snapshoot.
Referenced by Init(), Send_Information(), and Take_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().
|
private |
System startup data and time snapshoot.
Referenced by Get_Actual_System_Runtime_Duration_in_ms(), Get_Last_System_Shootdown_Duration_in_ms(), Init(), Send_Information(), and Take_Startup_Snapshoot().