Add, delete and modify attributes for messages, signals and nodes. More...
Add, delete and modify attributes for messages, signals and nodes.
KvaDbStatus kvaDbAddAttribute | ( | KvaDbHnd | dh, |
KvaDbAttributeDefHnd | adh, | ||
KvaDbAttributeHnd * | ah | ||
) |
Add an attribute to a database.
[in] | dh | A handle to a database |
[in] | adh | A handle to an attribute definition |
[out] | ah | An attribute handle |
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. If enumeration entry with specified value already exists, it will be overwritten. Enumeration entries assume to start with value zero, which is then incremented by one for consequent entries.
[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 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 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 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 kvaDbDeleteAttribute | ( | KvaDbHnd | dh, |
KvaDbAttributeHnd | ah | ||
) |
Delete an attribute from a database.
[in] | dh | A handle to a message |
[in] | ah | A handle to an attribute |
KvaDbStatus kvaDbDeleteAttributeDefinition | ( | KvaDbHnd | dh, |
KvaDbAttributeDefHnd | adh | ||
) |
Delete a database attribute definition.
[in] | dh | A handle to a database |
[in] | adh | A handle to a attribute definition |
KvaDbStatus kvaDbDeleteAttributeDefinitionEnum | ( | KvaDbAttributeDefHnd | adh, |
const char * | eName, | ||
int | eValue | ||
) |
Deletes the first enumeration entry that matches eName and eValue.
[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 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 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 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 kvaDbGetAttributeByName | ( | KvaDbHnd | dh, |
const char * | attrName, | ||
KvaDbAttributeHnd * | ah | ||
) |
Get a handle to an attribute with specified name for a database.
[in] | dh | A handle to a database |
[in] | attrName | The attribute name to search for |
[out] | ah | An attribute definition handle |
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 default 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 kvaDbGetAttributeDefinitionEnumFirst | ( | KvaDbAttributeDefHnd | adh, |
int * | eValue, | ||
char * | eName, | ||
size_t * | buflen | ||
) |
Get name and value for the first enumeration entry for this handle. Name is written to a buffer provided by user. If buffer size is insufficient to fit enumeration name, buffer size parameter will contain required buffer size.
To get the next enumeration entry vall kvaDbGetAttributeDefinitionEnumNext().
[in] | adh | A handle to a attribute definition |
[out] | eValue | The value of the enumeration entry |
[out] | eName | Buffer to receive enumeration name |
[in] | buflen | Buffer size in bytes |
KvaDbStatus kvaDbGetAttributeDefinitionEnumNameByValue | ( | KvaDbAttributeDefHnd | adh, |
int | eValue, | ||
char * | buf, | ||
size_t * | buflen | ||
) |
Get name of an enumeration entry by its value in attribute definition. Name is written to a buffer provided by user. If buffer size is insufficient to fit enumeration name, buffer size parameter will contain required buffer size.
[in] | adh | A handle to a attribute definition |
[in] | eValue | The value of the enumeration entry |
[out] | buf | Buffer to receive enumeration name |
[out] | buflen | Buffer size in bytes |
KvaDbStatus kvaDbGetAttributeDefinitionEnumNext | ( | KvaDbAttributeDefHnd | adh, |
int * | eValue, | ||
char * | eName, | ||
size_t * | buflen | ||
) |
Get name and value for the next enumeration entry for this handle. Name is written to a buffer provided by user. If buffer size is insufficient to fit enumeration name, buffer size parameter will contain required buffer size.
[in] | adh | A handle to a attribute definition |
[out] | eValue | The value of the enumeration entry |
[out] | eName | Buffer to receive enumeration name |
[in] | buflen | Buffer size in bytes |
KvaDbStatus kvaDbGetAttributeDefinitionEnumValueByName | ( | KvaDbAttributeDefHnd | adh, |
const char * | eName, | ||
int * | eValue | ||
) |
Get value of an enumeration entry by its name in attribute definition.
[in] | adh | A handle to a attribute definition |
[in] | eName | The name of the enumeration entry |
[out] | eValue | The value of the enumeration entry |
KvaDbStatus kvaDbGetAttributeDefinitionFloat | ( | KvaDbAttributeDefHnd | adh, |
float * | def, | ||
float * | min, | ||
float * | max | ||
) |
Get limits and default value 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 limits and default value 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 of an attribute definition as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[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 default value for an attribute definition of type string as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[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 | ah, |
char * | buf, | ||
size_t | buflen | ||
) |
Get the name of an attribute as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[in] | ah | 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 as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.
[in] | ah | A handle to an attribute |
[out] | buf | The buffer that holds the attribute value |
[out] | buflen | The length of the buffer. |
KvaDbStatus kvaDbGetFirstAttribute | ( | KvaDbHnd | dh, |
KvaDbAttributeHnd * | nah | ||
) |
Get a handle to the first attribute for a database
[in] | dh | A handle to an database |
[out] | nah | An attribute handle |
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 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 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 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 handle |
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 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 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. This call is deprecated, it is equivalent to sequence of kvaDbGetNodeAttributeByName() and kvaDbGetAttributeValueInt(), which should be used instead.
[in] | nh | A node handle |
[in] | attrName | The buffer that contains the attribute name |
[out] | val | The value of the attribute |
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 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. It is not allowed to have several attribute definitions with same name.
[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. |