ConOpSys V2970
P004.07
ANVILEX control operating system
|
Application base class. More...
#include <Application_Base.h>
Public Member Functions | |
TApplication_Base () | |
Class constructor method. More... | |
~TApplication_Base () | |
Application destructor method. More... | |
VOID | Init () |
Application initialisation method. More... | |
VOID | Run () |
Application run method. More... | |
VOID | Done () |
Application finalisation method. More... | |
VOID | Trip () |
Application emergency trip method. More... | |
BOOL | Set_Application_Shutdown_Request () |
Set application shutdown request method. More... | |
BOOL | Is_Application_Shutdown_Request () |
Get application shutdown request method. More... | |
virtual VOID | Init_Application_Timers () |
User application timer initialisation method. More... | |
virtual VOID | Start_Application_Timers () |
User application timer start operation method. More... | |
virtual VOID | Stop_Application_Timers () |
User application timer stop operation method. More... | |
virtual VOID | Control_Task_Init () |
Control task initialization method. More... | |
virtual VOID | System_Task_Init () |
System task initialization method. More... | |
virtual VOID | Background_Task_Init () |
Background task initialization method. More... | |
virtual VOID | Control_Task_Execute () |
Control task executable method. More... | |
virtual VOID | System_Task_Execute () |
System task executable method. More... | |
virtual VOID | Background_Task_Execute () |
Background task executable method. More... | |
virtual VOID | Register_Commands ()=0 |
User command registration method. More... | |
virtual VOID | Register_Parameters ()=0 |
User command registration method. More... | |
virtual VOID | Map_Process_Data () |
Process data mapping method. More... | |
VOID | Process_Application_LEDs () |
User application LEDs processing method. More... | |
VOID | System_Task_Handler () |
Background task method. More... | |
VOID | Control_Task_Handler () |
Control task handler method. More... | |
F32 | Get_Background_Task_Maximal_Execution_Time_s () |
Get background task application maximal execution time in seconds. More... | |
F32 | Get_Background_Task_Actual_Execution_Time_s () |
Get background task actual execution time in seconds. More... | |
U64 | Get_Background_Task_Maximal_Execution_Time_U64 () |
Get background task maximal execution time in seconds. More... | |
U64 | Get_Background_Task_Actual_Execution_Time_U64 () |
Get background task actual execution time. More... | |
U64 | Get_Background_Task_Execution_Loops_Counter () |
Get background task execution loops counter. More... | |
F32 | Get_System_Task_Core_Maximal_Execution_Time_s () |
Get system task core maximal execution time in seconds. More... | |
F32 | Get_System_Task_Core_Actual_Execution_Time_s () |
Get system task core actual execution time in seconds. More... | |
F32 | Get_System_Task_Application_Maximal_Execution_Time_s () |
Get system task application maximal execution time in seconds. More... | |
F32 | Get_System_Task_Application_Actual_Execution_Time_s () |
Get system task application actual execution time in seconds. More... | |
U64 | Get_System_Task_Actual_Cycle_Time_U64 () |
Get system task actual cycle time. More... | |
U64 | Get_System_Task_Core_Maximal_Execution_Time_U64 () |
Get system task core maximal execution time. More... | |
U64 | Get_System_Task_Core_Actual_Execution_Time_U64 () |
Get system task core actual execution time. More... | |
U64 | Get_System_Task_Application_Maximal_Execution_Time_U64 () |
Get system task application maximal execution time. More... | |
U64 | Get_System_Task_Application_Actual_Execution_Time_U64 () |
Get system task application actual execution time. More... | |
U64 | Get_System_Task_Execution_Loops_Counter () |
Get system task execution loops counter. More... | |
F32 | Get_System_Task_Actual_Cycle_Time_s () |
Get system task actual cycle time in seconds. More... | |
U32 | Get_System_Task_Execution_Time_Violation_Counter () |
Get system task execution time violation counter method. More... | |
U64 | Get_System_Task_Execution_Time_Violation_Loop () |
Get system task execution time violation loop method. More... | |
F32 | Get_Control_Task_Maximal_Execution_Time_s () |
Get control task maximal execution time in seconds. More... | |
F32 | Get_Control_Task_Actual_Execution_Time_s () |
Get control task actual execution time in seconds. More... | |
U64 | Get_Control_Task_Maximal_Execution_Time_U64 () |
Get control task maximal execution time. More... | |
U64 | Get_Control_Task_Actual_Execution_Time_U64 () |
Get control task actual execution time. More... | |
U64 | Get_Control_Task_Execution_Loops_Counter () |
Get control task execution loops counter. More... | |
U64 | Get_Control_Task_Actual_Cycle_Time_U64 () |
Get control task actual cycle time. More... | |
F32 | Get_Control_Task_Actual_Cycle_Time_s () |
Get control task actual cycle time in seconds. More... | |
U32 | Get_Control_Task_Execution_Time_Violation_Counter () |
Get control task execution time violation counter method. More... | |
U64 | Get_Control_Task_Execution_Time_Violation_Loop () |
Get control task execution time violation loop method. More... | |
Protected Member Functions | |
virtual VOID | Connect_Function_Blocks ()=0 |
Connect function blocks method. More... | |
Protected Attributes | |
F32 | f32_System_Task_Sample_Time = (F32)0.0f |
Sample time of system task. More... | |
F32 | f32_Control_Task_Sample_Time = (F32)0.0f |
Sample time of control task. More... | |
Application base class.
Application base class must be used as parent class to create an any user application.
With this class, following functions can be done:
TApplication_Base::TApplication_Base | ( | ) |
Class constructor method.
TApplication_Base::~TApplication_Base | ( | ) |
Application destructor method.
|
virtual |
Background task executable method.
Referenced by Run().
|
virtual |
Background task initialization method.
Referenced by Init().
|
protectedpure virtual |
Connect function blocks method.
Referenced by Init().
|
virtual |
Control task executable method.
Referenced by Control_Task_Handler().
VOID TApplication_Base::Control_Task_Handler | ( | ) |
Control task handler method.
References bool_Control_Task_Execution_First_Loop, bool_Task_Enable, Control_Task_Execute(), TTIMER2_STM32F429::Get_Actual_Time_U64(), Increment_Saturated(), object_Delay_Timer, u32_Control_Task_Execution_Time_Violation_Counter, u64_Control_Task_Actual_Cycle_Time, u64_Control_Task_Actual_Execution_Time, u64_Control_Task_Execution_End_Timestamp, u64_Control_Task_Execution_Last_Timestamp, u64_Control_Task_Execution_Loops_Counter, u64_Control_Task_Execution_Start_Timestamp, u64_Control_Task_Execution_Time_Violation_Loop, and u64_Control_Task_Maximal_Execution_Time.
|
virtual |
Control task initialization method.
Referenced by Init().
VOID TApplication_Base::Done | ( | ) |
Application finalisation method.
F32 TApplication_Base::Get_Background_Task_Actual_Execution_Time_s | ( | ) |
Get background task actual execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_Background_Task_Actual_Execution_Time.
U64 TApplication_Base::Get_Background_Task_Actual_Execution_Time_U64 | ( | ) |
Get background task actual execution time.
References u64_Background_Task_Actual_Execution_Time.
U64 TApplication_Base::Get_Background_Task_Execution_Loops_Counter | ( | ) |
Get background task execution loops counter.
References u64_Background_Task_Execution_Loops_Counter.
F32 TApplication_Base::Get_Background_Task_Maximal_Execution_Time_s | ( | ) |
Get background task application maximal execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_Background_Task_Maximal_Execution_Time.
U64 TApplication_Base::Get_Background_Task_Maximal_Execution_Time_U64 | ( | ) |
Get background task maximal execution time in seconds.
References u64_Background_Task_Maximal_Execution_Time.
F32 TApplication_Base::Get_Control_Task_Actual_Cycle_Time_s | ( | ) |
Get control task actual cycle time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_Control_Task_Actual_Cycle_Time.
U64 TApplication_Base::Get_Control_Task_Actual_Cycle_Time_U64 | ( | ) |
Get control task actual cycle time.
References u64_Control_Task_Actual_Cycle_Time.
F32 TApplication_Base::Get_Control_Task_Actual_Execution_Time_s | ( | ) |
Get control task actual execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_Control_Task_Actual_Execution_Time.
U64 TApplication_Base::Get_Control_Task_Actual_Execution_Time_U64 | ( | ) |
Get control task actual execution time.
References u64_Control_Task_Actual_Execution_Time.
U64 TApplication_Base::Get_Control_Task_Execution_Loops_Counter | ( | ) |
Get control task execution loops counter.
References u64_Control_Task_Execution_Loops_Counter.
U32 TApplication_Base::Get_Control_Task_Execution_Time_Violation_Counter | ( | ) |
Get control task execution time violation counter method.
References u32_Control_Task_Execution_Time_Violation_Counter.
U64 TApplication_Base::Get_Control_Task_Execution_Time_Violation_Loop | ( | ) |
Get control task execution time violation loop method.
References u64_Control_Task_Execution_Time_Violation_Loop.
F32 TApplication_Base::Get_Control_Task_Maximal_Execution_Time_s | ( | ) |
Get control task maximal execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_Control_Task_Maximal_Execution_Time.
U64 TApplication_Base::Get_Control_Task_Maximal_Execution_Time_U64 | ( | ) |
Get control task maximal execution time.
References u64_Control_Task_Maximal_Execution_Time.
F32 TApplication_Base::Get_System_Task_Actual_Cycle_Time_s | ( | ) |
Get system task actual cycle time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_System_Task_Actual_Cycle_Time.
U64 TApplication_Base::Get_System_Task_Actual_Cycle_Time_U64 | ( | ) |
Get system task actual cycle time.
References u64_System_Task_Actual_Cycle_Time.
F32 TApplication_Base::Get_System_Task_Application_Actual_Execution_Time_s | ( | ) |
Get system task application actual execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_System_Task_Application_Actual_Execution_Time.
U64 TApplication_Base::Get_System_Task_Application_Actual_Execution_Time_U64 | ( | ) |
Get system task application actual execution time.
References u64_System_Task_Application_Actual_Execution_Time.
F32 TApplication_Base::Get_System_Task_Application_Maximal_Execution_Time_s | ( | ) |
Get system task application maximal execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_System_Task_Application_Maximal_Execution_Time.
U64 TApplication_Base::Get_System_Task_Application_Maximal_Execution_Time_U64 | ( | ) |
Get system task application maximal execution time.
References u64_System_Task_Application_Maximal_Execution_Time.
F32 TApplication_Base::Get_System_Task_Core_Actual_Execution_Time_s | ( | ) |
Get system task core actual execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_System_Task_Core_Actual_Execution_Time.
U64 TApplication_Base::Get_System_Task_Core_Actual_Execution_Time_U64 | ( | ) |
Get system task core actual execution time.
References u64_System_Task_Core_Actual_Execution_Time.
F32 TApplication_Base::Get_System_Task_Core_Maximal_Execution_Time_s | ( | ) |
Get system task core maximal execution time in seconds.
References TTimer_Base::Get_Resolution_s(), object_Delay_Timer, and u64_System_Task_Core_Maximal_Execution_Time.
U64 TApplication_Base::Get_System_Task_Core_Maximal_Execution_Time_U64 | ( | ) |
Get system task core maximal execution time.
References u64_System_Task_Core_Maximal_Execution_Time.
U64 TApplication_Base::Get_System_Task_Execution_Loops_Counter | ( | ) |
Get system task execution loops counter.
References u64_System_Task_Execution_Loops_Counter.
U32 TApplication_Base::Get_System_Task_Execution_Time_Violation_Counter | ( | ) |
Get system task execution time violation counter method.
References u32_System_Task_Execution_Time_Violation_Counter.
U64 TApplication_Base::Get_System_Task_Execution_Time_Violation_Loop | ( | ) |
Get system task execution time violation loop method.
References u64_System_Task_Execution_Time_Violation_Loop.
VOID TApplication_Base::Init | ( | ) |
Application initialisation method.
ANVILEX KM: ???
References TParameter_Manager::Assign_Media(), TParameter_Manager::Assign_Protocol(), TABCC_Base::Assign_SPI_Master(), TSPI_Memory_Base::Assign_SPI_Master(), Background_Task_Init(), TParameter_Manager::Clear_Quasivolatile_Parameter_Values(), TTimer_Base::Configure_Clock(), TTIMER2_STM32F429::Configure_Clock(), TWatchdog_Timer_Base::Configure_Clock(), TCommunication_Data_Link::Connect_Data_Link(), Connect_Function_Blocks(), Control_Task_Init(), TSystem_Interrupt_Manager::Enable_Interrupt(), TCPU_Base::enum_Power_On, TCPU_Base::enum_Undefined, TCPU_Base::enum_Unknown, TCPU_Base::enum_Watchdog, event_APPLICATION_READY_FOR_OPERATION, event_APPLICATION_RESET_SOURCE_POWER_ON, event_APPLICATION_RESET_SOURCE_UNDEFINED, event_APPLICATION_RESET_SOURCE_UNKNOWN, event_APPLICATION_RESET_SOURCE_WATCHDOG, FPGA_BASE, TCPU_STM32F429::Get_HCLK_Frequency(), TCPU_STM32F429::Get_IWDG_Frequency(), TCPU_STM32F429::Get_PCLK2_Frequency(), TCPU_STM32F429::Get_Reset_Source(), TFunction_Block_Manager::Init(), TCommand_Manager::Init(), TABCC_Base::Init(), TProtocol_CANopen_Slave_Over_CAN::Init(), TProtocol_IP_Over_ETHERNET::Init(), TProtocol_PLUG_Over_UART::Init(), TWatchdog_Timer_Base::Init(), TLED_P014_51_CB::Init(), TTarget_P014_51_CB::Init(), TParameter_Manager::Init(), TFM25V02::Init(), TSystem_Interrupt_Manager::Init(), TRTC_STM32F429::Init(), TSPI4_STM32F429::Init(), TSPI5_STM32F429::Init(), TSPI_Master_Base::Init(), Init_Application_Timers(), TSYSTICK_STM32F429::Interrupt_Enable(), TABCC_Base::Is_Initialised(), Map_Process_Data(), object_ABCC, object_Command_Manager, object_Delay_Timer, object_FM25V02, object_Function_Block_Manager, object_Parameter_Manager, object_Protocol_Over_CAN, object_Protocol_Over_COM0, object_Protocol_Over_ETHERNET, object_System_CPU, object_System_Interrupt_Manager, object_System_LED, object_System_RTC, object_System_SPI1, object_System_SPI2, object_System_SPI3, object_System_Terminal, object_System_Timer, object_System_Watchdog_Timer, object_Target, Register_Commands(), Register_Parameters(), TParameter_Manager::Restore_Nonvolatile_Parameter_Values(), TTarget_P014_51_CB::Send_Boot_Information(), TSYSTICK_STM32F429::Set_Interrupt_Frequency(), TWDT_STM32F429::Set_Period(), TCommand_Manager::Show_Boot_Information(), TParameter_Manager::Show_Boot_Information(), TProtocol_Base::Show_System_Ready_Message_Disable(), TProtocol_Base::Show_System_Ready_Message_Enable(), TProtocol_Base::Show_System_Welcome_Message_Disable(), TProtocol_Base::Show_System_Welcome_Message_Enable(), TFM25V02::Start(), TSPI4_STM32F429::Start(), TSYSTICK_STM32F429::Start(), TTIMER2_STM32F429::Start(), TWDT_STM32F429::Start(), TCommand_Manager::Start_Operation(), TParameter_Manager::Start_Operation(), System_Task_Init(), tcp_setup(), TProtocol_Base::Transmit_Boot_Welcome_Message(), TProtocol_Base::Transmit_String(), TProtocol_Base::Transmit_System_Ready_Message(), and TParameter_Manager::Verify_Database().
|
virtual |
User application timer initialisation method.
Referenced by Init().
BOOL TApplication_Base::Is_Application_Shutdown_Request | ( | ) |
Get application shutdown request method.
false | - Shutdown not requested |
true | - Shutdown requested |
References bool_Appication_Shutdown.
Referenced by Run().
|
virtual |
Process data mapping method.
Referenced by Init().
VOID TApplication_Base::Process_Application_LEDs | ( | ) |
User application LEDs processing method.
Referenced by Run().
|
pure virtual |
User command registration method.
Referenced by Init().
|
pure virtual |
User command registration method.
Referenced by Init().
VOID TApplication_Base::Run | ( | ) |
Application run method.
References TABCC_Base::Activate_Process_Data(), Background_Task_Execute(), TSystem_LED_Base::bool_Start_Procesing, bool_Task_Enable, TABCC_Base::Deactivate_Process_Data(), TSystem_Interrupt_Manager::Disable_Interrupt(), TABCC_Base::Execute(), TProtocol_CANopen_Slave_Over_CAN::Execute(), TParameter_Manager::Execute(), TRTC_STM32F429::Execute_Background(), TTIMER2_STM32F429::Get_Actual_Time_U64(), Increment_Saturated(), TSYSTICK_STM32F429::Interrupt_Disable(), Is_Application_Shutdown_Request(), object_ABCC, object_Delay_Timer, object_Parameter_Manager, object_Protocol_Over_CAN, object_System_Interrupt_Manager, object_System_LED, object_System_RTC, object_System_Timer, object_System_Watchdog_Timer, Process_Application_LEDs(), TWDT_STM32F429::Reset(), Start_Application_Timers(), TWDT_STM32F429::Stop(), Stop_Application_Timers(), u64_Background_Task_Actual_Execution_Time, u64_Background_Task_Execution_End_Timestamp, u64_Background_Task_Execution_Loops_Counter, u64_Background_Task_Execution_Start_Timestamp, and u64_Background_Task_Maximal_Execution_Time.
BOOL TApplication_Base::Set_Application_Shutdown_Request | ( | ) |
Set application shutdown request method.
false | - Application shutdown not requested |
true | - Application shutdown requested |
References bool_Appication_Shutdown.
|
virtual |
User application timer start operation method.
Referenced by Run().
|
virtual |
User application timer stop operation method.
Referenced by Run().
|
virtual |
System task executable method.
Referenced by System_Task_Handler().
VOID TApplication_Base::System_Task_Handler | ( | ) |
Background task method.
Control task method
Realtime task method
System task handler method
References bool_System_Task_Execution_First_Loop, bool_Task_Enable, TProtocol_CANopen_Slave_Over_CAN::Execute_1ms(), TSystem_LED_Base::Execute_1ms(), TRTC_STM32F429::Execute_1ms(), TABCC_Base::Execute_System_Timer(), TTIMER2_STM32F429::Get_Actual_Time_U64(), Increment_Saturated(), object_ABCC, object_Delay_Timer, object_Protocol_Over_CAN, object_System_LED, object_System_RTC, System_Task_Execute(), u64_System_Task_Actual_Cycle_Time, u64_System_Task_Application_Actual_Execution_Time, u64_System_Task_Application_Execution_End_Timestamp, u64_System_Task_Application_Maximal_Execution_Time, u64_System_Task_Core_Actual_Execution_Time, u64_System_Task_Core_Execution_End_Timestamp, u64_System_Task_Core_Maximal_Execution_Time, u64_System_Task_Execution_Last_Timestamp, u64_System_Task_Execution_Loops_Counter, and u64_System_Task_Execution_Start_Timestamp.
|
virtual |
System task initialization method.
Referenced by Init().
VOID TApplication_Base::Trip | ( | ) |
Application emergency trip method.
Application shutdown request flag.
Referenced by Is_Application_Shutdown_Request(), and Set_Application_Shutdown_Request().
Control task Execution first loop flag.
Referenced by Control_Task_Handler().
System task Execution first loop flag.
Referenced by System_Task_Handler().
Enablr application task execution flag.
Referenced by Control_Task_Handler(), Run(), and System_Task_Handler().
Sample time of control task.
Sample time of system task.
Control task execution time violation counter.
Referenced by Control_Task_Handler(), and Get_Control_Task_Execution_Time_Violation_Counter().
System task execution time violation counter.
Referenced by Get_System_Task_Execution_Time_Violation_Counter().
Background task actual task execution time.
Referenced by Get_Background_Task_Actual_Execution_Time_s(), Get_Background_Task_Actual_Execution_Time_U64(), and Run().
Background task application execution end timestamp.
Referenced by Run().
Background task execution loop counter.
Referenced by Get_Background_Task_Execution_Loops_Counter(), and Run().
Background task execution start time.
Referenced by Run().
Background task maximal task execution time.
Referenced by Get_Background_Task_Maximal_Execution_Time_s(), Get_Background_Task_Maximal_Execution_Time_U64(), and Run().
Control task actual execution cycle time.
Referenced by Control_Task_Handler(), Get_Control_Task_Actual_Cycle_Time_s(), and Get_Control_Task_Actual_Cycle_Time_U64().
Control task actual task execution time.
Referenced by Control_Task_Handler(), Get_Control_Task_Actual_Execution_Time_s(), and Get_Control_Task_Actual_Execution_Time_U64().
Control task execution end timestamp.
Referenced by Control_Task_Handler().
Control task execution end time.
Referenced by Control_Task_Handler().
Control task execution loop counter.
Referenced by Control_Task_Handler(), and Get_Control_Task_Execution_Loops_Counter().
Control task execution start time.
Referenced by Control_Task_Handler().
Control task execution time violation loop.
Referenced by Control_Task_Handler(), and Get_Control_Task_Execution_Time_Violation_Loop().
Control task maximal task execution time.
Referenced by Control_Task_Handler(), Get_Control_Task_Maximal_Execution_Time_s(), and Get_Control_Task_Maximal_Execution_Time_U64().
System task actual execution cycle time.
Referenced by Get_System_Task_Actual_Cycle_Time_s(), Get_System_Task_Actual_Cycle_Time_U64(), and System_Task_Handler().
System task actual task execution time.
Referenced by Get_System_Task_Application_Actual_Execution_Time_s(), Get_System_Task_Application_Actual_Execution_Time_U64(), and System_Task_Handler().
System task application execution end timestamp.
Referenced by System_Task_Handler().
System task maximal task execution time.
Referenced by Get_System_Task_Application_Maximal_Execution_Time_s(), Get_System_Task_Application_Maximal_Execution_Time_U64(), and System_Task_Handler().
System task core actual execution time.
Referenced by Get_System_Task_Core_Actual_Execution_Time_s(), Get_System_Task_Core_Actual_Execution_Time_U64(), and System_Task_Handler().
System task core actual execution end timestampt.
Referenced by System_Task_Handler().
System task maximal core task execution time.
Referenced by Get_System_Task_Core_Maximal_Execution_Time_s(), Get_System_Task_Core_Maximal_Execution_Time_U64(), and System_Task_Handler().
System task execution end time.
Referenced by System_Task_Handler().
System task execution loop counter.
Referenced by Get_System_Task_Execution_Loops_Counter(), and System_Task_Handler().
System task execution start time.
Referenced by System_Task_Handler().
System task execution time violation loop.
Referenced by Get_System_Task_Execution_Time_Violation_Loop().