Kvaser CANLIB: Welcome to Kvaser CANLIB!
Functions
CAN Database

Functions

KvaDbStatus kvaDbOpen (KvaDbHnd *dh)
 
KvaDbStatus kvaDbAddFile (KvaDbHnd dh, const char *filename)
 
KvaDbStatus kvaDbSetDummyFileName (KvaDbHnd dh, const char *filename)
 
KvaDbStatus kvaDbCreate (KvaDbHnd dh, const char *localName, const char *filename)
 
KvaDbStatus kvaDbClose (KvaDbHnd dh)
 
KvaDbStatus kvaDbWriteFile (KvaDbHnd dh, char *filename)
 
KvaDbStatus kvaDbReadFile (KvaDbHnd dh, char *filename)
 
KvaDbStatus kvaDbGetFlags (KvaDbHnd dh, unsigned int *flags)
 
KvaDbStatus kvaDbGetProtocol (KvaDbHnd dh, KvaDbProtocolType *prot)
 
KvaDbStatus kvaDbGetProtocolProperties (KvaDbProtocolType prot, KvaDbProtocolProperties *prop)
 
KvaDbStatus kvaDbGetFirstMsg (KvaDbHnd dh, KvaDbMessageHnd *mh)
 
KvaDbStatus kvaDbGetNextMsg (KvaDbHnd dh, KvaDbMessageHnd *mh)
 
KvaDbStatus kvaDbGetMsgById (KvaDbHnd dh, unsigned int id, KvaDbMessageHnd *mh)
 
KvaDbStatus kvaDbGetMsgByName (KvaDbHnd dh, const char *msg_name, KvaDbMessageHnd *mh)
 
KvaDbStatus kvaDbGetMsgName (KvaDbMessageHnd mh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetMsgQualifiedName (KvaDbMessageHnd mh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetMsgComment (KvaDbMessageHnd mh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetMsgId (KvaDbMessageHnd mh, unsigned int *id, unsigned int *flags)
 
KvaDbStatus kvaDbGetMsgDlc (KvaDbMessageHnd mh, int *dlc)
 
KvaDbStatus kvaDbGetMsgSendNode (KvaDbMessageHnd mh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbAddMsg (KvaDbHnd dh, KvaDbMessageHnd *mh)
 
KvaDbStatus kvaDbDeleteMsg (KvaDbHnd dh, KvaDbMessageHnd mh)
 
KvaDbStatus kvaDbSetFlags (KvaDbHnd dh, unsigned int flags)
 
KvaDbStatus kvaDbSetProtocol (KvaDbHnd dh, KvaDbProtocolType prot)
 
KvaDbStatus kvaDbSetMsgName (KvaDbMessageHnd mh, char *buf)
 
KvaDbStatus kvaDbSetMsgComment (KvaDbMessageHnd mh, char *buf)
 
KvaDbStatus kvaDbSetMsgId (KvaDbMessageHnd mh, unsigned int id, unsigned int flags)
 
KvaDbStatus kvaDbSetMsgDlc (KvaDbMessageHnd mh, int dlc)
 
KvaDbStatus kvaDbSetMsgSendNode (KvaDbMessageHnd mh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbGetMsgMux (KvaDbMessageHnd mh, KvaDbSignalHnd *shh)
 
KvaDbStatus kvaDbGetFirstSignal (KvaDbMessageHnd mh, KvaDbSignalHnd *sh)
 
KvaDbStatus kvaDbGetNextSignal (KvaDbMessageHnd mh, KvaDbSignalHnd *sh)
 
KvaDbStatus kvaDbGetSignalByName (KvaDbMessageHnd mh, char *buf, KvaDbSignalHnd *sh)
 
KvaDbStatus kvaDbSetSignalMode (KvaDbSignalHnd sh, int mux)
 
KvaDbStatus kvaDbGetSignalMode (KvaDbSignalHnd sh, int *mux)
 
KvaDbStatus kvaDbGetSignalValueFloat (KvaDbSignalHnd sh, double *f, void *data, size_t len)
 
KvaDbStatus kvaDbGetSignalValueInteger (KvaDbSignalHnd sh, int *f, void *data, size_t len)
 
KvaDbStatus kvaDbGetSignalValueEnum (KvaDbSignalHnd sh, char *buf, size_t buflen, void *data, size_t len)
 
KvaDbStatus kvaDbGetSignalValueLimits (KvaDbSignalHnd sh, double *minval, double *maxval)
 
KvaDbStatus kvaDbGetSignalValueScaling (KvaDbSignalHnd sh, double *factor, double *offset)
 
KvaDbStatus kvaDbGetSignalValueSize (KvaDbSignalHnd sh, int *startbit, int *length)
 
KvaDbStatus kvaDbGetSignalName (KvaDbSignalHnd sh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetSignalQualifiedName (KvaDbSignalHnd sh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetSignalComment (KvaDbSignalHnd sh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetSignalUnit (KvaDbSignalHnd sh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetSignalEncoding (KvaDbSignalHnd sh, KvaDbSignalEncoding *e)
 
KvaDbStatus kvaDbGetSignalRepresentationType (KvaDbSignalHnd sh, KvaDbSignalType *t)
 
KvaDbStatus kvaDbGetSignalPresentationType (KvaDbSignalHnd sh, KvaDbSignalType *t)
 
KvaDbStatus kvaDbAddSignal (KvaDbMessageHnd mh, KvaDbSignalHnd *sh)
 
KvaDbStatus kvaDbDeleteSignal (KvaDbMessageHnd mh, KvaDbSignalHnd sh)
 
KvaDbStatus kvaDbSetSignalValueLimits (KvaDbSignalHnd sh, double minval, double maxval)
 
KvaDbStatus kvaDbSetSignalValueScaling (KvaDbSignalHnd sh, double factor, double offset)
 
KvaDbStatus kvaDbSetSignalValueSize (KvaDbSignalHnd sh, int startbit, int length)
 
KvaDbStatus kvaDbSetSignalName (KvaDbSignalHnd sh, char *buf)
 
KvaDbStatus kvaDbSetSignalComment (KvaDbSignalHnd sh, char *buf)
 
KvaDbStatus kvaDbSetSignalUnit (KvaDbSignalHnd sh, char *buf)
 
KvaDbStatus kvaDbSetSignalEncoding (KvaDbSignalHnd sh, KvaDbSignalEncoding e)
 
KvaDbStatus kvaDbSetSignalRepresentationType (KvaDbSignalHnd sh, KvaDbSignalType t)
 
KvaDbStatus kvaDbGetFirstNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbGetNextNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbGetNodeByName (KvaDbHnd dh, const char *node_name, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbGetNodeAttributeIntByName (KvaDbNodeHnd nh, const char *attrName, int *val)
 
KvaDbStatus kvaDbAddNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbDeleteNode (KvaDbHnd dh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbSetNodeName (KvaDbNodeHnd nh, char *buf)
 
KvaDbStatus kvaDbGetNodeName (KvaDbNodeHnd nh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbSetNodeComment (KvaDbNodeHnd nh, char *buf)
 
KvaDbStatus kvaDbAddReceiveNodeToSignal (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbRemoveReceiveNodeFromSignal (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbSignalContainsReceiveNode (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbStoreSignalValuePhys (KvaDbSignalHnd sh, unsigned char *can_data, int dlc, double value)
 
KvaDbStatus kvaDbStoreSignalValueRaw (KvaDbSignalHnd sh, unsigned char *can_data, int dlc, int value)
 
KvaDbStatus kvaDbGetFirstAttributeDefinition (KvaDbHnd dh, KvaDbAttributeDefHnd *adh)
 
KvaDbStatus kvaDbGetAttributeDefinitionByName (KvaDbHnd dh, const char *attrName, KvaDbAttributeDefHnd *adh)
 
KvaDbStatus kvaDbGetNextAttributeDefinition (KvaDbAttributeDefHnd adh, KvaDbAttributeDefHnd *nadh)
 
KvaDbStatus kvaDbGetAttributeDefinitionType (KvaDbAttributeDefHnd adh, KvaDbAttributeType *at)
 
KvaDbStatus kvaDbGetAttributeDefinitionOwner (KvaDbAttributeDefHnd adh, KvaDbAttributeOwner *ao)
 
KvaDbStatus kvaDbGetAttributeDefinitionName (KvaDbAttributeDefHnd adh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetAttributeDefinitionInt (KvaDbAttributeDefHnd adh, int *def, int *min, int *max)
 
KvaDbStatus kvaDbGetAttributeDefinitionFloat (KvaDbAttributeDefHnd adh, float *def, float *min, float *max)
 
KvaDbStatus kvaDbGetAttributeDefinitionString (KvaDbAttributeDefHnd adh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbGetAttributeDefinitionEnumeration (KvaDbAttributeDefHnd adh, int *def)
 
KvaDbStatus kvaDbAddAttributeDefinition (KvaDbHnd dh, KvaDbAttributeDefHnd *adh)
 
KvaDbStatus kvaDbSetAttributeDefinitionName (KvaDbAttributeDefHnd adh, const char *adName)
 
KvaDbStatus kvaDbSetAttributeDefinitionType (KvaDbAttributeDefHnd adh, KvaDbAttributeType adType)
 
KvaDbStatus kvaDbSetAttributeDefinitionOwner (KvaDbAttributeDefHnd adh, KvaDbAttributeOwner adOwner)
 
KvaDbStatus kvaDbAddAttributeDefinitionEnum (KvaDbAttributeDefHnd adh, const char *eName, int eValue)
 
KvaDbStatus kvaDbSetAttributeDefinitionEnumDefault (KvaDbAttributeDefHnd adh, int dValue)
 
KvaDbStatus kvaDbSetAttributeDefinitionInt (KvaDbAttributeDefHnd adh, int def, int min, int max)
 
KvaDbStatus kvaDbSetAttributeDefinitionFloat (KvaDbAttributeDefHnd adh, float def, float min, float max)
 
KvaDbStatus kvaDbSetAttributeDefinitionString (KvaDbAttributeDefHnd adh, const char *buf)
 
KvaDbStatus kvaDbAddMsgAttribute (KvaDbMessageHnd mh, KvaDbAttributeDefHnd adh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbDeleteMsgAttribute (KvaDbMessageHnd mh, KvaDbAttributeHnd ah)
 
KvaDbStatus kvaDbAddSignalAttribute (KvaDbSignalHnd sh, KvaDbAttributeDefHnd adh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetFirstEnumValue (KvaDbSignalHnd sh, KvaDbEnumValueHnd *eh)
 
KvaDbStatus kvaDbGetNextEnumValue (KvaDbSignalHnd sh, KvaDbEnumValueHnd *eh)
 
KvaDbStatus kvaDbGetEnumValue (KvaDbEnumValueHnd eh, int *val, char *buf, size_t buflen)
 
KvaDbStatus kvaDbAddEnumValue (KvaDbSignalHnd sh, int val, const char *name)
 
KvaDbStatus kvaDbDeleteEnumValue (KvaDbSignalHnd sh, KvaDbEnumValueHnd eh)
 
KvaDbStatus kvaDbDeleteSignalAttribute (KvaDbSignalHnd sh, KvaDbAttributeHnd ah)
 
KvaDbStatus kvaDbAddNodeAttribute (KvaDbNodeHnd nh, KvaDbAttributeDefHnd adh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbDeleteNodeAttribute (KvaDbNodeHnd nh, KvaDbAttributeHnd ah)
 
KvaDbStatus kvaDbGetFirstMsgAttribute (KvaDbMessageHnd mh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetMsgAttributeByName (KvaDbMessageHnd mh, const char *attrName, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetFirstSignalAttribute (KvaDbSignalHnd sh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetSignalAttributeByName (KvaDbSignalHnd sh, const char *attrName, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetFirstNodeAttribute (KvaDbNodeHnd nh, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetNodeAttributeByName (KvaDbNodeHnd nh, const char *attrName, KvaDbAttributeHnd *ah)
 
KvaDbStatus kvaDbGetNextAttribute (KvaDbAttributeHnd ah, KvaDbAttributeHnd *nah)
 
KvaDbStatus kvaDbGetAttributeType (KvaDbAttributeHnd ah, KvaDbAttributeType *at)
 
KvaDbStatus kvaDbGetAttributeName (KvaDbAttributeHnd adh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbSetAttributeValueInt (KvaDbAttributeHnd ah, int val)
 
KvaDbStatus kvaDbGetAttributeValueInt (KvaDbAttributeHnd ah, int *val)
 
KvaDbStatus kvaDbSetAttributeValueFloat (KvaDbAttributeHnd ah, float val)
 
KvaDbStatus kvaDbGetAttributeValueFloat (KvaDbAttributeHnd ah, float *val)
 
KvaDbStatus kvaDbSetAttributeValueString (KvaDbAttributeHnd ah, const char *buf, int buflen)
 
KvaDbStatus kvaDbGetAttributeValueString (KvaDbAttributeHnd ah, char *buf, size_t buflen)
 
KvaDbStatus kvaDbSetAttributeValueEnumeration (KvaDbAttributeHnd ah, int val)
 
KvaDbStatus kvaDbGetAttributeValueEnumeration (KvaDbAttributeHnd ah, int *val)
 
KvaDbStatus kvaDbMsgDlcToBytes (KvaDbProtocolType prot, unsigned int dlc, unsigned int *numBytes)
 
KvaDbStatus kvaDbBytesToMsgDlc (KvaDbProtocolType prot, unsigned int numBytes, unsigned int *dlc)
 

Detailed Description

Function Documentation

◆ kvaDbOpen()

KvaDbStatus kvaDbOpen ( KvaDbHnd dh)

This function creates a new database handle.

Parameters
[out]dhA handle to a new database
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbClose()
Examples:
candb_sample.c.

◆ kvaDbAddFile()

KvaDbStatus kvaDbAddFile ( KvaDbHnd  dh,
const char *  filename 
)

This loads a database file into a handle created with kvaDbOpen().

Note
This function is deprecated and will be replaced by kvaDbCreate()
Parameters
[in]dhA handle database handle
[in]filenameA database file
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbCreate()

◆ kvaDbSetDummyFileName()

KvaDbStatus kvaDbSetDummyFileName ( KvaDbHnd  dh,
const char *  filename 
)

This function creates a new database in a handle created with kvaDbOpen(). It is used when there is no file to read data from.

Note
This function is deprecated and will be replaced by kvaDbCreate().
Parameters
[in]dhA database handle
[in]filenameThe the dummy filename to use for this database
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbCreate()

◆ kvaDbCreate()

KvaDbStatus kvaDbCreate ( KvaDbHnd  dh,
const char *  localName,
const char *  filename 
)

This function creates a new database in a handle created with kvaDbOpen(). There are three ways to call this function:

  • To load data from an existing database file, set localName to NULL and set filename to the database file.
  • To add an empty database, set localName to any name and set filename to NULL.
  • To load data from an existing database file and give it a new name, set localName to the new name and set filename to the database file.
Parameters
[in]dhA database handle
[in]localNameThe name of the database or NULL. The database name is used to create qualified names for messages and signals.
[in]filenameThe database file or NULL
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbOpen(), kvaDbGetMsgQualifiedName(), kvaDbGetSignalQualifiedName()
Examples:
candb_sample.c.

◆ kvaDbClose()

KvaDbStatus kvaDbClose ( KvaDbHnd  dh)

This function closes an open database handle.

Parameters
[in]dhA handle to a database
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbOpen()
Examples:
candb_sample.c.

◆ kvaDbWriteFile()

KvaDbStatus kvaDbWriteFile ( KvaDbHnd  dh,
char *  filename 
)

Write a database to file.

Parameters
[in]dhA handle to a database
[in]filenameThe name of the database file
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbReadFile()
Examples:
candb_sample.c.

◆ kvaDbReadFile()

KvaDbStatus kvaDbReadFile ( KvaDbHnd  dh,
char *  filename 
)

Load a database from file into a handle created with kvaDbOpen().

Parameters
[out]dhA handle to a database
[in]filenameThe name of the database file.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbCreate()
Examples:
candb_sample.c.

◆ kvaDbGetFlags()

KvaDbStatus kvaDbGetFlags ( KvaDbHnd  dh,
unsigned int *  flags 
)

Get the database flags.

Parameters
[in]dhA handle to a database
[out]flagsThe database flags, KVADB_DATABASE_xxx
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbReadFile()
Examples:
candb_sample.c.

◆ kvaDbGetProtocol()

KvaDbStatus kvaDbGetProtocol ( KvaDbHnd  dh,
KvaDbProtocolType prot 
)

Reads the protocol attribute value of a database

Parameters
[in]dhA handle to a database
[out]protA handle to protocol type, KvaDbProtocolType
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetProtocol(), kvaDbGetProtocolProperties

◆ kvaDbGetProtocolProperties()

KvaDbStatus kvaDbGetProtocolProperties ( KvaDbProtocolType  prot,
KvaDbProtocolProperties prop 
)

Returns properties of a given protocol, see KvaDbProtocolProperties

Parameters
[in]protProtocol type, KvaDbProtocolType
[out]propA handle to protocol properties, KvaDbProtocolProperties
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetProtocol()

◆ kvaDbGetFirstMsg()

KvaDbStatus kvaDbGetFirstMsg ( KvaDbHnd  dh,
KvaDbMessageHnd mh 
)

Get the first message in a database.

Parameters
[in]dhA handle to a database
[out]mhA handle to the first message
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextMsg()
Examples:
candb_sample.c.

◆ kvaDbGetNextMsg()

KvaDbStatus kvaDbGetNextMsg ( KvaDbHnd  dh,
KvaDbMessageHnd mh 
)

Get a handle to the next message in a database. Should be called after kvaDbGetFirstMsg().

Parameters
[in]dhA database handle
[out]mhA message handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstMsg()
Examples:
candb_sample.c.

◆ kvaDbGetMsgById()

KvaDbStatus kvaDbGetMsgById ( KvaDbHnd  dh,
unsigned int  id,
KvaDbMessageHnd mh 
)

Get a handle to a message with a specific identifier.

Parameters
[in]dhA database handle
[in]idThe selected message identifier
[out]mhA message handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgByName()
Examples:
candb_sample.c.

◆ kvaDbGetMsgByName()

KvaDbStatus kvaDbGetMsgByName ( KvaDbHnd  dh,
const char *  msg_name,
KvaDbMessageHnd mh 
)

Get a handle to a message with a specific name.

Parameters
[in]dhA databse handle
[in]msg_nameThe message name to search for
[out]mhA message handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgById()
Examples:
candb_sample.c.

◆ kvaDbGetMsgName()

KvaDbStatus kvaDbGetMsgName ( KvaDbMessageHnd  mh,
char *  buf,
size_t  buflen 
)

Get the message name.

Parameters
[in]mhA message handle
[out]bufThe buffer that will hold the message name
[in]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetMsgName(), kvaDbGetMsgQualifiedName()
Examples:
candb_sample.c.

◆ kvaDbGetMsgQualifiedName()

KvaDbStatus kvaDbGetMsgQualifiedName ( KvaDbMessageHnd  mh,
char *  buf,
size_t  buflen 
)

Get the qualified message name, which is the database name and the message name separated by a dot.

Parameters
[in]mhA message handle
[out]bufThe buffer that will hold the qualified message name
[in]buflenThe length of the buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgName()
Examples:
candb_sample.c.

◆ kvaDbGetMsgComment()

KvaDbStatus kvaDbGetMsgComment ( KvaDbMessageHnd  mh,
char *  buf,
size_t  buflen 
)

Get the message comment.

Parameters
[in]mhA message handle
[out]bufThe buffer that will hold the message comment
[in]buflenThe length of the buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetMsgComment()
Examples:
candb_sample.c.

◆ kvaDbGetMsgId()

KvaDbStatus kvaDbGetMsgId ( KvaDbMessageHnd  mh,
unsigned int *  id,
unsigned int *  flags 
)

Get message identifier and flags.

Parameters
[in]mhA message handle.
[out]idThe identifier.
[out]flagsThe flags, KVADB_MESSAGE_xxx
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetMsgId()
Examples:
candb_sample.c.

◆ kvaDbGetMsgDlc()

KvaDbStatus kvaDbGetMsgDlc ( KvaDbMessageHnd  mh,
int *  dlc 
)

Get the data length code for a message.

Parameters
[in]mhA message handle
[out]dlcThe data length code
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetMsgDlc()
Examples:
candb_sample.c.

◆ kvaDbGetMsgSendNode()

KvaDbStatus kvaDbGetMsgSendNode ( KvaDbMessageHnd  mh,
KvaDbNodeHnd nh 
)

Get send node for a message

Parameters
[in]mhA message handle
[out]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetMsgSendNode()

◆ kvaDbAddMsg()

KvaDbStatus kvaDbAddMsg ( KvaDbHnd  dh,
KvaDbMessageHnd mh 
)

Add a new message to a database.

Parameters
[in]dhA database handle
[out]mhA handle to the new message
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteMsg()
Examples:
candb_sample.c.

◆ kvaDbDeleteMsg()

KvaDbStatus kvaDbDeleteMsg ( KvaDbHnd  dh,
KvaDbMessageHnd  mh 
)

Delete a message from a database.

Parameters
[in]dhA database handle
[in]mhA handle to the message that will be deleted
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddMsg()
Examples:
candb_sample.c.

◆ kvaDbSetFlags()

KvaDbStatus kvaDbSetFlags ( KvaDbHnd  dh,
unsigned int  flags 
)

Set the database flags.

Note
This feature is currently not enabled.
Parameters
[in]dhA database handle
[in]flagsThe flags to set, KVADB_MESSAGE_xxx
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFlags()

◆ kvaDbSetProtocol()

KvaDbStatus kvaDbSetProtocol ( KvaDbHnd  dh,
KvaDbProtocolType  prot 
)

Writes the protocol attribute value of a database

Parameters
[in]dhA handle to a database
[in]protProtocol type value, KvaDbProtocolType

◆ kvaDbSetMsgName()

KvaDbStatus kvaDbSetMsgName ( KvaDbMessageHnd  mh,
char *  buf 
)

Set the message name.

Parameters
[in]mhA message handle
[in]bufThe buffer that contains the message name.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgName()
Examples:
candb_sample.c.

◆ kvaDbSetMsgComment()

KvaDbStatus kvaDbSetMsgComment ( KvaDbMessageHnd  mh,
char *  buf 
)

Set the message comment.

Parameters
[in]mhA message handle
[in]bufThe buffer that contains the message comment
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgComment()
Examples:
candb_sample.c.

◆ kvaDbSetMsgId()

KvaDbStatus kvaDbSetMsgId ( KvaDbMessageHnd  mh,
unsigned int  id,
unsigned int  flags 
)

Set the message identifier and flags.

Parameters
[in]mhA message handle
[in]idThe message identifier
[in]flagsThe message flags, KVADB_MESSAGE_xxx
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgId()
Examples:
candb_sample.c.

◆ kvaDbSetMsgDlc()

KvaDbStatus kvaDbSetMsgDlc ( KvaDbMessageHnd  mh,
int  dlc 
)

Set the data length code for a message.

Parameters
[in]mhA message handle
[in]dlcThe data length code
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgDlc()
Examples:
candb_sample.c.

◆ kvaDbSetMsgSendNode()

KvaDbStatus kvaDbSetMsgSendNode ( KvaDbMessageHnd  mh,
KvaDbNodeHnd  nh 
)

Set send node for a message

Parameters
[in]mhA message handle
[in]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetMsgSendNode()

◆ kvaDbGetMsgMux()

KvaDbStatus kvaDbGetMsgMux ( KvaDbMessageHnd  mh,
KvaDbSignalHnd shh 
)

Returns handle to a multiplexer signal of a given message

Parameters
[in]mhA message handle
[out]shhMultiplexer signal handle
Returns
kvaDbOK (zero if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetFirstSignal()

KvaDbStatus kvaDbGetFirstSignal ( KvaDbMessageHnd  mh,
KvaDbSignalHnd sh 
)

Get the first signal in a message.

Parameters
[in]mhA message handle
[out]shA handle to the first signal
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextSignal()
Examples:
candb_sample.c.

◆ kvaDbGetNextSignal()

KvaDbStatus kvaDbGetNextSignal ( KvaDbMessageHnd  mh,
KvaDbSignalHnd sh 
)

Get the next signal in a message. Should be called after kvaDbGetFirstSignal().

Parameters
[in]mhA message handle
[out]shA handle to the next signal
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstSignal
Examples:
candb_sample.c.

◆ kvaDbGetSignalByName()

KvaDbStatus kvaDbGetSignalByName ( KvaDbMessageHnd  mh,
char *  buf,
KvaDbSignalHnd sh 
)

Get a signal handle by seaching for the signals's name.

Parameters
[in]mhA message handle
[in]bufThe buffer that contains the name of the signal to search for
[out]shA handle to the signal
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstMsg()
Examples:
candb_sample.c.

◆ kvaDbSetSignalMode()

KvaDbStatus kvaDbSetSignalMode ( KvaDbSignalHnd  sh,
int  mux 
)

Sets signal's multiplex mode. If value is equal to KVADB_MUX_SIGNAL, marks signal as a multiplexer.

Parameters
[in]shA signal handle
[in]muxSignal's multiplex mode
Returns
kvaDbOK (zero if success
kvaDbErr_xxx (negative) if failure
See also
KVADB_MUX_xxx

◆ kvaDbGetSignalMode()

KvaDbStatus kvaDbGetSignalMode ( KvaDbSignalHnd  sh,
int *  mux 
)

Sets mux to multiplexer mode value of given signal. See KVADB_MUX_xxx for special (negative) values of multiplexer mode.

Parameters
[in]shA signal handle
[out]muxSignal's multiplex mode
Returns
kvaDbOK (zero if success
kvaDbErr_xxx (negative) if failure
See also
KVADB_MUX_xxx

◆ kvaDbGetSignalValueFloat()

KvaDbStatus kvaDbGetSignalValueFloat ( KvaDbSignalHnd  sh,
double *  f,
void *  data,
size_t  len 
)

Convert data to a signal's physical (floating-point) value.

Parameters
[in]shA signal handle
[out]fThe converted value
[in]dataThe data buffer to be converted
[in]lenThe length of the data buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbStoreSignalValuePhys()
Examples:
candb_sample.c.

◆ kvaDbGetSignalValueInteger()

KvaDbStatus kvaDbGetSignalValueInteger ( KvaDbSignalHnd  sh,
int *  f,
void *  data,
size_t  len 
)

Convert data to a signal's raw (integer) value.

Parameters
[in]shA signal handle
[out]fThe converted value
[in]dataThe data buffer to be converted
[in]lenThe length of the data buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbStoreSignalValueRaw()
Examples:
candb_sample.c.

◆ kvaDbGetSignalValueEnum()

KvaDbStatus kvaDbGetSignalValueEnum ( KvaDbSignalHnd  sh,
char *  buf,
size_t  buflen,
void *  data,
size_t  len 
)

Convert data to a signal's enumeration (string) value.

Parameters
[in]shA signal handle
[out]bufThe buffer that will hold the enumeration string
[in]buflenThe length of the buffer.
[in]dataThe data buffer to be converted
[in]lenThe length of the data buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbStoreSignalValueRaw()

◆ kvaDbGetSignalValueLimits()

KvaDbStatus kvaDbGetSignalValueLimits ( KvaDbSignalHnd  sh,
double *  minval,
double *  maxval 
)

Get the minimum and maximum values from a signal.

Parameters
[in]shA signal handle
[out]minvalThe minimum value
[out]maxvalThe maximum value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalValueLimits()
Examples:
candb_sample.c.

◆ kvaDbGetSignalValueScaling()

KvaDbStatus kvaDbGetSignalValueScaling ( KvaDbSignalHnd  sh,
double *  factor,
double *  offset 
)

Get the scale factor and offset from a signal.

Parameters
[in]shA signal handle
[out]factorThe signal scale factor
[out]offsetThe signal offset
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalValueScaling()
Examples:
candb_sample.c.

◆ kvaDbGetSignalValueSize()

KvaDbStatus kvaDbGetSignalValueSize ( KvaDbSignalHnd  sh,
int *  startbit,
int *  length 
)

Get the size and position of the signal value.

Parameters
[in]shA signal handle
[out]startbitThe bit where the signal value starts
[out]lengthThe length of the signal value in bits
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalValueSize()
Examples:
candb_sample.c.

◆ kvaDbGetSignalName()

KvaDbStatus kvaDbGetSignalName ( KvaDbSignalHnd  sh,
char *  buf,
size_t  buflen 
)

Get the signal name.

Parameters
[in]shA signal handle
[out]bufThe signal name
[in]buflenThe length of the buffer that will hold the signal name
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalName()
Examples:
candb_sample.c.

◆ kvaDbGetSignalQualifiedName()

KvaDbStatus kvaDbGetSignalQualifiedName ( KvaDbSignalHnd  sh,
char *  buf,
size_t  buflen 
)

Get the qualified signal name. which is the database, message ans signal names separated by dots.

Parameters
[in]shA signal handle
[out]bufThe qualified signal name
[in]buflenThe length of the buffer that will hold the qualified signal name
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalName()
Examples:
candb_sample.c.

◆ kvaDbGetSignalComment()

KvaDbStatus kvaDbGetSignalComment ( KvaDbSignalHnd  sh,
char *  buf,
size_t  buflen 
)

Get the signal comment.

Parameters
[in]shA signal handle
[out]bufThe signal comment
[in]buflenThe length of the buffer that will hold the signal comment
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalComment()
Examples:
candb_sample.c.

◆ kvaDbGetSignalUnit()

KvaDbStatus kvaDbGetSignalUnit ( KvaDbSignalHnd  sh,
char *  buf,
size_t  buflen 
)

Get the signal unit.

Parameters
[in]shA signal handle
[out]bufThe signal unit
[in]buflenThe length of the buffer that will hold the signal unit
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalUnit()
Examples:
candb_sample.c.

◆ kvaDbGetSignalEncoding()

KvaDbStatus kvaDbGetSignalEncoding ( KvaDbSignalHnd  sh,
KvaDbSignalEncoding e 
)

Get the signal encoding.

Parameters
[in]shA signal handle
[out]eThe signal encoding, Intel or Motorola, KvaDbSignalEncoding
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalEncoding()
Examples:
candb_sample.c.

◆ kvaDbGetSignalRepresentationType()

KvaDbStatus kvaDbGetSignalRepresentationType ( KvaDbSignalHnd  sh,
KvaDbSignalType t 
)

Get the signal representation type.

Parameters
[in]shA signal handle
[out]tThe signal representation type, KvaDbSignalType
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalRepresentationType()
Examples:
candb_sample.c.

◆ kvaDbGetSignalPresentationType()

KvaDbStatus kvaDbGetSignalPresentationType ( KvaDbSignalHnd  sh,
KvaDbSignalType t 
)

Get the signal representation type.

Note
This function is deprecated and will be replaced by kvaDbGetSignalRepresentationType()
Parameters
[in]sh
[out]tThe signal representation type, KvaDbSignalType
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetSignalRepresentationType()

◆ kvaDbAddSignal()

KvaDbStatus kvaDbAddSignal ( KvaDbMessageHnd  mh,
KvaDbSignalHnd sh 
)

Add a new signal to a message.

Parameters
[in]mhA message handle
[out]shA handle to the new signal
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteSignal()
Examples:
candb_sample.c.

◆ kvaDbDeleteSignal()

KvaDbStatus kvaDbDeleteSignal ( KvaDbMessageHnd  mh,
KvaDbSignalHnd  sh 
)

Delete a signal from a message.

Parameters
[in]mhA message handle
[in]shA handle to the signal to delete
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddSignal()
Examples:
candb_sample.c.

◆ kvaDbSetSignalValueLimits()

KvaDbStatus kvaDbSetSignalValueLimits ( KvaDbSignalHnd  sh,
double  minval,
double  maxval 
)

Set the value limits for a signal.

Parameters
[in]shA signal handle
[in]minvalThe minimum signal value
[in]maxvalThe maximum signal value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalValueLimits()
Examples:
candb_sample.c.

◆ kvaDbSetSignalValueScaling()

KvaDbStatus kvaDbSetSignalValueScaling ( KvaDbSignalHnd  sh,
double  factor,
double  offset 
)

Set the scale factor and offset for a signal.

Parameters
[in]shA signal handle
[in]factorThe scale factor for the signal value
[in]offsetThe offset for the signal value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalValueScaling()
Examples:
candb_sample.c.

◆ kvaDbSetSignalValueSize()

KvaDbStatus kvaDbSetSignalValueSize ( KvaDbSignalHnd  sh,
int  startbit,
int  length 
)

Set the value position and size for a signal.

Parameters
[in]shA signal handle
[in]startbitThe starting bit of the signal's value
[in]lengthThe length of the value in bits
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalValueSize()
Examples:
candb_sample.c.

◆ kvaDbSetSignalName()

KvaDbStatus kvaDbSetSignalName ( KvaDbSignalHnd  sh,
char *  buf 
)

Set the signal name.

Parameters
[in]shA signal handle
[in]bufThe buffer that contains the signal name
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalName()
Examples:
candb_sample.c.

◆ kvaDbSetSignalComment()

KvaDbStatus kvaDbSetSignalComment ( KvaDbSignalHnd  sh,
char *  buf 
)

Set the signal comment.

Parameters
[in]shA signal handle
[in]bufThe buffer that contains the signal comment
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalComment()
Examples:
candb_sample.c.

◆ kvaDbSetSignalUnit()

KvaDbStatus kvaDbSetSignalUnit ( KvaDbSignalHnd  sh,
char *  buf 
)

Set the signal unit.

Parameters
[in]shA signal handle
[in]bufThe buffer that contains the unit for the signal
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalUnit()
Examples:
candb_sample.c.

◆ kvaDbSetSignalEncoding()

KvaDbStatus kvaDbSetSignalEncoding ( KvaDbSignalHnd  sh,
KvaDbSignalEncoding  e 
)

Set the signal encoding.

Parameters
[in]shA signal handle
[in]eThe signal encoding, Intel or Motorola, KvaDbSignalEncoding
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalEncoding()
Examples:
candb_sample.c.

◆ kvaDbSetSignalRepresentationType()

KvaDbStatus kvaDbSetSignalRepresentationType ( KvaDbSignalHnd  sh,
KvaDbSignalType  t 
)

Set the signal representation type.

Parameters
[in]shA signal handle
[in]tThe signal representation type, KvaDbSignalType
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalRepresentationType()
Examples:
candb_sample.c.

◆ kvaDbGetFirstNode()

KvaDbStatus kvaDbGetFirstNode ( KvaDbHnd  dh,
KvaDbNodeHnd nh 
)

Get the first node.

Parameters
[in]dhA database handle
[out]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextNode()

◆ kvaDbGetNextNode()

KvaDbStatus kvaDbGetNextNode ( KvaDbHnd  dh,
KvaDbNodeHnd nh 
)

Get the next node. Should be called after kvaDbGetFirstNode().

Parameters
[in]dhA database handle
[out]nhA handle to the next node
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNodeByName()

◆ kvaDbGetNodeByName()

KvaDbStatus kvaDbGetNodeByName ( KvaDbHnd  dh,
const char *  node_name,
KvaDbNodeHnd nh 
)

Get a node by seaching for the node's name.

Parameters
[in]dhA database handle
[in]node_nameThe buffer that contains the node name to search for
[out]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNodeAttributeIntByName()

◆ kvaDbGetNodeAttributeIntByName()

KvaDbStatus kvaDbGetNodeAttributeIntByName ( KvaDbNodeHnd  nh,
const char *  attrName,
int *  val 
)

Get the value of a node attribute as an integer.

Parameters
[in]nhA node handle
[in]attrNameThe buffer that contains the attribute name
[out]valThe value of the attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstNode()

◆ kvaDbAddNode()

KvaDbStatus kvaDbAddNode ( KvaDbHnd  dh,
KvaDbNodeHnd nh 
)

Add a new node to a database.

Parameters
[in]dhA database handle
[out]nhA handle to the new node
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbDeleteNode()

KvaDbStatus kvaDbDeleteNode ( KvaDbHnd  dh,
KvaDbNodeHnd  nh 
)

Delete a node from a database.

Parameters
[in]dhA database handle
[in]nhA handle to the node that will be deleted
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetNodeName()

KvaDbStatus kvaDbSetNodeName ( KvaDbNodeHnd  nh,
char *  buf 
)

Set the node name.

Parameters
[in]nhA node handle
[in]bufThe buffer that contains the node name.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetNodeName()

KvaDbStatus kvaDbGetNodeName ( KvaDbNodeHnd  nh,
char *  buf,
size_t  buflen 
)

Get the node name.

Parameters
[in]nhA node handle
[out]bufThe buffer that will contain the node name
[in]buflenThe length of the data buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetNodeComment()

KvaDbStatus kvaDbSetNodeComment ( KvaDbNodeHnd  nh,
char *  buf 
)

Set the node comment.

Parameters
[in]nhA node handle
[in]bufThe buffer that contains the node comment
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbAddReceiveNodeToSignal()

KvaDbStatus kvaDbAddReceiveNodeToSignal ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Add a receiving node to a signal.

Parameters
[in]shA signal handle
[in]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbRemoveReceiveNodeFromSignal()

KvaDbStatus kvaDbRemoveReceiveNodeFromSignal ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Remove a receiving node from a signal.

Parameters
[in]shA signal handle
[in]nhA node handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSignalContainsReceiveNode()

KvaDbStatus kvaDbSignalContainsReceiveNode ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Check if a signal contains a specific receiving node

Parameters
[in]shA signal handle
[in]nhA node handle
Returns
kvaDbOK (zero) if the signal contains the node
kvaDbErr_NoNode if the signal doesn't contain the node
kvaDbErr_xxx (negative) if failure

◆ kvaDbStoreSignalValuePhys()

KvaDbStatus kvaDbStoreSignalValuePhys ( KvaDbSignalHnd  sh,
unsigned char *  can_data,
int  dlc,
double  value 
)

Convert a physical signal value to data bytes.

Parameters
[in]shA signal handle
[out]can_dataThe buffer that will hold the converted value
[in]dlcThe length of the data buffer
[in]valueThe physical signal value to convert
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalValueFloat()
Examples:
candb_sample.c.

◆ kvaDbStoreSignalValueRaw()

KvaDbStatus kvaDbStoreSignalValueRaw ( KvaDbSignalHnd  sh,
unsigned char *  can_data,
int  dlc,
int  value 
)

Convert a raw signal value to data bytes.

Parameters
[in]shA signal handle
[out]can_dataThe buffer that will hold the converted value
[in]dlcThe length of the data buffer
[in]valueThe raw signal value to convert
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetSignalValueInteger()

◆ kvaDbGetFirstAttributeDefinition()

KvaDbStatus kvaDbGetFirstAttributeDefinition ( KvaDbHnd  dh,
KvaDbAttributeDefHnd adh 
)

Get a handle to the first attribute defined in the database.

Parameters
[in]dhA handle to a database
[out]adhFirst attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextAttributeDefinition()

◆ kvaDbGetAttributeDefinitionByName()

KvaDbStatus kvaDbGetAttributeDefinitionByName ( KvaDbHnd  dh,
const char *  attrName,
KvaDbAttributeDefHnd adh 
)

Get a handle to an attribute definition with specified name.

Parameters
[in]dhA handle to a database
[in]attrNameThe attribute name to search for
[out]adhAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetNextAttributeDefinition()

KvaDbStatus kvaDbGetNextAttributeDefinition ( KvaDbAttributeDefHnd  adh,
KvaDbAttributeDefHnd nadh 
)

Get a handle to the following attribute defined.

Parameters
[in]adhAn existing handle to an attribute definition
[out]nadhHandle to next attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstAttributeDefinition()

◆ kvaDbGetAttributeDefinitionType()

KvaDbStatus kvaDbGetAttributeDefinitionType ( KvaDbAttributeDefHnd  adh,
KvaDbAttributeType at 
)

Get the type for an attribute definition.

Parameters
[in]adhA handle to an attribute definition
[out]atThe type of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeDefinitionOwner()

◆ kvaDbGetAttributeDefinitionOwner()

KvaDbStatus kvaDbGetAttributeDefinitionOwner ( KvaDbAttributeDefHnd  adh,
KvaDbAttributeOwner ao 
)

Get the type for an attribute definition.

Parameters
[in]adhA handle to an attribute definition
[out]aoThe owner of the attribute definition, kvadb_AttributeOwnerXXX
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeDefinitionType()

◆ kvaDbGetAttributeDefinitionName()

KvaDbStatus kvaDbGetAttributeDefinitionName ( KvaDbAttributeDefHnd  adh,
char *  buf,
size_t  buflen 
)

Get the name for an attribute definition.

Parameters
[in]adhA handle to an attribute
[out]bufThe buffer that will hold the attribute name
[in]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeDefinitionType()

◆ kvaDbGetAttributeDefinitionInt()

KvaDbStatus kvaDbGetAttributeDefinitionInt ( KvaDbAttributeDefHnd  adh,
int *  def,
int *  min,
int *  max 
)

Get the values for an attribute definition of type integer.

Parameters
[in]adhA handle to an attribute definition
[out]defThe default value of the attribute definition
[out]minThe min value of the attribute definition
[out]maxThe max value of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetAttributeDefinitionFloat()

KvaDbStatus kvaDbGetAttributeDefinitionFloat ( KvaDbAttributeDefHnd  adh,
float *  def,
float *  min,
float *  max 
)

Get the values for an attribute definition of type float.

Parameters
[in]adhA handle to an attribute definition
[out]defThe default value of the attribute definition
[out]minThe min value of the attribute definition
[out]maxThe max value of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetAttributeDefinitionString()

KvaDbStatus kvaDbGetAttributeDefinitionString ( KvaDbAttributeDefHnd  adh,
char *  buf,
size_t  buflen 
)

Get the value for an attribute definition of type string.

Parameters
[in]adhA handle to an attribute definition
[out]bufThe buffer that holds the default value of the attribute
[out]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetAttributeDefinitionEnumeration()

KvaDbStatus kvaDbGetAttributeDefinitionEnumeration ( KvaDbAttributeDefHnd  adh,
int *  def 
)

Get the value for an attribute definition of type enumeration.

Parameters
[in]adhA handle to an attribute definition
[out]defThe default value of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbAddAttributeDefinition()

KvaDbStatus kvaDbAddAttributeDefinition ( KvaDbHnd  dh,
KvaDbAttributeDefHnd adh 
)

Add a new attribute definition to a database.

Parameters
[in]dhA handle to a database
[out]adhA handle to a new attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionName()

KvaDbStatus kvaDbSetAttributeDefinitionName ( KvaDbAttributeDefHnd  adh,
const char *  adName 
)

Set the name of an attribute definition.

Parameters
[in]adhA handle to a attribute definition
[in]adNameThe name of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionType()

KvaDbStatus kvaDbSetAttributeDefinitionType ( KvaDbAttributeDefHnd  adh,
KvaDbAttributeType  adType 
)

Set the type of an attribute definition.

Parameters
[in]adhA handle to a attribute definition
[in]adTypeThe type of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionOwner()

KvaDbStatus kvaDbSetAttributeDefinitionOwner ( KvaDbAttributeDefHnd  adh,
KvaDbAttributeOwner  adOwner 
)

Set the owner of an attribute definition.

Parameters
[in]adhA handle to a attribute definition
[in]adOwnerThe owner of the attribute definition
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbAddAttributeDefinitionEnum()

KvaDbStatus kvaDbAddAttributeDefinitionEnum ( KvaDbAttributeDefHnd  adh,
const char *  eName,
int  eValue 
)

Add a enumeration value to an attribute definition of enumeration type.

Parameters
[in]adhA handle to a attribute definition
[in]eNameThe name of the enumeration entry
[in]eValueThe value of the enumeration entry
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionEnumDefault()

KvaDbStatus kvaDbSetAttributeDefinitionEnumDefault ( KvaDbAttributeDefHnd  adh,
int  dValue 
)

Set the default enumeration value of an attribute definition of enumeration type.

Parameters
[in]adhA handle to a attribute definition
[in]dValueThe default value of the enumeration entry
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionInt()

KvaDbStatus kvaDbSetAttributeDefinitionInt ( KvaDbAttributeDefHnd  adh,
int  def,
int  min,
int  max 
)

Set max, min and default value of an attribute definition of integer type.

Parameters
[in]adhA handle to a attribute definition
[in]defThe default value
[in]minThe minimum value
[in]maxThe maximum value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionFloat()

KvaDbStatus kvaDbSetAttributeDefinitionFloat ( KvaDbAttributeDefHnd  adh,
float  def,
float  min,
float  max 
)

Set max, min and default value of an attribute definition of floating point type.

Parameters
[in]adhA handle to a attribute definition
[in]defThe default value
[in]minThe minimum value
[in]maxThe maximum value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbSetAttributeDefinitionString()

KvaDbStatus kvaDbSetAttributeDefinitionString ( KvaDbAttributeDefHnd  adh,
const char *  buf 
)

Set the default value of an attribute definition of string.

Parameters
[in]adhA handle to a attribute definition
[in]bufThe default value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbAddMsgAttribute()

KvaDbStatus kvaDbAddMsgAttribute ( KvaDbMessageHnd  mh,
KvaDbAttributeDefHnd  adh,
KvaDbAttributeHnd ah 
)

Add an attribute to a message.

Parameters
[in]mhA handle to a message
[in]adhA handle to an attribute definition
[out]ahAn attribute handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteMsgAttribute()

◆ kvaDbDeleteMsgAttribute()

KvaDbStatus kvaDbDeleteMsgAttribute ( KvaDbMessageHnd  mh,
KvaDbAttributeHnd  ah 
)

Delete an attribute from a message.

Parameters
[in]mhA handle to a message
[in]ahA handle to an attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddMsgAttribute()

◆ kvaDbAddSignalAttribute()

KvaDbStatus kvaDbAddSignalAttribute ( KvaDbSignalHnd  sh,
KvaDbAttributeDefHnd  adh,
KvaDbAttributeHnd ah 
)

Add an attribute to a signal.

Parameters
[in]shA handle to a signal
[in]adhA handle to an attribute definition
[out]ahAn attribute handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteSignalAttribute()

◆ kvaDbGetFirstEnumValue()

KvaDbStatus kvaDbGetFirstEnumValue ( KvaDbSignalHnd  sh,
KvaDbEnumValueHnd eh 
)

Get the first enumeration value in a signal.

Parameters
[in]shA signal handle
[out]ehA handle to the first enumeration value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextEnumValue()

◆ kvaDbGetNextEnumValue()

KvaDbStatus kvaDbGetNextEnumValue ( KvaDbSignalHnd  sh,
KvaDbEnumValueHnd eh 
)

Get the next enumeration value in a signal. Should be called after kvaDbGetFirstEnumValue().

Parameters
[in]shA signal handle
[out]ehA handle to the next enumeration value
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextEnumValue

◆ kvaDbGetEnumValue()

KvaDbStatus kvaDbGetEnumValue ( KvaDbEnumValueHnd  eh,
int *  val,
char *  buf,
size_t  buflen 
)

Get the string and integer from an enumeration value.

Parameters
[in]ehAn enumeration value handle
[out]valThe enumeration value
[out]bufThe buffer that will hold the enumeration name
[in]buflenThe length of the buffer
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstEnumValue()

◆ kvaDbAddEnumValue()

KvaDbStatus kvaDbAddEnumValue ( KvaDbSignalHnd  sh,
int  val,
const char *  name 
)

Add a new enumeration value to a signal.

Parameters
[in]shA signal handle
[out]valThe enumeration value
[out]nameThe enumeration name
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteEnumValue()

◆ kvaDbDeleteEnumValue()

KvaDbStatus kvaDbDeleteEnumValue ( KvaDbSignalHnd  sh,
KvaDbEnumValueHnd  eh 
)

Delete an enumeration value from a signal.

Parameters
[in]shA signal handle
[in]ehAn enumeration value handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddEnumValue()

◆ kvaDbDeleteSignalAttribute()

KvaDbStatus kvaDbDeleteSignalAttribute ( KvaDbSignalHnd  sh,
KvaDbAttributeHnd  ah 
)

Delete an attribute from a signal.

Parameters
[in]shA handle to a signal
[in]ahA handle to an attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddSignalAttribute()

◆ kvaDbAddNodeAttribute()

KvaDbStatus kvaDbAddNodeAttribute ( KvaDbNodeHnd  nh,
KvaDbAttributeDefHnd  adh,
KvaDbAttributeHnd ah 
)

Add an attribute to a node.

Parameters
[in]nhA handle to a node
[in]adhA handle to an attribute definition
[out]ahAn attribute handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbDeleteNodeAttribute()

◆ kvaDbDeleteNodeAttribute()

KvaDbStatus kvaDbDeleteNodeAttribute ( KvaDbNodeHnd  nh,
KvaDbAttributeHnd  ah 
)

Delete an attribute from a node.

Parameters
[in]nhA handle to a node
[in]ahA handle to an attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbAddNodeAttribute()

◆ kvaDbGetFirstMsgAttribute()

KvaDbStatus kvaDbGetFirstMsgAttribute ( KvaDbMessageHnd  mh,
KvaDbAttributeHnd ah 
)

Get a handle to the first attribute for a message.

Parameters
[in]mhA handle to a message
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextAttribute()

◆ kvaDbGetMsgAttributeByName()

KvaDbStatus kvaDbGetMsgAttributeByName ( KvaDbMessageHnd  mh,
const char *  attrName,
KvaDbAttributeHnd ah 
)

Get a handle to an attribute with specified name for a message.

Parameters
[in]mhA handle to a message
[in]attrNameThe attribute name to search for
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetFirstSignalAttribute()

KvaDbStatus kvaDbGetFirstSignalAttribute ( KvaDbSignalHnd  sh,
KvaDbAttributeHnd ah 
)

Get a handle to the first attribute for a signal.

Parameters
[in]shA handle to a signal
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextAttribute()

◆ kvaDbGetSignalAttributeByName()

KvaDbStatus kvaDbGetSignalAttributeByName ( KvaDbSignalHnd  sh,
const char *  attrName,
KvaDbAttributeHnd ah 
)

Get a handle to an attribute with specified name for a signal.

Parameters
[in]shA handle to a signal
[in]attrNameThe attribute name to search for
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetFirstNodeAttribute()

KvaDbStatus kvaDbGetFirstNodeAttribute ( KvaDbNodeHnd  nh,
KvaDbAttributeHnd ah 
)

Get a handle to the first attribute for a node.

Parameters
[in]nhA handle to a node
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetNextAttribute()

◆ kvaDbGetNodeAttributeByName()

KvaDbStatus kvaDbGetNodeAttributeByName ( KvaDbNodeHnd  nh,
const char *  attrName,
KvaDbAttributeHnd ah 
)

Get a handle to an attribute with specified name for a node.

Parameters
[in]nhA handle to a node
[in]attrNameThe attribute name to search for
[out]ahAn attribute definition handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure

◆ kvaDbGetNextAttribute()

KvaDbStatus kvaDbGetNextAttribute ( KvaDbAttributeHnd  ah,
KvaDbAttributeHnd nah 
)

Get a handle to the following attribute.

Parameters
[in]ahA handle to an attribute
[out]nahAn attribute handle
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetFirstMsgAttribute()
kvaDbGetFirstSignalAttribute()
kvaDbGetFirstNodeAttribute()

◆ kvaDbGetAttributeType()

KvaDbStatus kvaDbGetAttributeType ( KvaDbAttributeHnd  ah,
KvaDbAttributeType at 
)

Get the type for an attribute.

Parameters
[in]ahA handle to an attribute
[out]atThe type of the attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeName()

◆ kvaDbGetAttributeName()

KvaDbStatus kvaDbGetAttributeName ( KvaDbAttributeHnd  adh,
char *  buf,
size_t  buflen 
)

Get the name for an attribute.

Parameters
[in]adhA handle to an attribute
[out]bufThe buffer that will hold the attribute name
[in]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeType()

◆ kvaDbSetAttributeValueInt()

KvaDbStatus kvaDbSetAttributeValueInt ( KvaDbAttributeHnd  ah,
int  val 
)

Set the value for an attribute of type integer.

Parameters
[in]ahA handle to an attribute
[in]valThe value to set
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeValueInt()

◆ kvaDbGetAttributeValueInt()

KvaDbStatus kvaDbGetAttributeValueInt ( KvaDbAttributeHnd  ah,
int *  val 
)

Get the value for an attribute of type integer.

Parameters
[in]ahA handle to an attribute
[out]valThe value of the attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetAttributeValueInt()

◆ kvaDbSetAttributeValueFloat()

KvaDbStatus kvaDbSetAttributeValueFloat ( KvaDbAttributeHnd  ah,
float  val 
)

Set the value for an attribute of type float.

Parameters
[in]ahA handle to an attribute
[in]valThe value to set
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeValueFloat()

◆ kvaDbGetAttributeValueFloat()

KvaDbStatus kvaDbGetAttributeValueFloat ( KvaDbAttributeHnd  ah,
float *  val 
)

Get the value for an attribute of type float.

Parameters
[in]ahA handle to an attribute
[out]valThe value of the attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetAttributeValueFloat()

◆ kvaDbSetAttributeValueString()

KvaDbStatus kvaDbSetAttributeValueString ( KvaDbAttributeHnd  ah,
const char *  buf,
int  buflen 
)

Set the value for an attribute of type string.

Parameters
[in]ahA handle to an attribute
[in]bufThe buffer that holds the attribute value
[in]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeValueString()

◆ kvaDbGetAttributeValueString()

KvaDbStatus kvaDbGetAttributeValueString ( KvaDbAttributeHnd  ah,
char *  buf,
size_t  buflen 
)

Get the value for an attribute of type string.

Parameters
[in]ahA handle to an attribute
[out]bufThe buffer that holds the attribute value
[out]buflenThe length of the buffer.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetAttributeValueString()

◆ kvaDbSetAttributeValueEnumeration()

KvaDbStatus kvaDbSetAttributeValueEnumeration ( KvaDbAttributeHnd  ah,
int  val 
)

Set the value for an attribute of type enumeration.

Parameters
[in]ahA handle to an attribute
[in]valThe value to set
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetAttributeValueEnumeration()

◆ kvaDbGetAttributeValueEnumeration()

KvaDbStatus kvaDbGetAttributeValueEnumeration ( KvaDbAttributeHnd  ah,
int *  val 
)

Get the value for an attribute of type enumeration.

Parameters
[in]ahA handle to an attribute
[out]valThe value of the attribute
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbSetAttributeValueEnumeration()

◆ kvaDbMsgDlcToBytes()

KvaDbStatus kvaDbMsgDlcToBytes ( KvaDbProtocolType  prot,
unsigned int  dlc,
unsigned int *  numBytes 
)

Translates message dlc to number of bytes for a given protocol

Parameters
[in]protA protocol type
[in]dlcRaw message dlc
[out]numBytesNumber of bytes corresponding to dlc
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetProtocol()

◆ kvaDbBytesToMsgDlc()

KvaDbStatus kvaDbBytesToMsgDlc ( KvaDbProtocolType  prot,
unsigned int  numBytes,
unsigned int *  dlc 
)

Translates number of bytes to message dlc for a given protocol

Parameters
[in]protA protocol type
[in]numBytesNumber of bytes
[out]dlcRaw message dlc corresponding to number of bytes
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
See also
kvaDbGetProtocol()