Class LogChannelOptions
Defined in File LogApi.h
Class Documentation
-
class LogChannelOptions
This class contains options for a log operation channel.
Public Functions
-
LogChannelOptions()
Public Members
-
unsigned int maxLogFileSize
The maximum file size of the log file, in bytes. After writing a line to the log file, if this file size is exceeded, another log file is created (up to maxLogFileCount files). If maxLogFileCount is 0, logging is stopped when this file size is exceeded. If this parameter is set to 0, there is no limit to the file size of the log file. The default value of this option is 0.
-
unsigned int maxLogFileCount
The maximum number of log files to create. This value is ignored if maxLogFileSize is 0. If this value is set to 0, only one log file will be created. If this value is set to 1 or greater, each log file will have a four or more digit number appended to the end of the file name, starting at 0000 for a new log operation and increasing by 1 for each new file. The default value of this option is 0.
-
unsigned int samplingTimeMilliseconds
The time to collect log data, in milliseconds. If the maxLogFileSize is specified, the actual time to collect log data may be shorter. If 0 is specified, log data will be collected until the StopLog function is called or an error occurs. The default value of this option is 1000.
-
bool isRotateFile
If this value is set to TRUE, the log operation will start overwriting the oldest data when the file size and file count limits specified by maxLogFileSize and maxLogFileCount have been reached before the samplingTimeMilliseconds time has elapsed. The first file will be overwritten first, and then the next file, until all files have been overwritten, after which the first file will be overwritten again. When this value is set to TRUE, the newest log data is not guaranteed to be in the last numbered file, so each the cycle time of each log line must be checked carefully. This value has no effect if maxLogFileSize is 0. The default value of this option is 0.
-
bool stopLoggingOnBufferOverflow
If this value is set to TRUE, the log operation will stop when a BufferOverflow occurs and one or more cycles of the log data is lost. If this value is set to FALSE, the log operation will continue when space in the log buffer is freed as the buffer contents are written to file. The BufferOverflow state will automatically change to Running when this occurs. This value should be set to TRUE if a log file that is missing one or more cycles of log data is useless. The default value of this option is 0.
-
unsigned int samplingPeriodInCycles
The number of communication cycles to wait before obtaining each log data sample. If this value is set to 0 or 1, log data will be obtained every cycle. The default value of this option is 1.
-
unsigned int precision
The number of subdecimal digits to show in the log data for floating point data. The maximum value that can be specified is maxLogPrecision. The default value of this option is 9.
-
bool isDelimInLastCol
If set to TRUE, the delimiter will also be appended to the end of each line. If set to FALSE, the delimiter will not be appended to the end of each line. The default value of this option is 0.
-
char delimiter[constants::maxLogDelimiterSize]
This string will be inserted between data values in each line of the log output. If isDelimInLastCol is set to TRUE, this string will also be inserted after each line of the log output. The default delimiter is one tab character.
-
unsigned char triggerOnCondition
If set to TRUE, the log operation will not start immediately when the StartLog function is called. The log state will change to WaitingForTrigger, but no log data will be collected. When one of the trigger conditions defined by each module whose log data is collected is satisfied, the log state will change to Running and the log operation will start. For the CoreMotion module, the trigger condition is when the position command changes for one of the axes whose log data is being collected. If this parameter and the triggerOnEvent parameter are both set to TRUE, the log operation will start when any of the trigger conditions is satisfied. The default value of this option is 0.
-
unsigned char triggerOnEvent
If set to TRUE, the log operation will not start immediately when the StartLog function is called. The log state will change to WaitingForTrigger, but no log data will be collected. When the event with the event ID specified in triggerEventID is triggered, the log state will change to Running and the log operation will start. Events can be defined using the EventControl class. If this parameter and the triggerOnCondition parameter are both set to TRUE, the log operation will start when any of the trigger conditions is satisfied. The default value of this option is 0.
-
unsigned int triggerEventID
If triggerOnEvent is set to TRUE, this parameter specifies the event ID of the event that will start the log operation. If triggerOnEvent is set to FALSE, this parameter has no effect. The default value of this option is 0.
-
LogChannelOptions()