| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // Copyright (c) 2000-2019 Ericsson Telecom AB // |
| // // |
| // All rights reserved. This program and the accompanying materials // |
| // are made available under the terms of the Eclipse Public License v2.0 // |
| // which accompanies this distribution, and is available at // |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_CLL_StatCaptureUI_Functions |
| // |
| // Purpose: |
| // This module contains function definitions for StatCaptureUI |
| // |
| // Module Parameters: |
| // tsp_debug_EPTF_StatCaptureUI - *boolean* - if true, logging is enabled |
| // |
| // Current Owner: |
| // Zsolt Szalai (EZSOSZA) |
| // |
| // Last Review Date: |
| // 2008-02-15 |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////// |
| |
| module EPTF_CLL_StatCaptureUI_Functions { |
| |
| import from EPTF_CLL_Base_Functions all; |
| import from EPTF_CLL_StatCaptureUI_Definitions all; |
| import from EPTF_CLL_StatCapture_Functions all; |
| import from EPTF_CLL_StatCapture_Definitions all; |
| import from EPTF_CLL_UIHandlerVariableUI_Functions all; |
| import from EPTF_CLL_UIHandler_Definitions all; |
| import from EPTF_CLL_Logging_Definitions all; |
| import from EPTF_CLL_Logging_Functions all; |
| import from EPTF_CLL_LoggingUI_Definitions all; |
| import from EPTF_CLL_LoggingUIClient_Functions all; |
| |
| modulepar boolean tsp_debug_EPTF_StatCaptureUI := false; |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_StatCaptureUI_init_CT |
| // |
| // Purpose: |
| // Initialize the component |
| // |
| // Parameters: |
| // pl_selfName - *in* *charstring* - the name of the component |
| // pl_UIHandler - *in* *EPTF_UIHandler_CT* - The UIHandler component of the application |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| public function f_EPTF_StatCaptureUI_init_CT(in charstring pl_selfName, |
| in EPTF_UIHandler_CT pl_UIHandler, |
| in EPTF_LoggingUI_CT pl_loggingUi_compRef := null) |
| runs on EPTF_StatCaptureUI_CT { |
| |
| if(pl_loggingUi_compRef != null) { |
| f_EPTF_LoggingUIClient_init_CT(pl_selfName, pl_loggingUi_compRef, pl_UIHandler); |
| } else { |
| f_EPTF_Logging_init_CT(pl_selfName); |
| } |
| v_StatCaptureUI_loggingMaskId := f_EPTF_Logging_registerComponentMasks(tsp_EPTF_StatCaptureUI_loggingComponentMask, c_EPTF_StatCapture_loggingEventClasses, EPTF_Logging_CLL); |
| if(tsp_debug_EPTF_StatCaptureUI) { |
| f_EPTF_Logging_enableLocalMask(v_StatCaptureUI_loggingMaskId, c_EPTF_StatCapture_loggingClassIdx_Debug); |
| } else { |
| f_EPTF_Logging_disableLocalMask(v_StatCaptureUI_loggingMaskId, c_EPTF_StatCapture_loggingClassIdx_Debug); |
| } |
| |
| |
| if (not v_StatCaptureUI_initialized) { |
| f_EPTF_StatCapture_init(pl_selfName); |
| f_EPTF_UIHandler_VariableUI_init_CT(pl_selfName, pl_UIHandler); |
| v_StatCaptureUI_initialized := true; |
| f_EPTF_Base_registerCleanup(refers(f_EPTF_StatCaptureUI_cleanup_CT)); |
| f_EPTF_StatCaptureUI_debug("----CLL_StatCaptureUI INIT DONE----"); |
| } |
| } |
| |
| private function f_EPTF_StatCaptureUI_cleanup_CT() runs on EPTF_StatCaptureUI_CT{ |
| v_StatCaptureUI_initialized := false; |
| } |
| |
| group Logging { |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_StatCaptureUI_error |
| // |
| // Purpose: |
| // Function to log an error from StatCapture feature. |
| // |
| // Parameters: |
| // - pl_message - *in* *charstring* - the message to log |
| // |
| // Return Value: |
| // - |
| // |
| // Errors & assertions: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| private function f_EPTF_StatCaptureUI_error(in charstring pl_message) |
| runs on EPTF_StatCaptureUI_CT |
| { |
| f_EPTF_Logging_error(true, tsp_EPTF_StatCaptureUI_loggingComponentMask&": "&pl_message); |
| f_EPTF_Base_stopAll(); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_StatCaptureUI_warning |
| // |
| // Purpose: |
| // Function to log a warning from StatCapture feature. |
| // |
| // Parameters: |
| // - pl_message - *in* *charstring* - the message to log |
| // |
| // Return Value: |
| // - |
| // |
| // Errors & assertions: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| private function f_EPTF_StatCaptureUI_warning(in @lazy charstring pl_message) |
| runs on EPTF_StatCaptureUI_CT |
| { |
| f_EPTF_Logging_warningV2(pl_message, v_StatCaptureUI_loggingMaskId, {c_EPTF_StatCapture_loggingClassIdx_Warning}); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_StatCaptureUI_debug |
| // |
| // Purpose: |
| // Function to log a debug message from StatCapture feature. |
| // |
| // Parameters: |
| // - pl_message - *in* *charstring* - the message to log |
| // |
| // Return Value: |
| // - |
| // |
| // Errors & assertions: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| private function f_EPTF_StatCaptureUI_debug(in @lazy charstring pl_message) |
| runs on EPTF_StatCaptureUI_CT |
| { |
| f_EPTF_Logging_debugV2(pl_message, v_StatCaptureUI_loggingMaskId, {c_EPTF_StatCapture_loggingClassIdx_Debug}); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_StatCaptureUI_debugEnabled |
| // |
| // Purpose: |
| // Function to check if debug is enabled for StatCaptureUI |
| // |
| // Parameters: |
| // - |
| // |
| // Return Value: |
| // *boolean* - true if debug enalbed |
| // |
| // Errors & assertions: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| private function f_EPTF_StatCaptureUI_debugEnabled() |
| runs on EPTF_StatCaptureUI_CT |
| return boolean |
| { |
| return f_EPTF_Logging_isEnabled(v_StatCaptureUI_loggingMaskId, c_EPTF_StatCapture_loggingClassIdx_Debug); |
| } |
| } // group Logging |
| |
| |
| } |