DebugSetLogParam (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

4.70 / 1.30.00


This function will set the parameters for the log to file service.

The configuration is persistent over resets until set again by the function or from the RTCU IDE in the configuration dialog.

 

The parameter set by DebugSetLogParam can be read by using DebugGetLogParam.

 

Parameters take effect after a device reset, using the boardReset function.

 

 

Input:

media : SINT (0/1, default 0)

The media where the log files are stored.

Please note that this option can only be set on NX32L architecture devices.

 

dbg_enable : BOOL

Enable/Disable logging of debug messages.

 

dbg_files : INT (1..999)

The maximum number of log files with debug messages which is saved.

 

con_enable : BOOL

Enable/Disable logging of network console output.

 

con_files : INT (1..999)

The maximum number of log files with network console output which is saved.

 

 

Returns:

1

- Success.

0

- Interface not available or not supported.

-1

- Illegal parameter.

 

Declaration:

FUNCTION DebugSetLogParam : INT;
VAR_INPUT
  media     : SINT := 0;

  dbg_enable : BOOL;
  dbg_files : INT;
  con_enable : BOOL;
  con_files : INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  gprscfg : gprsGetMonitorParm;
END_VAR;
 
// Check settings
gprscfg();
IF NOT gprscfg.Enabled OR gprscfg.MaxAttempt <> 3 OR gprscfg.AliveFreq <> 180 THEN
  // Set mobile network monitor parameters
  gprsSetMonitorParm(Enabled := TRUE, AliveFreq := 180);
  boardReset();
END_IF;
 
// Turn on power to the GSM module
gsmPower(power := ON);
gprsOpen();
 
BEGIN
  ...
END;
END_PROGRAM;