Functions
Log File Operations
kvmlib

## Functions
kvmStatus | kvmLogFileGetCount (kvmHandle h, uint32 *fileCount)
kvmStatus | kvmLogFileMount (kvmHandle h, uint32 fileIndx, uint32 *eventCount)
kvmStatus | kvmLogFileDismount (kvmHandle h)
kvmStatus | kvmLogFileGetStartTime (kvmHandle h, uint32 *startTime)
kvmStatus | kvmLogFileGetEndTime (kvmHandle h, uint32 *endTime)
kvmStatus | kvmLogFileGetCreatorSerial (kvmHandle h, uint32 *serialNumber)
kvmStatus | kvmLogFileReadEvent (kvmHandle h, kvmLogEventEx *e)
kvmStatus | kvmLogFileDeleteAll (kvmHandle h)

## Detailed Description

## Function Documentation

## ◆ kvmLogFileDeleteAll()

kvmStatus kvmLogFileDeleteAll | ( | kvmHandle | h | ) |

Delete all log files from a Memorator.

Parameters

  [in] | h | An open kvmHandle.

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

## ◆ kvmLogFileDismount()

kvmStatus kvmLogFileDismount | ( | kvmHandle | h | ) |

Dismount the log file opened with kvmLogFileMount(). The handle will stay valid.

Parameters

  [in] | h | An open kvmHandle.

## ◆ kvmLogFileGetCount()

kvmStatus kvmLogFileGetCount | ( | kvmHandle | h,
|  | uint32 * | fileCount
| ) |  |

Count the number of log files

Parameters

  [in] | h | An open kvmHandle.
  [out] | fileCount | The number of log files on disk.

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

## ◆ kvmLogFileGetCreatorSerial()

kvmStatus kvmLogFileGetCreatorSerial | ( | kvmHandle | h,
|  | uint32 * | serialNumber
| ) |  |

Get the serialnumber of the interface that created the log file.

Parameters

  [in] | h | An open kvmHandle.
  [out] | serialNumber | The serialnumber of the interface that created the log file.

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

## ◆ kvmLogFileGetEndTime()

kvmStatus kvmLogFileGetEndTime | ( | kvmHandle | h,
|  | uint32 * | endTime
| ) |  |

Get the time of the first event in the log file. The time is returned in standard unix time format (number of seconds since 1970-01-01T00:00:00+00:00).

Parameters

  [in] | h | An open kvmHandle.
  [out] | endTime | The time of the last event in the log file (UTC)

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

## ◆ kvmLogFileGetStartTime()

kvmStatus kvmLogFileGetStartTime | ( | kvmHandle | h,
|  | uint32 * | startTime
| ) |  |

Get the time of the first event in the log file. The time is returned in standard unix time format (number of seconds since 1970-01-01T00:00:00+00:00).

Parameters

  [in] | h | An open kvmHandle.
  [out] | startTime | The time of the first event in the log file (UTC)

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

## ◆ kvmLogFileMount()

kvmStatus kvmLogFileMount | ( | kvmHandle | h,
|  | uint32 | fileIndx,
|  | uint32 * | eventCount
| ) |  |

Mount the log file with the specified index. The index starts at 0. The approximate number of events in the log file is returned.

Parameters

  [in] | h | An open kvmHandle.
  [in] | fileIndx | Index of the log file to open.
  [out] | eventCount | The approximate number of events in the log file

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure

See also
  kvmLogFileDismount()

## ◆ kvmLogFileReadEvent()

kvmStatus kvmLogFileReadEvent | ( | kvmHandle | h,
|  | kvmLogEventEx * | e
| ) |  |

Read an event from a log file opened with kvmLogFileMount(). The next call to kvmLogFileReadEvent() will read the next event.

Parameters

  [in] | h | An open kvmHandle.
  [out] | e | Event from log file.

Returns
  kvmOK (zero) if success
  kvmERR_xxx (negative) if failure