Log Statuses
The current status of a log channel can be obtained with the GetLogStatus or GetDetailLogStatus function.
The GetLogStatus function returns statuses in the LogStatus struct.
The GetDetailLogStatus function returns statuses in the DetailLogStatus struct. This struct contains all of the statuses in the LogStatus struct and a few other statuses.
The following table lists the statuses in the LogStatus struct.
Status |
Description |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Whether the log channel has opened buffer memory for use in log collection. This status will be TRUE if buffer memory has been opened and FALSE otherwise. Buffer memory is opened when the SetLog function is called. The size of the buffer memory depends on the arguments to the SetLog function and how many times this function is called. The buffer memory is automatically closed (and this status will become FALSE) after log collection ends. After calling the StartLog function, log collection will end when the specified time elapses or the StopLog function is called. This status is equal to the buffer.opened status in DetailLogStatus. Also see Memory Usage. |
|||||||||||||||||||
The state of the log channel. The state is represented by the LogState enumerator. The corresponding state for each DetailLogState returned by DetailLogStatus is as follows.
|
|||||||||||||||||||
The total number of samples to be collected during the logging operation. Each sample is equivalent to one line in the log file. This status is equal to the buffer.samplesToCollect status in DetailLogStatus. |
|||||||||||||||||||
The number of samples that have been collected in the logging operation. This status is equal to the buffer.samplesCollected status in DetailLogStatus. |
|||||||||||||||||||
The number of samples written to the log file in the logging operation. When the logging operation finishes without any errors, this status is equal to samplesCollected. This status is equal to the samplesWritten status in DetailLogStatus. |
|||||||||||||||||||
The total amount of time to collect samples during the logging operation, in milliseconds. This status is equal to the buffer.millisecondsToCollect status in DetailLogStatus. |
|||||||||||||||||||
The amount of time that samples have been collected in the logging operation, in milliseconds. This status is equal to the buffer.millisecondsCollected status in DetailLogStatus. |
|||||||||||||||||||
The amount of time that samples have been written to the log file in the logging operation, in milliseconds. When the logging operation finishes without any errors, this status is equal to millisecondsCollected. This status is equal to the millisecondsWritten status in DetailLogStatus. |
The following table lists the statuses in the DetailLogStatus struct.
Status |
Description |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The state of the log channel. The state is represented by the DetailLogState enumerator. Information about each state is listed in the following table.
|
|||||||||||||||||||
Whether the log channel has opened buffer memory for use in log collection. This status will be TRUE if buffer memory has been opened and FALSE otherwise. Buffer memory is opened when the SetLog function is called. The size of the buffer memory depends on the arguments to the SetLog function and how many times this function is called. The buffer memory is automatically closed (and this status will become FALSE) after log collection ends. After calling the StartLog function, log collection will end when the specified time elapses or the StopLog function is called. Also see Memory Usage. |
|||||||||||||||||||
The total number of samples to be collected during the logging operation. Each sample is equivalent to one line in the log file. When the state is Idle, this status is 0. When the state is Finished, this status is equal to buffer.samplesCollected. In any other state, this status is calculated from the samplingTimeMilliseconds and samplingPeriodInCycles specified to the SetLogOption function and the Cycle Time. |
|||||||||||||||||||
The number of samples that have been collected in the logging operation. |
|||||||||||||||||||
The total amount of time to collect samples during the logging operation, in milliseconds. When the state is Idle, this status is 0. When the state is Finished, this status is equal to buffer.millisecondsCollected. In any other state, this status is equal to the samplingTimeMilliseconds specified to the SetLogOption function. |
|||||||||||||||||||
The amount of time that samples have been collected in the logging operation, in milliseconds. |
|||||||||||||||||||
The period of the interrupt (cyclic handler) that processes this log channel, in milliseconds. This interrupt period is used to convert between sample units and millisecond units. Also see Function Calls Affected by Interrupts. |
|||||||||||||||||||
The file number of the log file that is written by the log operation, starting at 0 for the first file. This status will be 0 unless the maxLogFileSize option is set to a nonzero value. If this option is set, this status will be N-1 while writing to the N-th file. If the maxLogFileCount is set to a nonzero value and the isRotateFile is set to TRUE, this status will loop back to 0 when overwriting the first file. |
|||||||||||||||||||
The total number of bytes in the strings written to the log file during the logging operation. |
|||||||||||||||||||
The number of samples written to the log file in the logging operation. When the logging operation finishes without any errors, this status is equal to buffer.samplesCollected. |
|||||||||||||||||||
The amount of time that samples have been written to the log file in the logging operation, in milliseconds. When the logging operation finishes without any errors, this status is equal to buffer.millisecondsCollected. |