|
ConOpSys V2970
P004.07
ANVILEX control operating system
|
ConOpSys terminal command manager class. More...
#include <Command_Manager.h>


Public Member Functions | |
| TCommand_Manager () | |
| Class constructor method. More... | |
| virtual | ~TCommand_Manager () |
| Class destructor method. More... | |
| virtual VOID | Init () |
| Command manager initialisation method. More... | |
| virtual VOID | Done () |
| Command manager finalisation method. More... | |
| virtual BOOL | Get_Index (U32 *u32_Storage_Index, TCommand_Base *object_Command) |
| Get command object index referenced by command object pointer. More... | |
| virtual BOOL | Get_Command_By_Storage_Index (U32 u32_Storage_Index, TCommand_Base **object_Command) |
| Get pointer to the command object referenced by command manager storage index. More... | |
| virtual BOOL | Is_Registered (TCommand_Base *object_Command) |
| Test for command registered in command manager. More... | |
| virtual BOOL | Register (TCommand_Base *object_Command) |
| Performs registration of the command in command manager. More... | |
| virtual BOOL | Unregister (TCommand_Base *object_Command) |
| Performs unregistration of the command in command manager. More... | |
| virtual BOOL | Execute (C8 *c8_Command_String, TProtocol_Base *object_Protocol) |
| Execute command method. More... | |
| virtual U32 | Get_Command_Count () |
| Get command count registered in command manager. More... | |
| virtual VOID | Get_Usage (U32 *u32_Command_Capacity, U32 *u32_Command_Count) |
| Get command manager storage utilisation. More... | |
| virtual VOID | Show_Boot_Information (TProtocol_Base *object_Protocol) |
| Send boot information message over given protocol. More... | |
| virtual U32 | Get_OS_Status () |
| This method return OS status. More... | |
| virtual BOOL | Start_Operation () |
| This method set module in operation mode. More... | |
Public Member Functions inherited from TCommand_Manager_Base | |
| TCommand_Manager_Base () | |
| Class constructor method. More... | |
| virtual | ~TCommand_Manager_Base () |
| Class destructor method. More... | |
Private Member Functions | |
| U32 | Get_Database_Size_In_Bytes () |
| Get command manager database size in bytes. More... | |
| U32 | Get_Database_Record_Count () |
| Get command manager database record count. More... | |
Private Attributes | |
| TCommand_Base * | object_Command_Storage [COMMAND_STORAGE_SIZE] |
| Static storage for command object pointers. More... | |
| TCommand_Base::TCommand_Descriptor * | struct_Command_Database |
| Pointer to the command database storage mapped directly to the section. More... | |
| U32 | u32_Command_Registration_Requests_Counter |
| Command registration requests counter. More... | |
| U32 | u32_Command_Successful_Registration_Counter |
| Successful command registration counter. More... | |
| U32 | u32_Command_Failed_Registration_Counter |
| Failed command registration counter. More... | |
| U32 | u32_Command_Double_Registration_Counter |
| Count of double registered commands. More... | |
| BOOL | bool_Command_Storage_Overflow |
| Command storage overflow status. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TCommand_Manager_Base | |
| TOS_Status_Structure | struct_OS_Status |
| Container for OS status. More... | |
ConOpSys terminal command manager class.
| TCommand_Manager::TCommand_Manager | ( | ) |
Class constructor method.
References bool_Command_Storage_Overflow, Command_Database_Start_Pointer, NULL, object_Command_Storage, struct_Command_Database, TCommand_Manager_Base::struct_OS_Status, u32_Command_Double_Registration_Counter, u32_Command_Failed_Registration_Counter, u32_Command_Registration_Requests_Counter, u32_Command_Successful_Registration_Counter, and TOS_Status_Structure::u32_Raw_Data.
|
virtual |
Class destructor method.
|
virtual |
Command manager finalisation method.
Reimplemented from TCommand_Manager_Base.
|
virtual |
Execute command method.
| [in] | *c8_Command_String | - Pointer to the command name string |
| [in] | *object_Protocol | - Pointer to the communication protocol object |
| false | - Command name is not equal and command not executed |
| true | - Command name is equal and command executed |
Reimplemented from TCommand_Manager_Base.
References TCommand_Base::Execute(), TCommand_Base::Is_Command_Name(), TProtocol_Base::Is_Terminal_Mode(), NULL, object_Command_Storage, and true.
Referenced by TProtocol_ANVILEX_Over_UART::Command_Execution_Request(), and TProtocol_ANVILEX_Over_UART_V2::Command_Execution_Request().


|
virtual |
Get pointer to the command object referenced by command manager storage index.
| [in] | u32_Storage_Index | - Command manager storage index |
| [out] | **object_Command | - Pointer to the command object |
| false | - Command object not found in command manager storage |
| true | - Command object found in command manager storage |
Reimplemented from TCommand_Manager_Base.
References NULL, and object_Command_Storage.
Referenced by TCommand_HELP::Execute().

|
virtual |
Get command count registered in command manager.
Reimplemented from TCommand_Manager_Base.
References u32_Command_Successful_Registration_Counter.
Referenced by Get_Usage().

|
private |
Get command manager database record count.
References Get_Database_Size_In_Bytes().
Referenced by Show_Boot_Information().


|
private |
Get command manager database size in bytes.
References Command_Database_End_Pointer, and Command_Database_Start_Pointer.
Referenced by Get_Database_Record_Count(), and Show_Boot_Information().

|
virtual |
Get command object index referenced by command object pointer.
| [out] | *u32_Storage_Index | - Command manager storage index |
| [in] | *object_Command | - Pointer to the command object |
| false | - Command object not found in command manager storage |
| true | - Command object found in command manager storage |
Reimplemented from TCommand_Manager_Base.
References object_Command_Storage.
Referenced by Is_Registered(), Register(), and Unregister().

|
virtual |
This method return OS status.
Reimplemented from TCommand_Manager_Base.
References TCommand_Manager_Base::struct_OS_Status, and TOS_Status_Structure::u32_Raw_Data.
Referenced by TSystem_LED_Base::Decode().

Get command manager storage utilisation.
| [out] | *u32_Command_Capacity | - Pointer to the command manager capacity variable |
| [out] | *u32_Command_Count | - Pointer to the command count variable |
Reimplemented from TCommand_Manager_Base.
References Get_Command_Count().
Referenced by TCommand_INFO::Execute().


|
virtual |
Command manager initialisation method.
Reimplemented from TCommand_Manager_Base.
References TOS_Status_Structure::Bits, object_Command_ANYBUS, object_Command_APPLICATION, object_Command_CAN, object_Command_COM0, object_Command_COM1, object_Command_COM2, object_Command_CONTACT, object_Command_ETHERNET, object_Command_EVENTS, object_Command_FLASH, object_Command_FLASH_FORMAT, object_Command_FPGA, object_Command_HEAP, object_Command_HELP, object_Command_INFO, object_Command_NVRAM, object_Command_NVRAM_FORMAT, object_Command_NVRAM_STATUS, object_Command_PARAMETERS, object_Command_PROTOCOL, object_Command_RESET, object_Command_RESTART, object_Command_RTC, object_Command_SCOPE, object_Command_SCOPE_ARM, object_Command_SCOPE_FORCE, object_Command_STACK, object_Command_TERMINAL, Register(), TCommand_Manager_Base::struct_OS_Status, and TOS_Status_Structure::u32_Init.
Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().


|
virtual |
Test for command registered in command manager.
| [in] | *object_Command | - Pointer to the command object |
| false | - Command object not registered in command manager storage |
| true | - Command object registered in command manager storage |
Reimplemented from TCommand_Manager_Base.
References Get_Index(), and NULL.
Referenced by Register().


|
virtual |
Performs registration of the command in command manager.
| [in] | *object_Command | - Pointer to the command object |
| false | - Command object registration successed |
| true | - Command object registration failed |
Reimplemented from TCommand_Manager_Base.
References bool_Command_Storage_Overflow, Get_Index(), Increment_Saturated(), Is_Registered(), NULL, object_Command_Storage, u32_Command_Double_Registration_Counter, u32_Command_Failed_Registration_Counter, u32_Command_Registration_Requests_Counter, and u32_Command_Successful_Registration_Counter.
Referenced by Init().


|
virtual |
Send boot information message over given protocol.
| [in] | *object_Protocol | - Pointer to the communication protocol object |
Reimplemented from TCommand_Manager_Base.
References Command_Database_End_Pointer, Command_Database_Start_Pointer, Get_Database_Record_Count(), Get_Database_Size_In_Bytes(), TProtocol_Base::Transmit_String(), TProtocol_Base::Transmit_String_Of_Char(), TProtocol_Base::Transmit_U32_Value_As_Decimal(), TProtocol_Base::Transmit_U32_Value_As_Hex(), u32_Command_Double_Registration_Counter, u32_Command_Failed_Registration_Counter, u32_Command_Registration_Requests_Counter, and u32_Command_Successful_Registration_Counter.
Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().


|
virtual |
This method set module in operation mode.
| false | - Module in error mode |
| true | - Module ready to operations |
Reimplemented from TCommand_Manager_Base.
References TOS_Status_Structure::Bits, TCommand_Manager_Base::struct_OS_Status, TOS_Status_Structure::u32_Alarm, TOS_Status_Structure::u32_Error, TOS_Status_Structure::u32_Init, and TOS_Status_Structure::u32_Ready.
Referenced by TApplication_Base::Init(), and TBootloader_Base::Init().

|
virtual |
Performs unregistration of the command in command manager.
| [in] | *object_Command | - Pointer to the command object |
| false | - Command object unregistration successed |
| true | - Command object unregistration failed |
Reimplemented from TCommand_Manager_Base.
References bool_Command_Storage_Overflow, Decrement_Saturated(), Get_Index(), NULL, object_Command_Storage, u32_Command_Double_Registration_Counter, and u32_Command_Successful_Registration_Counter.

|
private |
Command storage overflow status.
Referenced by Register(), TCommand_Manager(), and Unregister().
|
private |
Static storage for command object pointers.
Referenced by Execute(), Get_Command_By_Storage_Index(), Get_Index(), Register(), TCommand_Manager(), and Unregister().
|
private |
Pointer to the command database storage mapped directly to the section.
Referenced by TCommand_Manager().
|
private |
Count of double registered commands.
Referenced by Register(), Show_Boot_Information(), TCommand_Manager(), and Unregister().
|
private |
Failed command registration counter.
Referenced by Register(), Show_Boot_Information(), and TCommand_Manager().
|
private |
Command registration requests counter.
Referenced by Register(), Show_Boot_Information(), and TCommand_Manager().
|
private |
Successful command registration counter.
Referenced by Get_Command_Count(), Register(), Show_Boot_Information(), TCommand_Manager(), and Unregister().