kme files¶
createKme()¶
openKme()¶
Kme¶
-
class
canlib.kvmlib.
Kme
(handle)[source]¶ A kme file
A class representing a KME file. The main use is twofold:
Either we create a KME file using
createKme
and would like to write events usingKme.write_event
:with kvmlib.createKme('out/data.kme50') as kme: ... kme.write_event(my_logevent)
Or we read events from an existing KME file:
with kvmlib.openKme('in/data.kme50') as kme: event = kme.read_event() ... print(event)
Note that only KME files of type KME50 may currently be written to.
New in version 1.7.
-
estimate_events
[source]¶ Estimate how many events the KME file contains
- Returns:
int
: Approximate number of events in KME file.
New in version 1.7.
Deprecated since version 1.11.
-
event_count_estimation
()[source]¶ Returns an approximation of the number of events contained in the KME file.
- Returns:
int
: Approximate number of events in KME file.
New in version 1.11.
-
read_event
()[source]¶ Read logevent from KME file
- Returns:
memoLogEventEx
New in version 1.7.
-
kme_file_type()¶
-
canlib.kvmlib.
kme_file_type
(path)[source]¶ Scan KME file and report version
Open and read the file
path
and try to decode what version of KME it contains. Returns type as kvmFILE_xxx.Parameters: path ( str
) – The full filepath for the .KME file (e.g."data/mylog.kme"
).Returns: FileType
– The KME file typeNew in version 1.7.