kvlclib.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 by KVASER AB, SWEDEN
3  * WWW: http://www.kvaser.com
4  *
5  * This software is furnished under a license and may be used and copied
6  * only in accordance with the terms of such license.
7  */
8 
45 #ifndef KVLCLIB_H
46 #define KVLCLIB_H
47 
48 #include <windows.h>
49 
50 #include "kvaDbLib.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif // __cplusplus
55 
56 
61 typedef int KvlcStatus;
62 typedef void *KvlcHandle;
63 typedef signed __int64 time_int64;
64 typedef unsigned __int64 time_uint64;
65 typedef signed __int64 int64;
66 typedef unsigned __int64 uint64;
78 #define kvlcOK ((KvlcStatus) 0)
79 #define kvlcFail ((KvlcStatus)-1)
80 #define kvlcERR_PARAM ((KvlcStatus)-2)
81 #define kvlcEOF ((KvlcStatus)-3)
82 #define kvlcERR_NOT_IMPLEMENTED ((KvlcStatus)-4)
83 #define kvlcERR_FILE_ERROR ((KvlcStatus)-5)
84 #define kvlcERR_FILE_EXISTS ((KvlcStatus)-6)
85 #define kvlcERR_INTERNAL_ERROR ((KvlcStatus)-7)
86 #define kvlcERR_NULL_POINTER ((KvlcStatus)-8)
87 #define kvlcERR_FILE_TOO_LARGE ((KvlcStatus)-10)
88 #define kvlcERR_TYPE_MISMATCH ((KvlcStatus)-11)
89 #define kvlcERR_NO_FREE_HANDLES ((KvlcStatus)-12)
90 #define kvlcERR_NO_INPUT_SELECTED ((KvlcStatus)-13)
91 #define kvlcERR_CONVERTING ((KvlcStatus)-14)
92 #define kvlcERR_BUFFER_SIZE ((KvlcStatus)-15)
93 
94 #define kvlcERR_INVALID_LOG_EVENT ((KvlcStatus)-30)
95 #define kvlcERR_NO_TIME_REFERENCE ((KvlcStatus)-31)
96 #define kvlcERR_TIME_DECREASING ((KvlcStatus)-32)
97 #define kvlcERR_MIXED_ENDIANNESS ((KvlcStatus)-33)
98 #define kvlcERR_RESULT_TOO_BIG ((KvlcStatus)-34)
99 #define kvlcERR_UNSUPPORTED_VERSION ((KvlcStatus)-35)
100 
101 
114 #define KVLC_FILE_FORMAT_KME24 1
115 #define KVLC_FILE_FORMAT_KME25 2
116 #define KVLC_FILE_FORMAT_VECTOR_ASC 3
117 #define KVLC_FILE_FORMAT_CSV 4
118 #define KVLC_FILE_FORMAT_PLAIN_ASC 5
119 #define KVLC_FILE_FORMAT_MEMO_LOG 6
120 #define KVLC_FILE_FORMAT_KME40 7
121 #define KVLC_FILE_FORMAT_VECTOR_BLF 8
122 #define KVLC_FILE_FORMAT_KME50 9
123 #define KVLC_FILE_FORMAT_KME60 10
124 
125 #define KVLC_FILE_FORMAT_CSV_SIGNAL 100
126 #define KVLC_FILE_FORMAT_MDF 101
127 #define KVLC_FILE_FORMAT_MATLAB 102
128 #define KVLC_FILE_FORMAT_J1587 103
129 #define KVLC_FILE_FORMAT_J1587_ALT 104
130 #define KVLC_FILE_FORMAT_FAMOS 105
131 #define KVLC_FILE_FORMAT_MDF_SIGNAL 106
132 #define KVLC_FILE_FORMAT_MDF_4X 107
133 #define KVLC_FILE_FORMAT_MDF_4X_SIGNAL 108
134 #define KVLC_FILE_FORMAT_VECTOR_BLF_FD 109
135 #define KVLC_FILE_FORMAT_DIADEM 110
136 #define KVLC_FILE_FORMAT_RPCIII 111
137 
138 #define KVLC_FILE_FORMAT_XCP 200
139 #define KVLC_FILE_FORMAT_FAMOS_XCP 201
140 
141 #define KVLC_FILE_FORMAT_DEBUG 1000
142 
160 #define KVLC_PROPERTY_START_OF_MEASUREMENT 1
161 
167 #define KVLC_PROPERTY_FIRST_TRIGGER 2
168 
174 #define KVLC_PROPERTY_USE_OFFSET 3
175 
180 #define KVLC_PROPERTY_OFFSET 4
181 
186 #define KVLC_PROPERTY_CHANNEL_MASK 5
187 
188 #define KVLC_PROPERTY_HLP_J1939 6
189 #define KVLC_PROPERTY_CALENDAR_TIME_STAMPS 7
190 #define KVLC_PROPERTY_WRITE_HEADER 8
191 #define KVLC_PROPERTY_SEPARATOR_CHAR 9
192 #define KVLC_PROPERTY_DECIMAL_CHAR 10
193 
194 #define KVLC_PROPERTY_ID_IN_HEX 11
195 #define KVLC_PROPERTY_DATA_IN_HEX 12
196 #define KVLC_PROPERTY_NUMBER_OF_TIME_DECIMALS 13
197 #define KVLC_PROPERTY_NAME_MANGLING 14
198 #define KVLC_PROPERTY_FILL_BLANKS 15
199 
200 #define KVLC_PROPERTY_SHOW_UNITS 16
201 #define KVLC_PROPERTY_ISO8601_DECIMALS 17
202 #define KVLC_PROPERTY_MERGE_LINES 18
203 #define KVLC_PROPERTY_RESAMPLE_COLUMN 19
204 #define KVLC_PROPERTY_VERSION 20
205 
206 #define KVLC_PROPERTY_SHOW_COUNTER 21
207 
212 #define KVLC_PROPERTY_CROP_PRETRIGGER 22
213 #define KVLC_PROPERTY_ENUM_VALUES 23
214 #define KVLC_PROPERTY_SIZE_LIMIT 24
215 
216 
221 #define KVLC_PROPERTY_TIME_LIMIT 25
222 
228 #define KVLC_PROPERTY_LIMIT_DATA_BYTES 26
229 #define KVLC_PROPERTY_CREATION_DATE 27
230 
231 
236 #define KVLC_PROPERTY_OVERWRITE 28
237 #define KVLC_PROPERTY_TIMEZONE 29
238 
239 
244 #define KVLC_PROPERTY_FULLY_QUALIFIED_NAMES 30
245 
246 #define KVLC_PROPERTY_NUMBER_OF_DATA_DECIMALS 31
247 
248 
260 #define KVLC_PROPERTY_COMPRESSION_LEVEL 32
261 
269 #define KVLC_PROPERTY_SAMPLE_AND_HOLD_TIMESTEP 33
270 
274 #define KVLC_PROPERTY_SIGNAL_BASED 1001
275 
279 #define KVLC_PROPERTY_SHOW_SIGNAL_SELECT 1002
280 
284 #define KVLC_PROPERTY_ATTACHMENTS 1003
285 
306 KvlcStatus WINAPI kvlcGetErrorText(KvlcStatus error, char *buffer, unsigned int buffer_size);
307 
308 
325 KvlcStatus WINAPI kvlcGetVersion(unsigned int *major, unsigned int *minor, unsigned int *build);
326 
346 KvlcStatus WINAPI kvlcCreateConverter(KvlcHandle *handle, const char *filename, int format);
347 
363 KvlcStatus WINAPI kvlcDeleteConverter(KvlcHandle handle);
364 
386 KvlcStatus WINAPI kvlcEventCount(KvlcHandle handle, unsigned int *count);
387 
404 KvlcStatus WINAPI kvlcEventCountEx(KvlcHandle handle, int64 *count);
405 
420 KvlcStatus WINAPI kvlcConvertEvent(KvlcHandle handle);
421 
422 
441 KvlcStatus WINAPI kvlcSetInputFile(KvlcHandle handle, const char *filename, int format);
442 
443 
464 KvlcStatus WINAPI kvlcNextInputFile(KvlcHandle handle, const char *filename);
465 
485 KvlcStatus WINAPI kvlcFeedSelectFormat(KvlcHandle handle, int format);
486 
507 KvlcStatus WINAPI kvlcFeedLogEvent(KvlcHandle handle, void *event);
508 
528 KvlcStatus WINAPI kvlcFeedNextFile(KvlcHandle handle);
529 
547 KvlcStatus WINAPI kvlcIsOutputFilenameNew(KvlcHandle handle, int *updated);
548 
549 
571 KvlcStatus WINAPI kvlcGetOutputFilename(KvlcHandle handle, char *filename, int len);
572 
598 KvlcStatus WINAPI kvlcGetWriterPropertyDefault(int format, unsigned int property, void *buf, unsigned int len);
599 
622 KvlcStatus WINAPI kvlcSetProperty(KvlcHandle handle, unsigned int property, void *buf, unsigned int len);
623 
624 
647 KvlcStatus WINAPI kvlcGetProperty(KvlcHandle handle, unsigned int property, void *buf, unsigned int len);
648 
649 
670 KvlcStatus WINAPI kvlcIsOverrunActive(KvlcHandle handle, int *overrun);
671 
687 KvlcStatus WINAPI kvlcResetOverrunActive(KvlcHandle handle);
688 
712 KvlcStatus WINAPI kvlcIsDataTruncated (KvlcHandle handle, int *truncated);
713 
729 KvlcStatus WINAPI kvlcResetDataTruncated (KvlcHandle handle);
730 
751 KvlcStatus WINAPI kvlcAttachFile(KvlcHandle handle, const char *filename);
752 
753 
769 KvlcStatus WINAPI kvlcGetFirstWriterFormat(int *format);
770 
771 
789 KvlcStatus WINAPI kvlcGetNextWriterFormat(int currentFormat, int *nextFormat);
790 
791 
807 KvlcStatus WINAPI kvlcGetFirstReaderFormat(int *format);
808 
809 
827 KvlcStatus WINAPI kvlcGetNextReaderFormat(int currentFormat, int *nextFormat);
828 
829 
848 KvlcStatus WINAPI kvlcGetReaderName(int format, char *str, unsigned int len);
849 
850 
869 KvlcStatus WINAPI kvlcGetReaderExtension(int format, char *str, unsigned int len);
870 
871 
890 KvlcStatus WINAPI kvlcGetReaderDescription(int format, char *str, unsigned int len);
891 
892 
918 KvlcStatus WINAPI kvlcGetReaderPropertyDefault(int format, unsigned int property, void *buf, unsigned int len);
919 
920 
939 KvlcStatus WINAPI kvlcGetWriterName(int format, char *str, unsigned int len);
940 
941 
960 KvlcStatus WINAPI kvlcGetWriterExtension(int format, char *str, unsigned int len);
961 
962 
981 KvlcStatus WINAPI kvlcGetWriterDescription(int format, char *str, unsigned int len);
982 
983 
1001 KvlcStatus WINAPI kvlcIsPropertySupported(int format, unsigned int property, int *supported);
1002 
1025 KvlcStatus WINAPI kvlcAddDatabaseFile(KvlcHandle handle, const char *filename, unsigned int channelMask);
1026 
1048 KvlcStatus WINAPI kvlcAddDatabase(KvlcHandle handle, KvaDbHnd dbHandle, unsigned int channelMask);
1049 
1067 KvlcStatus WINAPI kvlcIsDlcMismatch(KvlcHandle handle, int* mismatch);
1068 
1085 KvlcStatus WINAPI kvlcResetDlcMismatch(KvlcHandle handle);
1086 
1105 KvlcStatus WINAPI kvlcGetDlcMismatchList(KvlcHandle handle, unsigned int* MsgIds, unsigned int* MsgDlc, unsigned int* MsgOccurance, unsigned int* length);
1106 
1107 #ifdef __cplusplus
1108 };
1109 #endif
1110 
1111 #endif // KVLCLIB_H
KvlcStatus kvlcNextInputFile(KvlcHandle handle, const char *filename)
KvlcStatus kvlcResetDlcMismatch(KvlcHandle handle)
KvlcStatus kvlcGetReaderDescription(int format, char *str, unsigned int len)
unsigned __int64 uint64
Definition: kvlclib.h:66
KvlcStatus kvlcGetNextWriterFormat(int currentFormat, int *nextFormat)
KvlcStatus kvlcGetReaderName(int format, char *str, unsigned int len)
KvlcStatus kvlcGetNextReaderFormat(int currentFormat, int *nextFormat)
KvlcStatus kvlcIsOverrunActive(KvlcHandle handle, int *overrun)
KvlcStatus kvlcSetProperty(KvlcHandle handle, unsigned int property, void *buf, unsigned int len)
Definitions for the Database API.
KvlcStatus kvlcGetReaderExtension(int format, char *str, unsigned int len)
KvlcStatus kvlcIsOutputFilenameNew(KvlcHandle handle, int *updated)
KvlcStatus kvlcAddDatabaseFile(KvlcHandle handle, const char *filename, unsigned int channelMask)
KvlcStatus kvlcDeleteConverter(KvlcHandle handle)
KvlcStatus kvlcEventCount(KvlcHandle handle, unsigned int *count)
KvlcStatus kvlcEventCountEx(KvlcHandle handle, int64 *count)
KvlcStatus kvlcAddDatabase(KvlcHandle handle, KvaDbHnd dbHandle, unsigned int channelMask)
KvlcStatus kvlcGetWriterName(int format, char *str, unsigned int len)
void * KvlcHandle
Definition: kvlclib.h:62
KvlcStatus kvlcGetFirstWriterFormat(int *format)
KvlcStatus kvlcIsPropertySupported(int format, unsigned int property, int *supported)
KvlcStatus kvlcGetProperty(KvlcHandle handle, unsigned int property, void *buf, unsigned int len)
KvlcStatus kvlcFeedSelectFormat(KvlcHandle handle, int format)
KvlcStatus kvlcCreateConverter(KvlcHandle *handle, const char *filename, int format)
KvlcStatus kvlcGetWriterPropertyDefault(int format, unsigned int property, void *buf, unsigned int len)
KvlcStatus kvlcConvertEvent(KvlcHandle handle)
signed __int64 int64
Definition: kvlclib.h:65
KvlcStatus kvlcGetFirstReaderFormat(int *format)
KvlcStatus kvlcGetDlcMismatchList(KvlcHandle handle, unsigned int *MsgIds, unsigned int *MsgDlc, unsigned int *MsgOccurance, unsigned int *length)
KvlcStatus kvlcResetDataTruncated(KvlcHandle handle)
KvlcStatus kvlcResetOverrunActive(KvlcHandle handle)
KvlcStatus kvlcGetOutputFilename(KvlcHandle handle, char *filename, int len)
KvlcStatus kvlcGetWriterDescription(int format, char *str, unsigned int len)
int KvlcStatus
Definition: kvlclib.h:61
KvlcStatus kvlcFeedLogEvent(KvlcHandle handle, void *event)
void * KvaDbHnd
Database handle.
Definition: kvaDbLib.h:249
signed __int64 time_int64
Definition: kvlclib.h:63
KvlcStatus kvlcIsDlcMismatch(KvlcHandle handle, int *mismatch)
KvlcStatus kvlcIsDataTruncated(KvlcHandle handle, int *truncated)
unsigned __int64 time_uint64
Definition: kvlclib.h:64
KvlcStatus kvlcAttachFile(KvlcHandle handle, const char *filename)
KvlcStatus kvlcSetInputFile(KvlcHandle handle, const char *filename, int format)
KvlcStatus kvlcGetVersion(unsigned int *major, unsigned int *minor, unsigned int *build)
KvlcStatus kvlcGetWriterExtension(int format, char *str, unsigned int len)
KvlcStatus kvlcFeedNextFile(KvlcHandle handle)
KvlcStatus kvlcGetErrorText(KvlcStatus error, char *buffer, unsigned int buffer_size)
KvlcStatus kvlcGetReaderPropertyDefault(int format, unsigned int property, void *buf, unsigned int len)