| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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_Transport_IPsecHandler_Logging_Functions |
| // |
| // Purpose: |
| // This module contains the implementation of IMS Logging feature functions. |
| // |
| // Module Parameters: |
| // - |
| // |
| // Module depends on: |
| // <EPTF_CLL_Transport_IPsecHandler_Logging_Definitions> |
| // <EPTF_CLL_Logging_Functions> |
| // <EPTF_CLL_Base_Functions> |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////////////////////////// |
| module EPTF_CLL_Transport_IPsecHandler_Logging_Functions { |
| import from EPTF_CLL_Transport_IPsecHandler_Logging_Definitions all; |
| import from EPTF_CLL_Logging_Functions all; |
| import from EPTF_CLL_Base_Functions all; |
| |
| friend module EPTF_CLL_Transport_IPsecHandler_Logging_Server_Functions; |
| friend module EPTF_CLL_Transport_IPsecHandler_Logging_Client_Functions; |
| |
| group InitFunctions { |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_init |
| // |
| // Purpose: |
| // Function initializes the EPTF_CLL_Transport_IPsecHandler_Logging_CT component. |
| // |
| // Parameters: |
| // pl_selfName - *in* *charstring* - The name of the component. |
| // pl_maskName - *in* *charstring* - The name of the logging mask. |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // Initialize the CLL Logging feature. |
| // Register logging component masks. |
| // Enable/disable masks according to tsp parameters. |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_CLL_Transport_IPsecHandler_Logging_init( |
| in charstring pl_selfName, |
| in charstring pl_maskName) |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT { |
| if(v_EPTF_CLL_Transport_IPsecHandler_Logging_initialized) { return; } |
| |
| f_EPTF_Logging_init_CT(pl_selfName); |
| f_EPTF_Base_registerCleanup(refers(f_EPTF_CLL_Transport_IPsecHandler_Logging_cleanup)); |
| |
| v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx := f_EPTF_Logging_registerComponentMasks(pl_maskName, cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingEventClasses); |
| v_EPTF_CLL_Transport_IPsecHandler_Logging_maskName := pl_maskName; |
| |
| f_EPTF_Logging_disableLocalMask(v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_debug); |
| f_EPTF_Logging_disableLocalMask(v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_debugUser); |
| f_EPTF_Logging_disableLocalMask(v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_debugDev); |
| |
| v_EPTF_CLL_Transport_IPsecHandler_Logging_initialized := true; |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_cleanup |
| // |
| // Purpose: |
| // Cleanup function for the EPTF_CLL_Transport_IPsecHandler_Logging_CT component. |
| // |
| // Parameters: |
| // - |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| private function f_EPTF_CLL_Transport_IPsecHandler_Logging_cleanup() |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT |
| { |
| if(not v_EPTF_CLL_Transport_IPsecHandler_Logging_initialized) { return; } |
| |
| v_EPTF_CLL_Transport_IPsecHandler_Logging_initialized := false; |
| } |
| } |
| |
| group LoggingFunctions |
| { |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_logging_error |
| // |
| // Purpose: |
| // Function to log error messages. |
| // |
| // Parameters: |
| // pl_msg - *charstring* - log message |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // Function calls 'f_EPTF_Base_stopAll' which will stop execution. Handle with care. |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_CLL_Transport_IPsecHandler_Logging_error( |
| in @lazy charstring pl_msg) |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT |
| { |
| f_EPTF_Logging_error(true, v_EPTF_CLL_Transport_IPsecHandler_Logging_maskName & ": " & pl_msg); |
| f_EPTF_Base_stopAll(); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_logging_warning |
| // |
| // Purpose: |
| // Function to log warning messages. |
| // |
| // Parameters: |
| // pl_msg - *charstring* - log message |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_CLL_Transport_IPsecHandler_Logging_warning( |
| in @lazy charstring pl_msg) |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT |
| { |
| f_EPTF_Logging_warningV2(pl_msg, v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, {cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_warning}); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_debug |
| // |
| // Purpose: |
| // Function to log simple debug messages. |
| // |
| // Parameters: |
| // pl_msg - *charstring* - log message |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // EPTF_DEBUG is required. |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_CLL_Transport_IPsecHandler_Logging_debug( |
| in @lazy charstring pl_msg) |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT |
| { |
| f_EPTF_Logging_debugV2(pl_msg, v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, {cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_debug}); |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Function: f_EPTF_CLL_Transport_IPsecHandler_Logging_debugDev |
| // |
| // Purpose: |
| // Function to log developer debug messages. |
| // |
| // Parameters: |
| // pl_msg - *charstring* - log message |
| // |
| // Return Value: |
| // - |
| // |
| // Errors: |
| // - |
| // |
| // Detailed Comments: |
| // EPTF_DEBUG is NOT required. |
| // |
| /////////////////////////////////////////////////////////// |
| friend function f_EPTF_CLL_Transport_IPsecHandler_Logging_debugDev( |
| in @lazy charstring pl_msg) |
| runs on EPTF_CLL_Transport_IPsecHandler_Logging_CT |
| { |
| f_EPTF_Logging_operationalLogV2(pl_msg, v_EPTF_CLL_Transport_IPsecHandler_Logging_maskIdx, {cg_EPTF_CLL_Transport_IPsecHandler_Logging_loggingClassIdx_debugDev}); |
| } |
| } |
| } |