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) |
Detailed Description
Function Documentation
kvlcCreateReader()
| KvlcStatus kvlcCreateReader | ( | KvlcHandle * | handle, |
| const char * | filename, | ||
| int | format | ||
| ) |
- C#
- static Kvlclib.Status CreateReader(out ReaderHandle hnd, String filename, FileFormat format);
Create a new reader for reading events from a log file.
- Parameters
-
[out] handle An open handle to a reader. [in] filename Input filename, a pointer to a NULLterminated array of chars.[in] format Input format, use FILE_FORMAT_xxx.
- Returns
- kvlcOK (zero) if success
- kvlcERR_xxx (negative) if failure
- Note
- No more than 128 reader handles can be open at the same time.
- See also
- kvlcDeleteReader()
kvlcDeleteReader()
| KvlcStatus kvlcDeleteReader | ( | KvlcHandle | handle | ) |
- C#
- static Kvlclib.Status DeleteReader(ReaderHandle hnd);
Delete a reader and close the input file.
- Parameters
-
[in] handle An open handle to a reader.
- Returns
- kvlcOK (zero) if success
- kvlcERR_xxx (negative) if failure
- See also
- kvlcCreateReader()
kvlcReadFirstEventAtOrAfter()
| KvlcStatus kvlcReadFirstEventAtOrAfter | ( | KvlcHandle | handle, |
| time_int64 | timestamp, | ||
| kvlcLogEventEx * | e | ||
| ) |
- C#
- static Kvlclib.Status ReadFirstEventAtOrAfter(ReaderHandle hnd, Int64 timestamp, out KvmLib.Kvmlib.Log logEvent);
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.
- Parameters
-
[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.
- Returns
- kvlcOK (zero) if an event was found
-
kvlcEOF if no event at or after
timestampexists in the file - kvlcERR_xxx (negative) if failure
- See also
- kvlcCreateReader(), kvlcReadNextEvent()
kvlcReadInfo()
| KvlcStatus kvlcReadInfo | ( | KvlcHandle | handle, |
| kvlcReaderInfo * | info, | ||
| unsigned int | maxEvents | ||
| ) |
- C#
- static Kvlclib.Status ReadInfo(ReaderHandle hnd, out ReaderInfo info, Int32 maxEvents = DEFAULT_SCAN_EVENT_COUNT);
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.
- Parameters
-
[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.
- Returns
- kvlcOK (zero) if success
- kvlcERR_INVALID_LOG_EVENT if the same channel is observed as both LIN and CAN/CAN FD
- kvlcERR_xxx (negative) if failure
- See also
- kvlcCreateReader()
kvlcReadNextEvent()
| KvlcStatus kvlcReadNextEvent | ( | KvlcHandle | handle, |
| kvlcLogEventEx * | e | ||
| ) |
- C#
- static Kvlclib.Status ReadNextEvent(ReaderHandle hnd, out KvmLib.Kvmlib.Log logEvent);
Read the next event from the input file.
- Parameters
-
[in] handle An open handle to a reader. [out] e Pointer to a kvlcLogEventEx buffer to receive the event.
- Returns
- kvlcOK (zero) if success
- kvlcEOF if the end of file has been reached
- kvlcERR_xxx (negative) if failure
- See also
- kvlcCreateReader(), kvlcReadInfo()