| #define KVADB_DATABASE_J1939 0x0001 |
The database uses the J1939 protocol.
| #define KVADB_MESSAGE_EXT 0x80000000 |
Message is an extended CAN message.
| #define KVADB_MESSAGE_J1939 0x00000001 |
Message uses J1939 protocol.
| #define KVADB_MESSAGE_WAKEUP 0x00000002 |
Message is a wake-up frame, Id/msg/dlc are undefined.
| #define KVADB_MUX_INDEPENDENT -1 |
Miltiplex mode value of an independent signal.
| #define KVADB_MUX_SIGNAL -2 |
Multiplex mode value of a multiplexer signal.
| typedef void* KvaDbAttributeDefHnd |
Attribute definition handle.
| typedef void* KvaDbAttributeHnd |
Attribute handle.
| typedef void* KvaDbEnumValueHnd |
Enumeration value handle.
| typedef void* KvaDbHnd |
Database handle.
| typedef void* KvaDbMessageHnd |
Message handle.
| typedef void* KvaDbNodeHnd |
Node handle.
| typedef void* KvaDbSignalHnd |
Signal handle.
| enum KvaDbAttributeOwner |
| enum KvaDbAttributeType |
| enum KvaDbProtocolType |
| enum KvaDbSignalEncoding |
| enum KvaDbSignalType |
| enum KvaDbStatus |
| KvaDbStatus kvaDbAddAttributeDefinition | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Add a new attribute definition to a database.
| [in] | dh | A handle to a database |
| [out] | adh | A handle to a new attribute definition |
| KvaDbStatus kvaDbAddAttributeDefinitionEnum | ( | KvaDbAttributeDefHnd | adh, |
| const char * | eName, | ||
| int | eValue | ||
| ) |
Add a enumeration value to an attribute definition of enumeration type.
| [in] | adh | A handle to a attribute definition |
| [in] | eName | The name of the enumeration entry |
| [in] | eValue | The value of the enumeration entry |
| KvaDbStatus kvaDbAddEnumValue | ( | KvaDbSignalHnd | sh, |
| int | val, | ||
| const char * | name | ||
| ) |
Add a new enumeration value to a signal.
| [in] | sh | A signal handle |
| [out] | val | The enumeration value |
| [out] | name | The enumeration name |
| KvaDbStatus kvaDbAddFile | ( | KvaDbHnd | dh, |
| const char * | filename | ||
| ) |
This loads a database file into a handle created with kvaDbOpen().
| [in] | dh | A handle database handle |
| [in] | filename | A database file |
| KvaDbStatus kvaDbAddMsg | ( | KvaDbHnd | dh, |
| KvaDbMessageHnd * | mh | ||
| ) |
Add a new message to a database.
| [in] | dh | A database handle |
| [out] | mh | A handle to the new message |
| KvaDbStatus kvaDbAddMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a message.
| [in] | mh | A handle to a message |
| [in] | adh | A handle to an attribute definition |
| [out] | ah | An attribute handle |
| KvaDbStatus kvaDbAddNode | ( | KvaDbHnd | dh, |
| KvaDbNodeHnd * | nh | ||
| ) |
Add a new node to a database.
| [in] | dh | A database handle |
| [out] | nh | A handle to the new node |
| KvaDbStatus kvaDbAddNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a node.
| [in] | nh | A handle to a node |
| [in] | adh | A handle to an attribute definition |
| [out] | ah | An attribute handle |
| KvaDbStatus kvaDbAddReceiveNodeToSignal | ( | KvaDbSignalHnd | sh, |
| KvaDbNodeHnd | nh | ||
| ) |
Add a receiving node to a signal.
| [in] | sh | A signal handle |
| [in] | nh | A node handle |
| KvaDbStatus kvaDbAddSignal | ( | KvaDbMessageHnd | mh, |
| KvaDbSignalHnd * | sh | ||
| ) |
Add a new signal to a message.
| [in] | mh | A message handle |
| [out] | sh | A handle to the new signal |
| KvaDbStatus kvaDbAddSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a signal.
| [in] | sh | A handle to a signal |
| [in] | adh | A handle to an attribute definition |
| [out] | ah | An attribute handle |
| KvaDbStatus kvaDbBytesToMsgDlc | ( | KvaDbProtocolType | prot, |
| unsigned int | numBytes, | ||
| unsigned int * | dlc | ||
| ) |
Translates number of bytes to message dlc for a given protocol
| [in] | prot | A protocol type |
| [in] | numBytes | Number of bytes |
| [out] | dlc | Raw message dlc corresponding to number of bytes |
| KvaDbStatus kvaDbClose | ( | KvaDbHnd | dh | ) |
This function closes an open database handle.
| [in] | dh | A handle to a database |
| 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:
NULL and set filename to the database file.NULL.| [in] | dh | A database handle |
| [in] | localName | The name of the database or NULL |
| [in] | filename | The database file or NULL |
| KvaDbStatus kvaDbDeleteEnumValue | ( | KvaDbSignalHnd | sh, |
| KvaDbEnumValueHnd | eh | ||
| ) |
Delete an enumeration value from a signal.
| [in] | sh | A signal handle |
| [in] | eh | An enumeration value handle |
| KvaDbStatus kvaDbDeleteMsg | ( | KvaDbHnd | dh, |
| KvaDbMessageHnd | mh | ||
| ) |
Delete a message from a database.
| [in] | dh | A database handle |
| [in] | mh | A handle to the message that will be deleted |
| KvaDbStatus kvaDbDeleteMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a message.
| [in] | mh | A handle to a message |
| [in] | ah | A handle to an attribute |
| KvaDbStatus kvaDbDeleteNode | ( | KvaDbHnd | dh, |
| KvaDbNodeHnd | nh | ||
| ) |
Delete a node from a database.
| [in] | dh | A database handle |
| [in] | nh | A handle to the node that will be deleted |
| KvaDbStatus kvaDbDeleteNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a node.
| [in] | nh | A handle to a node |
| [in] | ah | A handle to an attribute |
| KvaDbStatus kvaDbDeleteSignal | ( | KvaDbMessageHnd | mh, |
| KvaDbSignalHnd | sh | ||
| ) |
Delete a signal from a message.
| [in] | mh | A message handle |
| [in] | sh | A handle to the signal to delete |
| KvaDbStatus kvaDbDeleteSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a signal.
| [in] | sh | A handle to a signal |
| [in] | ah | A handle to an attribute |
| KvaDbStatus kvaDbGetAttributeDefinitionByName | ( | KvaDbHnd | dh, |
| const char * | attrName, | ||
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Get a handle to an attribute definition with specified name.
| [in] | dh | A handle to a database |
| [in] | attrName | The attribute name to search for |
| [out] | adh | An attribute definition handle |
| KvaDbStatus kvaDbGetAttributeDefinitionEnumeration | ( | KvaDbAttributeDefHnd | adh, |
| int * | def | ||
| ) |
Get the value for an attribute definition of type enumeration.
| [in] | adh | A handle to an attribute definition |
| [out] | def | The default value of the attribute definition |
| KvaDbStatus kvaDbGetAttributeDefinitionFloat | ( | KvaDbAttributeDefHnd | adh, |
| float * | def, | ||
| float * | min, | ||
| float * | max | ||
| ) |
Get the values for an attribute definition of type float.
| [in] | adh | A handle to an attribute definition |
| [out] | def | The default value of the attribute definition |
| [out] | min | The min value of the attribute definition |
| [out] | max | The max value of the attribute definition |
| KvaDbStatus kvaDbGetAttributeDefinitionInt | ( | KvaDbAttributeDefHnd | adh, |
| int * | def, | ||
| int * | min, | ||
| int * | max | ||
| ) |
Get the values for an attribute definition of type integer.
| [in] | adh | A handle to an attribute definition |
| [out] | def | The default value of the attribute definition |
| [out] | min | The min value of the attribute definition |
| [out] | max | The max value of the attribute definition |
| KvaDbStatus kvaDbGetAttributeDefinitionName | ( | KvaDbAttributeDefHnd | adh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the name for an attribute definition.
| [in] | adh | A handle to an attribute |
| [out] | buf | The buffer that will hold the attribute name |
| [in] | buflen | The length of the buffer. |
| KvaDbStatus kvaDbGetAttributeDefinitionOwner | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeOwner * | ao | ||
| ) |
Get the type for an attribute definition.
| [in] | adh | A handle to an attribute definition |
| [out] | ao | The owner of the attribute definition, kvadb_AttributeOwnerXXX |
| KvaDbStatus kvaDbGetAttributeDefinitionString | ( | KvaDbAttributeDefHnd | adh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the value for an attribute definition of type string.
| [in] | adh | A handle to an attribute definition |
| [out] | buf | The buffer that holds the default value of the attribute |
| [out] | buflen | The length of the buffer. |
| KvaDbStatus kvaDbGetAttributeDefinitionType | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeType * | at | ||
| ) |
Get the type for an attribute definition.
| [in] | adh | A handle to an attribute definition |
| [out] | at | The type of the attribute definition |
| KvaDbStatus kvaDbGetAttributeName | ( | KvaDbAttributeHnd | adh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the name for an attribute.
| [in] | adh | A handle to an attribute |
| [out] | buf | The buffer that will hold the attribute name |
| [in] | buflen | The length of the buffer. |
| KvaDbStatus kvaDbGetAttributeType | ( | KvaDbAttributeHnd | ah, |
| KvaDbAttributeType * | at | ||
| ) |
Get the type for an attribute.
| [in] | ah | A handle to an attribute |
| [out] | at | The type of the attribute |
| KvaDbStatus kvaDbGetAttributeValueEnumeration | ( | KvaDbAttributeHnd | ah, |
| int * | val | ||
| ) |
Get the value for an attribute of type enumeration.
| [in] | ah | A handle to an attribute |
| [out] | val | The value of the attribute |
| KvaDbStatus kvaDbGetAttributeValueFloat | ( | KvaDbAttributeHnd | ah, |
| float * | val | ||
| ) |
Get the value for an attribute of type float.
| [in] | ah | A handle to an attribute |
| [out] | val | The value of the attribute |
| KvaDbStatus kvaDbGetAttributeValueInt | ( | KvaDbAttributeHnd | ah, |
| int * | val | ||
| ) |
Get the value for an attribute of type integer.
| [in] | ah | A handle to an attribute |
| [out] | val | The value of the attribute |
| KvaDbStatus kvaDbGetAttributeValueString | ( | KvaDbAttributeHnd | ah, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the value for an attribute of type string.
| [in] | ah | A handle to an attribute |
| [out] | buf | The buffer that holds the attribute value |
| [out] | buflen | The length of the buffer. |
| KvaDbStatus kvaDbGetEnumValue | ( | KvaDbEnumValueHnd | eh, |
| int * | val, | ||
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the string and integer from an enumeration value.
| [in] | eh | An enumeration value handle |
| [out] | val | The enumeration value |
| [out] | buf | The buffer that will hold the enumeration name |
| [in] | buflen | The length of the buffer |
| KvaDbStatus kvaDbGetFirstAttributeDefinition | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Get a handle to the first attribute defined in the database.
| [in] | dh | A handle to a database |
| [out] | adh | First attribute definition handle |
| KvaDbStatus kvaDbGetFirstEnumValue | ( | KvaDbSignalHnd | sh, |
| KvaDbEnumValueHnd * | eh | ||
| ) |
Get the first enumeration value in a signal.
| [in] | sh | A signal handle |
| [out] | eh | A handle to the first enumeration value |
| KvaDbStatus kvaDbGetFirstMsg | ( | KvaDbHnd | dh, |
| KvaDbMessageHnd * | mh | ||
| ) |
Get the first message in a database.
| [in] | dh | A handle to a database |
| [out] | mh | A handle to the first message |
| KvaDbStatus kvaDbGetFirstMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a message.
| [in] | mh | A handle to a message |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetFirstNode | ( | KvaDbHnd | dh, |
| KvaDbNodeHnd * | nh | ||
| ) |
Get the first node.
| [in] | dh | A database handle |
| [out] | nh | A node handle |
| KvaDbStatus kvaDbGetFirstNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a node.
| [in] | nh | A handle to a node |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetFirstSignal | ( | KvaDbMessageHnd | mh, |
| KvaDbSignalHnd * | sh | ||
| ) |
Get the first signal in a message.
| [in] | mh | A message handle |
| [out] | sh | A handle to the first signal |
| KvaDbStatus kvaDbGetFirstSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a signal.
| [in] | sh | A handle to a signal |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetFlags | ( | KvaDbHnd | dh, |
| unsigned int * | flags | ||
| ) |
Get the database flags.
| [in] | dh | A handle to a database |
| [out] | flags | The database flags, KVADB_DATABASE_xxx |
| KvaDbStatus kvaDbGetMsgAttributeByName | ( | KvaDbMessageHnd | mh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a message.
| [in] | mh | A handle to a message |
| [in] | attrName | The attribute name to search for |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetMsgAttributeIntByName | ( | KvaDbMessageHnd | mh, |
| const char * | attrName, | ||
| int * | val | ||
| ) |
Get the integer value of an attribute with specified name for a message.
| [in] | mh | A handle to a message |
| [in] | attrName | The attribute name to search for |
| [out] | val | An integer |
| KvaDbStatus kvaDbGetMsgById | ( | KvaDbHnd | dh, |
| unsigned int | id, | ||
| KvaDbMessageHnd * | mh | ||
| ) |
Get a handle to a message with a specific identifier.
| [in] | dh | A database handle |
| [in] | id | The selected message identifier |
| [out] | mh | A message handle |
| KvaDbStatus kvaDbGetMsgByName | ( | KvaDbHnd | dh, |
| const char * | msg_name, | ||
| KvaDbMessageHnd * | mh | ||
| ) |
Get a handle to a message with a specific name.
| [in] | dh | A databse handle |
| [in] | msg_name | The message name to search for |
| [out] | mh | A message handle |
| KvaDbStatus kvaDbGetMsgComment | ( | KvaDbMessageHnd | mh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the message comment.
| [in] | mh | A message handle |
| [out] | buf | The buffer that will hold the message comment |
| [in] | buflen | The length of the buffer |
| KvaDbStatus kvaDbGetMsgDlc | ( | KvaDbMessageHnd | mh, |
| int * | dlc | ||
| ) |
Get the data length code for a message.
| [in] | mh | A message handle |
| [out] | dlc | The data length code |
| KvaDbStatus kvaDbGetMsgId | ( | KvaDbMessageHnd | mh, |
| unsigned int * | id, | ||
| unsigned int * | flags | ||
| ) |
Get message identifier and flags.
| [in] | mh | A message handle. |
| [out] | id | The identifier. |
| [out] | flags | The flags, KVADB_MESSAGE_xxx |
| KvaDbStatus kvaDbGetMsgMux | ( | KvaDbMessageHnd | mh, |
| KvaDbSignalHnd * | shh | ||
| ) |
Returns handle to a multiplexer signal of a given message
| [in] | mh | A message handle |
| [out] | shh | Multiplexer signal handle |
| KvaDbStatus kvaDbGetMsgName | ( | KvaDbMessageHnd | mh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the message name.
| [in] | mh | A message handle |
| [out] | buf | The buffer that will hold the message name |
| [in] | buflen | The length of the buffer. |
| 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.
| [in] | mh | A message handle |
| [out] | buf | The buffer that will hold the qualified message name |
| [in] | buflen | The length of the buffer |
| KvaDbStatus kvaDbGetMsgSendNode | ( | KvaDbMessageHnd | mh, |
| KvaDbNodeHnd * | nh | ||
| ) |
Get send node for a message
| [in] | mh | A message handle |
| [out] | nh | A node handle |
| KvaDbStatus kvaDbGetNextAttribute | ( | KvaDbAttributeHnd | ah, |
| KvaDbAttributeHnd * | nah | ||
| ) |
Get a handle to the following attribute.
| [in] | ah | A handle to an attribute |
| [out] | nah | An attribute handle |
| KvaDbStatus kvaDbGetNextAttributeDefinition | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeDefHnd * | nadh | ||
| ) |
Get a handle to the following attribute defined.
| [in] | adh | An existing handle to an attribute definition |
| [out] | nadh | Handle to next attribute definition |
| KvaDbStatus kvaDbGetNextEnumValue | ( | KvaDbSignalHnd | sh, |
| KvaDbEnumValueHnd * | eh | ||
| ) |
Get the next enumeration value in a signal. Should be called after kvaDbGetFirstEnumValue().
| [in] | sh | A signal handle |
| [out] | eh | A handle to the next enumeration value |
| KvaDbStatus kvaDbGetNextMsg | ( | KvaDbHnd | dh, |
| KvaDbMessageHnd * | mh | ||
| ) |
Get a handle to the next message in a database. Should be called after kvaDbGetFirstMsg().
| [in] | dh | A database handle |
| [out] | mh | A message handle |
| KvaDbStatus kvaDbGetNextNode | ( | KvaDbHnd | dh, |
| KvaDbNodeHnd * | nh | ||
| ) |
Get the next node. Should be called after kvaDbGetFirstNode().
| [in] | dh | A database handle |
| [out] | nh | A handle to the next node |
| KvaDbStatus kvaDbGetNextSignal | ( | KvaDbMessageHnd | mh, |
| KvaDbSignalHnd * | sh | ||
| ) |
Get the next signal in a message. Should be called after kvaDbGetFirstSignal().
| [in] | mh | A message handle |
| [out] | sh | A handle to the next signal |
| KvaDbStatus kvaDbGetNodeAttributeByName | ( | KvaDbNodeHnd | nh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a node.
| [in] | nh | A handle to a node |
| [in] | attrName | The attribute name to search for |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetNodeAttributeIntByName | ( | KvaDbNodeHnd | nh, |
| const char * | attrName, | ||
| int * | val | ||
| ) |
Get the value of a node attribute as an integer.
| [in] | nh | A node handle |
| [in] | attrName | The buffer that contains the attribute name |
| [out] | val | The value of the attribute |
| KvaDbStatus kvaDbGetNodeByName | ( | KvaDbHnd | dh, |
| const char * | node_name, | ||
| KvaDbNodeHnd * | nh | ||
| ) |
Get a node by seaching for the node's name.
| [in] | dh | A database handle |
| [in] | node_name | The buffer that contains the node name to search for |
| [out] | nh | A node handle |
| KvaDbStatus kvaDbGetNodeName | ( | KvaDbNodeHnd | nh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the node name.
| [in] | nh | A node handle |
| [out] | buf | The buffer that will contain the node name |
| [in] | buflen | The length of the data buffer |
| KvaDbStatus kvaDbGetProtocol | ( | KvaDbHnd | dh, |
| KvaDbProtocolType * | prot | ||
| ) |
Reads the protocol attribute value of a database
| [in] | dh | A handle to a database |
| [out] | prot | A handle to protocol type, KvaDbProtocolType |
| KvaDbStatus kvaDbGetProtocolProperties | ( | KvaDbProtocolType | prot, |
| KvaDbProtocolProperties * | prop | ||
| ) |
Returns properties of a given protocol, see KvaDbProtocolProperties
| [in] | prot | Protocol type, KvaDbProtocolType |
| [out] | prop | A handle to protocol properties, KvaDbProtocolProperties |
| KvaDbStatus kvaDbGetSignalAttributeByName | ( | KvaDbSignalHnd | sh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a signal.
| [in] | sh | A handle to a signal |
| [in] | attrName | The attribute name to search for |
| [out] | ah | An attribute definition handle |
| KvaDbStatus kvaDbGetSignalByName | ( | KvaDbMessageHnd | mh, |
| char * | buf, | ||
| KvaDbSignalHnd * | sh | ||
| ) |
Get a signal handle by seaching for the signals's name.
| [in] | mh | A message handle |
| [in] | buf | The buffer that contains the name of the signal to search for |
| [out] | sh | A handle to the signal |
| KvaDbStatus kvaDbGetSignalComment | ( | KvaDbSignalHnd | sh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the signal comment.
| [in] | sh | A signal handle |
| [out] | buf | The signal comment |
| [in] | buflen | The length of the buffer that will hold the signal comment |
| KvaDbStatus kvaDbGetSignalEncoding | ( | KvaDbSignalHnd | sh, |
| KvaDbSignalEncoding * | e | ||
| ) |
Get the signal encoding.
| [in] | sh | A signal handle |
| [out] | e | The signal encoding, Intel or Motorola, KvaDbSignalEncoding |
| 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.
| [in] | sh | A signal handle |
| [out] | mux | Signal's multiplex mode |
| KvaDbStatus kvaDbGetSignalName | ( | KvaDbSignalHnd | sh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the signal name.
| [in] | sh | A signal handle |
| [out] | buf | The signal name |
| [in] | buflen | The length of the buffer that will hold the signal name |
| KvaDbStatus kvaDbGetSignalPresentationType | ( | KvaDbSignalHnd | sh, |
| KvaDbSignalType * | t | ||
| ) |
Get the signal representation type.
| [in] | sh | |
| [out] | t | The signal representation type, KvaDbSignalType |
| 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.
| [in] | sh | A signal handle |
| [out] | buf | The qualified signal name |
| [in] | buflen | The length of the buffer that will hold the qualified signal name |
| KvaDbStatus kvaDbGetSignalRepresentationType | ( | KvaDbSignalHnd | sh, |
| KvaDbSignalType * | t | ||
| ) |
Get the signal representation type.
| [in] | sh | A signal handle |
| [out] | t | The signal representation type, KvaDbSignalType |
| KvaDbStatus kvaDbGetSignalUnit | ( | KvaDbSignalHnd | sh, |
| char * | buf, | ||
| size_t | buflen | ||
| ) |
Get the signal unit.
| [in] | sh | A signal handle |
| [out] | buf | The signal unit |
| [in] | buflen | The length of the buffer that will hold the signal unit |
| KvaDbStatus kvaDbGetSignalValueEnum | ( | KvaDbSignalHnd | sh, |
| char * | buf, | ||
| size_t | buflen, | ||
| void * | data, | ||
| size_t | len | ||
| ) |
Convert data to a signal's enumeration (string) value.
| [in] | sh | A signal handle |
| [out] | buf | The buffer that will hold the enumeration string |
| [in] | buflen | The length of the buffer. |
| [in] | data | The data buffer to be converted |
| [in] | len | The length of the data buffer |
| KvaDbStatus kvaDbGetSignalValueFloat | ( | KvaDbSignalHnd | sh, |
| double * | f, | ||
| void * | data, | ||
| size_t | len | ||
| ) |
Convert data to a signal's physical (floating-point) value.
| [in] | sh | A signal handle |
| [out] | f | The converted value |
| [in] | data | The data buffer to be converted |
| [in] | len | The length of the data buffer |
| KvaDbStatus kvaDbGetSignalValueInteger | ( | KvaDbSignalHnd | sh, |
| int * | f, | ||
| void * | data, | ||
| size_t | len | ||
| ) |
Convert data to a signal's raw (integer) value.
| [in] | sh | A signal handle |
| [out] | f | The converted value |
| [in] | data | The data buffer to be converted |
| [in] | len | The length of the data buffer |
| KvaDbStatus kvaDbGetSignalValueLimits | ( | KvaDbSignalHnd | sh, |
| double * | minval, | ||
| double * | maxval | ||
| ) |
Get the minimum and maximum values from a signal.
| [in] | sh | A signal handle |
| [out] | minval | The minimum value |
| [out] | maxval | The maximum value |
| KvaDbStatus kvaDbGetSignalValueScaling | ( | KvaDbSignalHnd | sh, |
| double * | factor, | ||
| double * | offset | ||
| ) |
Get the scale factor and offset from a signal.
| [in] | sh | A signal handle |
| [out] | factor | The signal scale factor |
| [out] | offset | The signal offset |
| KvaDbStatus kvaDbGetSignalValueSize | ( | KvaDbSignalHnd | sh, |
| int * | startbit, | ||
| int * | length | ||
| ) |
Get the size and position of the signal value.
| [in] | sh | A signal handle |
| [out] | startbit | The bit where the signal value starts |
| [out] | length | The length of the signal value in bits |
| KvaDbStatus kvaDbMsgDlcToBytes | ( | KvaDbProtocolType | prot, |
| unsigned int | dlc, | ||
| unsigned int * | numBytes | ||
| ) |
Translates message dlc to number of bytes for a given protocol
| [in] | prot | A protocol type |
| [in] | dlc | Raw message dlc |
| [out] | numBytes | Number of bytes corresponding to dlc |
| KvaDbStatus kvaDbOpen | ( | KvaDbHnd * | dh | ) |
This function creates a new database handle.
| [out] | dh | A handle to a new database |
| KvaDbStatus kvaDbReadFile | ( | KvaDbHnd | dh, |
| char * | filename | ||
| ) |
Load a database from file into a handle created with kvaDbOpen().
| [out] | dh | A handle to a database |
| [in] | filename | The name of the database file. |
| KvaDbStatus kvaDbRemoveReceiveNodeFromSignal | ( | KvaDbSignalHnd | sh, |
| KvaDbNodeHnd | nh | ||
| ) |
Remove a receiving node from a signal.
| [in] | sh | A signal handle |
| [in] | nh | A node handle |
| KvaDbStatus kvaDbSetAttributeDefinitionEnumDefault | ( | KvaDbAttributeDefHnd | adh, |
| int | dValue | ||
| ) |
Set the default enumeration value of an attribute definition of enumeration type.
| [in] | adh | A handle to a attribute definition |
| [in] | dValue | The default value of the enumeration entry |
| KvaDbStatus kvaDbSetAttributeDefinitionFloat | ( | KvaDbAttributeDefHnd | adh, |
| float | def, | ||
| float | min, | ||
| float | max | ||
| ) |
Set max, min and default value of an attribute definition of floating point type.
| [in] | adh | A handle to a attribute definition |
| [in] | def | The default value |
| [in] | min | The minimum value |
| [in] | max | The maximum value |
| KvaDbStatus kvaDbSetAttributeDefinitionInt | ( | KvaDbAttributeDefHnd | adh, |
| int | def, | ||
| int | min, | ||
| int | max | ||
| ) |
Set max, min and default value of an attribute definition of integer type.
| [in] | adh | A handle to a attribute definition |
| [in] | def | The default value |
| [in] | min | The minimum value |
| [in] | max | The maximum value |
| KvaDbStatus kvaDbSetAttributeDefinitionName | ( | KvaDbAttributeDefHnd | adh, |
| const char * | adName | ||
| ) |
Set the name of an attribute definition.
| [in] | adh | A handle to a attribute definition |
| [in] | adName | The name of the attribute definition |
| KvaDbStatus kvaDbSetAttributeDefinitionOwner | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeOwner | adOwner | ||
| ) |
Set the owner of an attribute definition.
| [in] | adh | A handle to a attribute definition |
| [in] | adOwner | The owner of the attribute definition |
| KvaDbStatus kvaDbSetAttributeDefinitionString | ( | KvaDbAttributeDefHnd | adh, |
| const char * | buf | ||
| ) |
Set the default value of an attribute definition of string.
| [in] | adh | A handle to a attribute definition |
| [in] | buf | The default value |
| KvaDbStatus kvaDbSetAttributeDefinitionType | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeType | adType | ||
| ) |
Set the type of an attribute definition.
| [in] | adh | A handle to a attribute definition |
| [in] | adType | The type of the attribute definition |
| KvaDbStatus kvaDbSetAttributeValueEnumeration | ( | KvaDbAttributeHnd | ah, |
| int | val | ||
| ) |
Set the value for an attribute of type enumeration.
| [in] | ah | A handle to an attribute |
| [in] | val | The value to set |
| KvaDbStatus kvaDbSetAttributeValueFloat | ( | KvaDbAttributeHnd | ah, |
| float | val | ||
| ) |
Set the value for an attribute of type float.
| [in] | ah | A handle to an attribute |
| [in] | val | The value to set |
| KvaDbStatus kvaDbSetAttributeValueInt | ( | KvaDbAttributeHnd | ah, |
| int | val | ||
| ) |
Set the value for an attribute of type integer.
| [in] | ah | A handle to an attribute |
| [in] | val | The value to set |
| KvaDbStatus kvaDbSetAttributeValueString | ( | KvaDbAttributeHnd | ah, |
| const char * | buf, | ||
| int | buflen | ||
| ) |
Set the value for an attribute of type string.
| [in] | ah | A handle to an attribute |
| [in] | buf | The buffer that holds the attribute value |
| [in] | buflen | The length of the buffer. |
| 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.
| [in] | dh | A database handle |
| [in] | filename | The the dummy filename to use for this database |
| KvaDbStatus kvaDbSetFlags | ( | KvaDbHnd | dh, |
| unsigned int | flags | ||
| ) |
Set the database flags.
| [in] | dh | A database handle |
| [in] | flags | The flags to set, KVADB_MESSAGE_xxx |
| KvaDbStatus kvaDbSetMsgComment | ( | KvaDbMessageHnd | mh, |
| char * | buf | ||
| ) |
Set the message comment.
| [in] | mh | A message handle |
| [in] | buf | The buffer that contains the message comment |
| KvaDbStatus kvaDbSetMsgDlc | ( | KvaDbMessageHnd | mh, |
| int | dlc | ||
| ) |
Set the data length code for a message.
| [in] | mh | A message handle |
| [in] | dlc | The data length code |
| KvaDbStatus kvaDbSetMsgId | ( | KvaDbMessageHnd | mh, |
| unsigned int | id, | ||
| unsigned int | flags | ||
| ) |
Set the message identifier and flags.
| [in] | mh | A message handle |
| [in] | id | The message identifier |
| [in] | flags | The message flags, KVADB_MESSAGE_xxx |
| KvaDbStatus kvaDbSetMsgName | ( | KvaDbMessageHnd | mh, |
| char * | buf | ||
| ) |
Set the message name.
| [in] | mh | A message handle |
| [in] | buf | The buffer that contains the message name. |
| KvaDbStatus kvaDbSetMsgSendNode | ( | KvaDbMessageHnd | mh, |
| KvaDbNodeHnd | nh | ||
| ) |
Set send node for a message
| [in] | mh | A message handle |
| [in] | nh | A node handle |
| KvaDbStatus kvaDbSetNodeComment | ( | KvaDbNodeHnd | nh, |
| char * | buf | ||
| ) |
Set the node comment.
| [in] | nh | A node handle |
| [in] | buf | The buffer that contains the node comment |
| KvaDbStatus kvaDbSetNodeName | ( | KvaDbNodeHnd | nh, |
| char * | buf | ||
| ) |
Set the node name.
| [in] | nh | A node handle |
| [in] | buf | The buffer that contains the node name. |
| KvaDbStatus kvaDbSetProtocol | ( | KvaDbHnd | dh, |
| KvaDbProtocolType | prot | ||
| ) |
Writes the protocol attribute value of a database
| [in] | dh | A handle to a database |
| [in] | prot | Protocol type value, KvaDbProtocolType |
| KvaDbStatus kvaDbSetSignalComment | ( | KvaDbSignalHnd | sh, |
| char * | buf | ||
| ) |
Set the signal comment.
| [in] | sh | A signal handle |
| [in] | buf | The buffer that contains the signal comment |
| KvaDbStatus kvaDbSetSignalEncoding | ( | KvaDbSignalHnd | sh, |
| KvaDbSignalEncoding | e | ||
| ) |
Set the signal encoding.
| [in] | sh | A signal handle |
| [in] | e | The signal encoding, Intel or Motorola, KvaDbSignalEncoding |
| KvaDbStatus kvaDbSetSignalMode | ( | KvaDbSignalHnd | sh, |
| int | mux | ||
| ) |
Sets signal's multiplex mode. If value is equal to KVADB_MUX_SIGNAL, marks signal as a multiplexer.
| [in] | sh | A signal handle |
| [in] | mux | Signal's multiplex mode |
| KvaDbStatus kvaDbSetSignalName | ( | KvaDbSignalHnd | sh, |
| char * | buf | ||
| ) |
Set the signal name.
| [in] | sh | A signal handle |
| [in] | buf | The buffer that contains the signal name |
| KvaDbStatus kvaDbSetSignalRepresentationType | ( | KvaDbSignalHnd | sh, |
| KvaDbSignalType | t | ||
| ) |
Set the signal representation type.
| [in] | sh | A signal handle |
| [in] | t | The signal representation type, KvaDbSignalType |
| KvaDbStatus kvaDbSetSignalUnit | ( | KvaDbSignalHnd | sh, |
| char * | buf | ||
| ) |
Set the signal unit.
| [in] | sh | A signal handle |
| [in] | buf | The buffer that contains the unit for the signal |
| KvaDbStatus kvaDbSetSignalValueLimits | ( | KvaDbSignalHnd | sh, |
| double | minval, | ||
| double | maxval | ||
| ) |
Set the value limits for a signal.
| [in] | sh | A signal handle |
| [in] | minval | The minimum signal value |
| [in] | maxval | The maximum signal value |
| KvaDbStatus kvaDbSetSignalValueScaling | ( | KvaDbSignalHnd | sh, |
| double | factor, | ||
| double | offset | ||
| ) |
Set the scale factor and offset for a signal.
| [in] | sh | A signal handle |
| [in] | factor | The scale factor for the signal value |
| [in] | offset | The offset for the signal value |
| KvaDbStatus kvaDbSetSignalValueSize | ( | KvaDbSignalHnd | sh, |
| int | startbit, | ||
| int | length | ||
| ) |
Set the value position and size for a signal.
| [in] | sh | A signal handle |
| [in] | startbit | The starting bit of the signal's value |
| [in] | length | The length of the value in bits |
| KvaDbStatus kvaDbSignalContainsReceiveNode | ( | KvaDbSignalHnd | sh, |
| KvaDbNodeHnd | nh | ||
| ) |
Check if a signal contains a specific receiving node
| [in] | sh | A signal handle |
| [in] | nh | A node handle |
| KvaDbStatus kvaDbStoreSignalValuePhys | ( | KvaDbSignalHnd | sh, |
| unsigned char * | can_data, | ||
| int | dlc, | ||
| double | value | ||
| ) |
Convert a physical signal value to data bytes.
| [in] | sh | A signal handle |
| [out] | can_data | The buffer that will hold the converted value |
| [in] | dlc | The length of the data buffer |
| [in] | value | The physical signal value to convert |
| KvaDbStatus kvaDbStoreSignalValueRaw | ( | KvaDbSignalHnd | sh, |
| unsigned char * | can_data, | ||
| int | dlc, | ||
| int | value | ||
| ) |
Convert a raw signal value to data bytes.
| [in] | sh | A signal handle |
| [out] | can_data | The buffer that will hold the converted value |
| [in] | dlc | The length of the data buffer |
| [in] | value | The raw signal value to convert |
| KvaDbStatus kvaDbWriteFile | ( | KvaDbHnd | dh, |
| char * | filename | ||
| ) |
Write a database to file.
| [in] | dh | A handle to a database |
| [in] | filename | The name of the database file |