[r817]: / branches / FeatureBranches / Debuglogging / SparkplugB / Function Blocks / CmpSparkplugLog / CmpSparkplugLog_1 / VerboseLevelOK / svnobj  Maximize  Restore  History

Download this file

20 lines (18 with data), 4.7 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
// Check verboselevel vs input
VerboseLevelOK := FALSE;
CASE GVL_sparkplug.VerboseLevel OF
    SparkplugVerboseType.NONE: // Always Exit
        LogError := ERROR.NO_ERROR;                  
        
    SparkplugVerboseType.ERR: // Only print Error class
        IF (udiLogClass= CmpLog.LogClass.LOG_ERROR) THEN
            VerboseLevelOK := TRUE;
        ELSE
            // Exit with FALSE
    SparkplugVerboseType.ERR_WRN: // Print Error and warning class
        IF ( udiLogClass = CmpLog.LogClass.LOG_ERROR) OR
           ( udiLogClass = CmpLog.LogClass.LOG_WARNING) THEN
    SparkplugVerboseType.ERR_WRN_INF_DBG : // Print Error, warning class and Info Class
           ( udiLogClass = CmpLog.LogClass.LOG_INFO) OR 
           ( udiLogClass = CmpLog.LogClass.LOG_DEBUG) THEN
ELSE
    // exit with FALSE