kvamemolibxml.h File Reference

Converts XML settings into a binary configuration. More...

#include <windows.h>

Go to the source code of this file.

Data Structures

struct  tag_token
 Token used when parsing postfix expressions (deprecated): More...
 
struct  KvParseHandle
 Handle used when parsing postfix expressions (deprecated): More...
 

Macros

XML_ERROR_MESSAGE_LENGTH

Maximum length of the xml error message string.

#define XML_ERROR_MESSAGE_LENGTH   2048
 Maximum length of the xml error message string. More...
 

Typedefs

typedef struct tag_token Token
 Token used when parsing postfix expressions (deprecated): More...
 

Enumerations

KvaXmlStatus

Generally, a return code greater than or equal to zero means success. A value less than zero means failure.

enum  KvaXmlStatus {
  KvaXmlStatusOK = 0,
  KvaXmlStatusFail = -1,
  KvaXmlStatusERR_ATTR_NOT_FOUND = -3,
  KvaXmlStatusERR_ATTR_VALUE = -4,
  KvaXmlStatusERR_ELEM_NOT_FOUND = -5,
  KvaXmlStatusERR_VALUE_RANGE = -6,
  KvaXmlStatusERR_VALUE_UNIQUE = -7,
  KvaXmlStatusERR_VALUE_CONSECUTIVE = -8,
  KvaXmlStatusERR_EXPRESSION = -9,
  KvaXmlStatusERR_XML_PARSER = -10,
  KvaXmlStatusERR_DTD_VALIDATION = -11,
  KvaXmlStatusERR_SCRIPT_ERROR = -12,
  KvaXmlStatusERR_INTERNAL = -20
}
 
KvaXmlValidationStatus

Generally, a return code greater than or equal to zero means success. A value less than zero means failure.

enum  KvaXmlValidationStatus {
  KvaXmlValidationStatusOK = 0,
  KvaXmlValidationStatusFail = -1,
  KvaXmlValidationStatusERR_ABORT = -2,
  KvaXmlValidationStatusERR_SILENT_TRANSMIT = -3,
  KvaXmlValidationStatusERR_UNDEFINED_TRIGGER = -4,
  KvaXmlValidationStatusERR_MULTIPLE_EXT_TRIGGER = -5,
  KvaXmlValidationStatusERR_MULTIPLE_START_TRIGGER = -6,
  KvaXmlValidationStatusERR_DISK_FULL_STARTS_LOG = -7,
  KvaXmlValidationStatusERR_NUM_OUT_OF_RANGE = -8,
  KvaXmlValidationStatusERR_SCRIPT_NOT_FOUND = -9,
  KvaXmlValidationStatusERR_SCRIPT_TOO_LARGE = -10,
  KvaXmlValidationStatusERR_SCRIPT_TOO_MANY = -11,
  KvaXmlValidationStatusERR_SCRIPT_CONFLICT = -12,
  KvaXmlValidationStatusERR_ELEMENT_COUNT = -13,
  KvaXmlValidationStatusERR_PARSER = -14,
  KvaXmlValidationStatusERR_SCRIPT = -15,
  KvaXmlValidationStatusERR_EXPRESSION = -16,
  KvaXmlValidationStatusWARN_ABORT = -100,
  KvaXmlValidationStatusWARN_NO_ACTIVE_LOG = -101,
  KvaXmlValidationStatusWARN_DISK_FULL_AND_FIFO = -102,
  KvaXmlValidationStatusWARN_IGNORED_ELEMENT = -103,
  KvaXmlValidationStatusWARN_MULTIPLE_EXT_TRIGGER = -104
}
 

Functions

KvaXmlStatus kvaXmlInitialize (void)
 
KvaXmlStatus kvaXmlGetLastError (char *buf, unsigned int len, KvaXmlStatus *err)
 
KvaXmlStatus kvaXmlToBuffer (const char *xmlbuf, unsigned int xmllen, char *outbuf, unsigned int *outlen, long *version)
 
KvaXmlStatus kvaXmlToFile (const char *infile, const char *outfile)
 
KvaXmlStatus kvaFileToXml (const char *parfile, const char *xmlfile)
 
KvaXmlStatus kvaXmlDebugOutput (int on)
 
KvaXmlStatus kvaBufferToXml (const char *inbuf, unsigned int inlen, char *xmlbuf, unsigned int *xmllen, long *version, const char *scriptpath)
 
KvaXmlStatus kvaXmlValidate (const char *xmlbuf, unsigned int xmllen)
 
KvaXmlStatus kvaXmlGetValidationStatusCount (int *countErr, int *countWarn)
 
KvaXmlStatus kvaXmlGetValidationError (KvaXmlValidationStatus *status, char *buf, unsigned int len)
 
KvaXmlStatus kvaXmlGetValidationWarning (KvaXmlValidationStatus *status, char *buf, unsigned int len)
 
KvaXmlStatus kvaXmlGetErrorText (KvaXmlStatus status, char *buf, unsigned int len)
 
KvaXmlStatus kvaXmlGetValidationText (KvaXmlValidationStatus status, char *buf, unsigned int len)
 
unsigned short kvaXmlGetVersion (void)
 
KvParseHandlekvaToolsParseCreate (void)
 
void kvaToolsParseDestroy (KvParseHandle *h)
 
void kvaToolsExprGetErrorString (int errCode, char *s, size_t bufsiz)
 
int kvaToolsParseExpr (KvParseHandle *h, char *expr, Token **t)
 
int kvaToolsFreeExpr (KvParseHandle *h, Token *t)
 
int kvaToolsDumpExpr (KvParseHandle *h, Token *t)
 
int kvaToolsExprHasErrors (KvParseHandle *h, Token *t)
 
int kvaToolsExprGetError (KvParseHandle *h, Token *t, int *errCode, int *pos)
 

Detailed Description

Converts XML settings into a binary configuration.

The kvaMemoLibXML is a library for converting XML logger settings into a binary param.lif for Kvaser Memorator 2nd Generation devices.

Macro Definition Documentation

◆ XML_ERROR_MESSAGE_LENGTH

#define XML_ERROR_MESSAGE_LENGTH   2048

Maximum length of the xml error message string.

Typedef Documentation

◆ Token

typedef struct tag_token Token

Token used when parsing postfix expressions (deprecated):

Enumeration Type Documentation

◆ KvaXmlStatus

Enumerator
KvaXmlStatusOK 

OK.

KvaXmlStatusFail 

Generic error.

KvaXmlStatusERR_ATTR_NOT_FOUND 

Failed to find an attribute in a node.

KvaXmlStatusERR_ATTR_VALUE 

The attribute value is not correct, e.g. whitespace after a number.

KvaXmlStatusERR_ELEM_NOT_FOUND 

Could not find a required element.

KvaXmlStatusERR_VALUE_RANGE 

The value is outside the allowed range.

KvaXmlStatusERR_VALUE_UNIQUE 

The value is not unique; usually idx attributes.

KvaXmlStatusERR_VALUE_CONSECUTIVE 

The values are not consecutive; usually idx attributes.

KvaXmlStatusERR_EXPRESSION 

The trigger expression could not be parsed.

KvaXmlStatusERR_XML_PARSER 

The XML settings contain syntax errors.

KvaXmlStatusERR_DTD_VALIDATION 

The XML settings do not follow the DTD.

KvaXmlStatusERR_SCRIPT_ERROR 

t-script related errors, e.g. file not found.

KvaXmlStatusERR_INTERNAL 

Internal errors, e.g. null pointers.

◆ KvaXmlValidationStatus

Enumerator
KvaXmlValidationStatusOK 

OK.

KvaXmlValidationStatusFail 

Generic error.

KvaXmlValidationStatusERR_ABORT 

Too many errors, validation aborted.

KvaXmlValidationStatusERR_SILENT_TRANSMIT 

Transmit lists used in silent mode.

KvaXmlValidationStatusERR_UNDEFINED_TRIGGER 

An undefined trigger is used in an expression.

KvaXmlValidationStatusERR_MULTIPLE_EXT_TRIGGER 

There are more than one external trigger defined.

KvaXmlValidationStatusERR_MULTIPLE_START_TRIGGER 

There are more than one start up trigger defined.

KvaXmlValidationStatusERR_DISK_FULL_STARTS_LOG 

A trigger on disk full starts the logging.

KvaXmlValidationStatusERR_NUM_OUT_OF_RANGE 

A numerical value is out of range.

KvaXmlValidationStatusERR_SCRIPT_NOT_FOUND 

A t-script file could not be opened.

KvaXmlValidationStatusERR_SCRIPT_TOO_LARGE 

A t-script is too large for the configuration.

KvaXmlValidationStatusERR_SCRIPT_TOO_MANY 

Too many active t-scripts for selected device.

KvaXmlValidationStatusERR_SCRIPT_CONFLICT 

More than one active script is set as 'primary'.

KvaXmlValidationStatusERR_ELEMENT_COUNT 

Too many or too few elements of this type.

KvaXmlValidationStatusERR_PARSER 

A general error found during parsing.

KvaXmlValidationStatusERR_SCRIPT 

A general t-script error found during parsing.

KvaXmlValidationStatusERR_EXPRESSION 

A general trigger expression found during parsing.

KvaXmlValidationStatusWARN_ABORT 

Too many warnings, validation aborted.

KvaXmlValidationStatusWARN_NO_ACTIVE_LOG 

No active logging detected.

KvaXmlValidationStatusWARN_DISK_FULL_AND_FIFO 

A trigger on disk full used with FIFO mode.

KvaXmlValidationStatusWARN_IGNORED_ELEMENT 

This XML element was ignored.

KvaXmlValidationStatusWARN_MULTIPLE_EXT_TRIGGER 

Using more than one external trigger requires firmware version 3.7 or better.