ConOpSys V2970
P004.07
ANVILEX control operating system
|
STM32F410CBU6 RTC class. More...
#include <RTC_STM32F410CBU6.h>
Public Member Functions | |
TRTC_STM32F410CBU6 () | |
Class constructor method. More... | |
~TRTC_STM32F410CBU6 () | |
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 (TDateTime::TDateTime_Structure *object_DateTime) |
VOID | Get_DateTime (TDateTime::TDateTime_Structure *object_DateTime) |
VOID | Set_Hardware_RTC (TDateTime::TDateTime_Structure *object_DateTime) |
BOOL | Get_Hardware_RTC (TDateTime::TDateTime_Structure *object_DateTime) |
BOOL | Get_Hardware_RTC (TDateTime *object_DateTime) |
VOID | Set_Software_RTC (TDateTime::TDateTime_Structure *object_DateTime) |
VOID | Get_Software_RTC (TDateTime::TDateTime_Structure *object_DateTime) |
U64 | Get_Last_System_Shootdown_Duration_in_ms () |
U64 | Get_Last_System_Shootdown_Duration_in_s () |
U64 | Get_Actual_System_Runtime_Duration_in_ms () |
U64 | RND (TDateTime::TDateTime_Structure *object_DateTime) |
U64 | RND (U32 y, U32 m, U32 d) |
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 | |
TDateTime | 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... | |
STM32F410CBU6 RTC class.
TRTC_STM32F410CBU6::TRTC_STM32F410CBU6 | ( | ) |
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_STM32F410CBU6::~TRTC_STM32F410CBU6 | ( | ) |
Class destructor method.
VOID TRTC_STM32F410CBU6::Done | ( | ) |
RTC finalisation method.
VOID TRTC_STM32F410CBU6::Execute_1ms | ( | ) |
RTC 1ms cyclic processing method.
References bool_Software_RTC_Update_Locked, and object_Software_RTC_DateTime.
VOID TRTC_STM32F410CBU6::Execute_Background | ( | ) |
RTC background cyclic processing method.
References bool_Vitrual_RTC_Sync_Request, Sync_Virtual_RTC(), and Take_Runtime_Snapshoot().
U64 TRTC_STM32F410CBU6::Get_Actual_System_Runtime_Duration_in_ms | ( | ) |
References Get_Hardware_RTC(), and u64_Startup_Snapshoot.
Referenced by Send_Information().
VOID TRTC_STM32F410CBU6::Get_DateTime | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
BOOL TRTC_STM32F410CBU6::Get_Hardware_RTC | ( | TDateTime * | object_DateTime | ) |
BOOL TRTC_STM32F410CBU6::Get_Hardware_RTC | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
References bool_Initialisation_Error, false, Increment_RTC_Data_Read_Ready_Error_Counter(), NULL, and true.
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_STM32F410CBU6::Get_Last_System_Shootdown_Duration_in_ms | ( | ) |
References u64_Last_Runtime_Snapshoot, and u64_Startup_Snapshoot.
Referenced by Get_Last_System_Shootdown_Duration_in_s(), and Send_Information().
U64 TRTC_STM32F410CBU6::Get_Last_System_Shootdown_Duration_in_s | ( | ) |
VOID TRTC_STM32F410CBU6::Get_Software_RTC | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
References bool_Software_RTC_Update_Locked, 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_STM32F410CBU6::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.
|
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_STM32F410CBU6::RND | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
VOID TRTC_STM32F410CBU6::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(), u32_RTC_Data_Read_Ready_Error_Counter, u64_Actual_Runtime_Snapshoot, u64_Last_Runtime_Snapshoot, and u64_Startup_Snapshoot.
VOID TRTC_STM32F410CBU6::Set_DateTime | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
VOID TRTC_STM32F410CBU6::Set_Hardware_RTC | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
References bool_Initialisation_Error.
Referenced by Set_DateTime().
VOID TRTC_STM32F410CBU6::Set_Software_RTC | ( | TDateTime::TDateTime_Structure * | object_DateTime | ) |
References bool_Software_RTC_Update_Locked, and object_Software_RTC_DateTime.
Referenced by Set_DateTime().
VOID TRTC_STM32F410CBU6::Sync_Virtual_RTC | ( | ) |
Synchronise virtual RTC method.
References bool_Software_RTC_Update_Locked, Get_Hardware_RTC(), and object_Software_RTC_DateTime.
Referenced by Execute_Background(), and Init().
|
private |
Take runtime date ant time snapshoot method.
References Get_Hardware_RTC(), 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, Get_Hardware_RTC(), 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_STM32F410CBU6().
|
private |
RTC initialisation error flag.
Referenced by Get_Hardware_RTC(), Init(), Send_Information(), Set_Hardware_RTC(), and TRTC_STM32F410CBU6().
|
private |
Software RTC update locked.
Referenced by Execute_1ms(), Get_Software_RTC(), Init(), Set_Software_RTC(), Sync_Virtual_RTC(), and TRTC_STM32F410CBU6().
|
private |
Virtual RTC synchronisation request.
Referenced by Execute_Background(), Init(), and TRTC_STM32F410CBU6().
|
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().