Add, delete and modify attributes for messages, signals and nodes. More...
Detailed Description
Add, delete and modify attributes for messages, signals and nodes.
Function Documentation
kvaDbAddAttribute()
| KvaDbStatus kvaDbAddAttribute | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a database.
- Parameters
-
[in] dh A handle to a database [in] adh A handle to an attribute definition [out] ah An attribute handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbDeleteAttribute()
kvaDbAddAttributeDefinition()
| KvaDbStatus kvaDbAddAttributeDefinition | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Add a new attribute definition to a database.
- Parameters
-
[in] dh A handle to a database [out] adh A handle to a new attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Examples:
- example/c/j1939_db.c.
kvaDbAddAttributeDefinitionEnum()
| 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.
- Note
- In case eValue is out of order, i.e. exceeds maximum value by more than one, or was not started at zero, additional dummy entries with name "reserved" will be added to enumeration.
- Parameters
-
[in] adh A handle to a attribute definition [in] eName The name of the enumeration entry [in] eValue The value of the enumeration entry
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Examples:
- example/c/j1939_db.c.
kvaDbAddMsgAttribute()
| KvaDbStatus kvaDbAddMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a message.
- Parameters
-
[in] mh A handle to a message [in] adh A handle to an attribute definition [out] ah An attribute handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbDeleteMsgAttribute()
kvaDbAddNodeAttribute()
| KvaDbStatus kvaDbAddNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a node.
- Parameters
-
[in] nh A handle to a node [in] adh A handle to an attribute definition [out] ah An attribute handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbDeleteNodeAttribute()
kvaDbAddSignalAttribute()
| KvaDbStatus kvaDbAddSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeDefHnd | adh, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Add an attribute to a signal.
- Parameters
-
[in] sh A handle to a signal [in] adh A handle to an attribute definition [out] ah An attribute handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbDeleteSignalAttribute()
kvaDbDeleteAttribute()
| KvaDbStatus kvaDbDeleteAttribute | ( | KvaDbHnd | dh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a database.
- Parameters
-
[in] dh A handle to a message [in] ah A handle to an attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbAddAttribute()
kvaDbDeleteAttributeDefinition()
| KvaDbStatus kvaDbDeleteAttributeDefinition | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd | adh | ||
| ) |
Delete a database attribute definition.
- Note
- If there are attributes using the attribute definition adh, the call will fail and return kvaDbErr_InUse. Delete these attributes and the call will succeed.
- Parameters
-
[in] dh A handle to a database [in] adh A handle to a attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbDeleteAttributeDefinitionEnum()
| KvaDbStatus kvaDbDeleteAttributeDefinitionEnum | ( | KvaDbAttributeDefHnd | adh, |
| const char * | eName, | ||
| int | eValue | ||
| ) |
Deletes the first enumeration entry that matches eName and eValue.
- Parameters
-
[in] adh A handle to a attribute definition [in] eName The name of the enumeration entry [in] eValue The value of the enumeration entry
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbDeleteMsgAttribute()
| KvaDbStatus kvaDbDeleteMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a message.
- Parameters
-
[in] mh A handle to a message [in] ah A handle to an attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbAddMsgAttribute()
kvaDbDeleteNodeAttribute()
| KvaDbStatus kvaDbDeleteNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a node.
- Parameters
-
[in] nh A handle to a node [in] ah A handle to an attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbAddNodeAttribute()
kvaDbDeleteSignalAttribute()
| KvaDbStatus kvaDbDeleteSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeHnd | ah | ||
| ) |
Delete an attribute from a signal.
- Parameters
-
[in] sh A handle to a signal [in] ah A handle to an attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbAddSignalAttribute()
kvaDbGetAttributeByName()
| KvaDbStatus kvaDbGetAttributeByName | ( | KvaDbHnd | dh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a database.
- Parameters
-
[in] dh A handle to a database [in] attrName The attribute name to search for [out] ah An attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionByName()
| KvaDbStatus kvaDbGetAttributeDefinitionByName | ( | KvaDbHnd | dh, |
| const char * | attrName, | ||
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Get a handle to an attribute definition with specified name.
- Parameters
-
[in] dh A handle to a database [in] attrName The attribute name to search for [out] adh An attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionEnumeration()
| KvaDbStatus kvaDbGetAttributeDefinitionEnumeration | ( | KvaDbAttributeDefHnd | adh, |
| int * | def | ||
| ) |
Get default value for an attribute definition of type enumeration.
- Parameters
-
[in] adh A handle to an attribute definition [out] def The default value of the attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionEnumFirst()
| 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().
- Parameters
-
[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
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionEnumNameByValue()
| 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.
- Parameters
-
[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
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionEnumNext()
| KvaDbStatus kvaDbGetAttributeDefinitionEnumNext | ( | KvaDbAttributeDefHnd | adh, |
| int * | eValue, | ||
| char * | eName, | ||
| size_t * | buflen | ||
| ) |
- Note
- Shall be called after kvaDbGetAttributeDefinitionEnumFirst().
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.
- Parameters
-
[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
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionEnumValueByName()
| KvaDbStatus kvaDbGetAttributeDefinitionEnumValueByName | ( | KvaDbAttributeDefHnd | adh, |
| const char * | eName, | ||
| int * | eValue | ||
| ) |
Get value of an enumeration entry by its name in attribute definition.
- Note
- If there are several entries with same name, the minimum value of the entries with the name eName is returned.
- Parameters
-
[in] adh A handle to a attribute definition [in] eName The name of the enumeration entry [out] eValue The value of the enumeration entry
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionFloat()
| KvaDbStatus kvaDbGetAttributeDefinitionFloat | ( | KvaDbAttributeDefHnd | adh, |
| float * | def, | ||
| float * | min, | ||
| float * | max | ||
| ) |
Get limits and default value for an attribute definition of type float.
- Parameters
-
[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
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionInt()
| KvaDbStatus kvaDbGetAttributeDefinitionInt | ( | KvaDbAttributeDefHnd | adh, |
| int * | def, | ||
| int * | min, | ||
| int * | max | ||
| ) |
Get limits and default value for an attribute definition of type integer.
- Parameters
-
[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
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionName()
| 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.
- Parameters
-
[in] adh A handle to an attribute [out] buf The buffer that will hold the attribute name [in] buflen The length of the buffer.
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionOwner()
| KvaDbStatus kvaDbGetAttributeDefinitionOwner | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeOwner * | ao | ||
| ) |
Get the type for an attribute definition.
- Parameters
-
[in] adh A handle to an attribute definition [out] ao The owner of the attribute definition, kvadb_AttributeOwnerXXX
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionString()
| 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.
- Parameters
-
[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.
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeDefinitionType()
| KvaDbStatus kvaDbGetAttributeDefinitionType | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeType * | at | ||
| ) |
Get the type for an attribute definition.
- Parameters
-
[in] adh A handle to an attribute definition [out] at The type of the attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeName()
| 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.
- Parameters
-
[in] ah A handle to an attribute [out] buf The buffer that will hold the attribute name [in] buflen The length of the buffer.
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetAttributeType()
kvaDbGetAttributeType()
| KvaDbStatus kvaDbGetAttributeType | ( | KvaDbAttributeHnd | ah, |
| KvaDbAttributeType * | at | ||
| ) |
Get the type for an attribute.
- Parameters
-
[in] ah A handle to an attribute [out] at The type of the attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetAttributeName()
kvaDbGetAttributeValueEnumeration()
| KvaDbStatus kvaDbGetAttributeValueEnumeration | ( | KvaDbAttributeHnd | ah, |
| int * | val | ||
| ) |
Get the value for an attribute of type enumeration.
- Parameters
-
[in] ah A handle to an attribute [out] val The value of the attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetAttributeValueFloat()
| KvaDbStatus kvaDbGetAttributeValueFloat | ( | KvaDbAttributeHnd | ah, |
| float * | val | ||
| ) |
Get the value for an attribute of type float.
- Parameters
-
[in] ah A handle to an attribute [out] val The value of the attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbSetAttributeValueFloat()
kvaDbGetAttributeValueInt()
| KvaDbStatus kvaDbGetAttributeValueInt | ( | KvaDbAttributeHnd | ah, |
| int * | val | ||
| ) |
Get the value for an attribute of type integer.
- Parameters
-
[in] ah A handle to an attribute [out] val The value of the attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbSetAttributeValueInt()
kvaDbGetAttributeValueString()
| 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.
- Parameters
-
[in] ah A handle to an attribute [out] buf The buffer that holds the attribute value [out] buflen The length of the buffer.
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbSetAttributeValueString()
kvaDbGetFirstAttribute()
| KvaDbStatus kvaDbGetFirstAttribute | ( | KvaDbHnd | dh, |
| KvaDbAttributeHnd * | nah | ||
| ) |
Get a handle to the first attribute for a database
- Parameters
-
[in] dh A handle to an database [out] nah An attribute handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetFirstAttributeDefinition()
| KvaDbStatus kvaDbGetFirstAttributeDefinition | ( | KvaDbHnd | dh, |
| KvaDbAttributeDefHnd * | adh | ||
| ) |
Get a handle to the first attribute defined in the database.
- Parameters
-
[in] dh A handle to a database [out] adh First attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetFirstMsgAttribute()
| KvaDbStatus kvaDbGetFirstMsgAttribute | ( | KvaDbMessageHnd | mh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a message.
- Parameters
-
[in] mh A handle to a message [out] ah An attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetNextAttribute()
kvaDbGetFirstNodeAttribute()
| KvaDbStatus kvaDbGetFirstNodeAttribute | ( | KvaDbNodeHnd | nh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a node.
- Parameters
-
[in] nh A handle to a node [out] ah An attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetNextAttribute()
kvaDbGetFirstSignalAttribute()
| KvaDbStatus kvaDbGetFirstSignalAttribute | ( | KvaDbSignalHnd | sh, |
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to the first attribute for a signal.
- Parameters
-
[in] sh A handle to a signal [out] ah An attribute 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] mh A handle to a message [in] attrName The attribute name to search for [out] ah An 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] ah A handle to an attribute [out] nah An attribute 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] adh An existing handle to an attribute definition [out] nadh Handle to next attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetNodeAttributeByName()
| KvaDbStatus kvaDbGetNodeAttributeByName | ( | KvaDbNodeHnd | nh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a node.
- Parameters
-
[in] nh A handle to a node [in] attrName The attribute name to search for [out] ah An attribute definition handle
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbGetNodeAttributeIntByName()
| 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.
- Parameters
-
[in] nh A node handle [in] attrName The buffer that contains the attribute name [out] val The value of the attribute
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetFirstNode()
kvaDbGetSignalAttributeByName()
| KvaDbStatus kvaDbGetSignalAttributeByName | ( | KvaDbSignalHnd | sh, |
| const char * | attrName, | ||
| KvaDbAttributeHnd * | ah | ||
| ) |
Get a handle to an attribute with specified name for a signal.
- Parameters
-
[in] sh A handle to a signal [in] attrName The attribute name to search for [out] ah An attribute definition handle
- 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] adh A handle to a attribute definition [in] dValue The default value of the enumeration entry
- 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] adh A handle to a attribute definition [in] def The default value [in] min The minimum value [in] max The maximum value
- 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] adh A handle to a attribute definition [in] def The default value [in] min The minimum value [in] max The maximum value
- 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. It is not allowed to have several attribute definitions with same name.
- Parameters
-
[in] adh A handle to a attribute definition [in] adName The name of the attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Note
- Please note that allowed characters in identiers are digits, letters and "_" (underscore).
Identifiers shall also start with a letter or underscore.
- Examples:
- example/c/j1939_db.c.
kvaDbSetAttributeDefinitionOwner()
| KvaDbStatus kvaDbSetAttributeDefinitionOwner | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeOwner | adOwner | ||
| ) |
Set the owner of an attribute definition.
- Parameters
-
[in] adh A handle to a attribute definition [in] adOwner The owner of the attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Examples:
- example/c/j1939_db.c.
kvaDbSetAttributeDefinitionString()
| KvaDbStatus kvaDbSetAttributeDefinitionString | ( | KvaDbAttributeDefHnd | adh, |
| const char * | buf | ||
| ) |
Set the default value of an attribute definition of string.
- Parameters
-
[in] adh A handle to a attribute definition [in] buf The default value
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Examples:
- example/c/j1939_db.c.
kvaDbSetAttributeDefinitionType()
| KvaDbStatus kvaDbSetAttributeDefinitionType | ( | KvaDbAttributeDefHnd | adh, |
| KvaDbAttributeType | adType | ||
| ) |
Set the type of an attribute definition.
- Parameters
-
[in] adh A handle to a attribute definition [in] adType The type of the attribute definition
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- Examples:
- example/c/j1939_db.c.
kvaDbSetAttributeValueEnumeration()
| KvaDbStatus kvaDbSetAttributeValueEnumeration | ( | KvaDbAttributeHnd | ah, |
| int | val | ||
| ) |
Set the value for an attribute of type enumeration.
- Parameters
-
[in] ah A handle to an attribute [in] val The value to set
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
kvaDbSetAttributeValueFloat()
| KvaDbStatus kvaDbSetAttributeValueFloat | ( | KvaDbAttributeHnd | ah, |
| float | val | ||
| ) |
Set the value for an attribute of type float.
- Parameters
-
[in] ah A handle to an attribute [in] val The value to set
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetAttributeValueFloat()
kvaDbSetAttributeValueInt()
| KvaDbStatus kvaDbSetAttributeValueInt | ( | KvaDbAttributeHnd | ah, |
| int | val | ||
| ) |
Set the value for an attribute of type integer.
- Parameters
-
[in] ah A handle to an attribute [in] val The value to set
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetAttributeValueInt()
kvaDbSetAttributeValueString()
| KvaDbStatus kvaDbSetAttributeValueString | ( | KvaDbAttributeHnd | ah, |
| const char * | buf, | ||
| int | buflen | ||
| ) |
Set the value for an attribute of type string.
- Parameters
-
[in] ah A handle to an attribute [in] buf The buffer that holds the attribute value [in] buflen The length of the buffer.
- Returns
- kvaDbOK (zero) if success
- kvaDbErr_xxx (negative) if failure
- See also
- kvaDbGetAttributeValueString()