![]() |
Functions | |
| KvlcStatus | kvlcCreateReader (KvlcHandle *handle, const char *filename, int format) |
| KvlcStatus | kvlcDeleteReader (KvlcHandle handle) |
| KvlcStatus | kvlcReadInfo (KvlcHandle handle, kvlcReaderInfo *info, unsigned int maxEvents) |
| KvlcStatus | kvlcReadNextEvent (KvlcHandle handle, kvlcLogEventEx *e) |
| KvlcStatus | kvlcReadFirstEventAtOrAfter (KvlcHandle handle, time_int64 timestamp, kvlcLogEventEx *e) |
| KvlcStatus kvlcCreateReader | ( | KvlcHandle * | handle, |
| const char * | filename, | ||
| int | format | ||
| ) |
Create a new reader for reading events from a log file.
| [out] | handle | An open handle to a reader. |
| [in] | filename | Input filename, a pointer to a NULL terminated array of chars. |
| [in] | format | Input format, use FILE_FORMAT_xxx. |
| KvlcStatus kvlcDeleteReader | ( | KvlcHandle | handle | ) |
Delete a reader and close the input file.
| [in] | handle | An open handle to a reader. |
| KvlcStatus kvlcReadFirstEventAtOrAfter | ( | KvlcHandle | handle, |
| time_int64 | timestamp, | ||
| kvlcLogEventEx * | e | ||
| ) |
Rewind the input file and return the first event whose timestamp (in nanoseconds) is greater than or equal to timestamp.
On success the reader is positioned immediately after the returned event, so subsequent kvlcReadNextEvent calls continue from that point.
| [in] | handle | An open handle to a reader. |
| [in] | timestamp | Relative timestamp in nanoseconds. |
| [out] | e | Pointer to a kvlcLogEventEx buffer to receive the event. |
timestamp exists in the file | KvlcStatus kvlcReadInfo | ( | KvlcHandle | handle, |
| kvlcReaderInfo * | info, | ||
| unsigned int | maxEvents | ||
| ) |
Read information about the open input file.
Up to maxEvents events are read from the file to populate kvlcReaderInfo::channelMask, kvlcReaderInfo::canChannelMask, kvlcReaderInfo::linChannelMask and kvlcReaderInfo::directionMask. The file position is reset to the beginning before the function returns.
| [in] | handle | An open handle to a reader. |
| [out] | info | Pointer to a kvlcReaderInfo struct to fill. |
| [in] | maxEvents | Maximum number of events to scan; use KVLC_DEFAULT_SCAN_EVENT_COUNT for the recommended default. |
| KvlcStatus kvlcReadNextEvent | ( | KvlcHandle | handle, |
| kvlcLogEventEx * | e | ||
| ) |
Read the next event from the input file.
| [in] | handle | An open handle to a reader. |
| [out] | e | Pointer to a kvlcLogEventEx buffer to receive the event. |