云海游戏(中国区)有限公司官网


  • Attributes

    Add, delete and modify attributes for messages, signals and nodes. More...

    Functions

    KvaDbStatus kvaDbGetNodeAttributeIntByName (KvaDbNodeHnd nh, const char *attrName, int *val)
     
    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 kvaDbDeleteAttributeDefinition (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 kvaDbDeleteAttributeDefinitionEnum (KvaDbAttributeDefHnd adh, const char *eName, int eValue)
     
    KvaDbStatus kvaDbGetAttributeDefinitionEnumValueByName (KvaDbAttributeDefHnd adh, const char *eName, int *eValue)
     
    KvaDbStatus kvaDbGetAttributeDefinitionEnumNameByValue (KvaDbAttributeDefHnd adh, int eValue, char *buf, size_t *buflen)
     
    KvaDbStatus kvaDbGetAttributeDefinitionEnumFirst (KvaDbAttributeDefHnd adh, int *eValue, char *eName, size_t *buflen)
     
    KvaDbStatus kvaDbGetAttributeDefinitionEnumNext (KvaDbAttributeDefHnd adh, int *eValue, char *eName, size_t *buflen)
     
    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 kvaDbAddAttribute (KvaDbHnd dh, KvaDbAttributeDefHnd adh, KvaDbAttributeHnd *ah)
     
    KvaDbStatus kvaDbDeleteMsgAttribute (KvaDbMessageHnd mh, KvaDbAttributeHnd ah)
     
    KvaDbStatus kvaDbDeleteAttribute (KvaDbHnd dh, KvaDbAttributeHnd ah)
     
    KvaDbStatus kvaDbAddSignalAttribute (KvaDbSignalHnd sh, KvaDbAttributeDefHnd adh, KvaDbAttributeHnd *ah)
     
    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 kvaDbGetAttributeByName (KvaDbHnd dh, 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 kvaDbGetFirstAttribute (KvaDbHnd dh, KvaDbAttributeHnd *nah)
     
    KvaDbStatus kvaDbGetNextAttribute (KvaDbAttributeHnd ah, KvaDbAttributeHnd *nah)
     
    KvaDbStatus kvaDbGetAttributeType (KvaDbAttributeHnd ah, KvaDbAttributeType *at)
     
    KvaDbStatus kvaDbGetAttributeName (KvaDbAttributeHnd ah, 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)
     

    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]dhA handle to a database
    [in]adhA handle to an attribute definition
    [out]ahAn 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]dhA handle to a database
    [out]adhA 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]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
    Examples:
    example/c/j1939_db.c.

    ◆ 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()

    ◆ 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()

    ◆ 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()

    ◆ kvaDbDeleteAttribute()

    KvaDbStatus kvaDbDeleteAttribute ( KvaDbHnd  dh,
    KvaDbAttributeHnd  ah 
    )

    Delete an attribute from a database.

    Parameters
    [in]dhA handle to a message
    [in]ahA 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]dhA handle to a database
    [in]adhA 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]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

    ◆ 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()

    ◆ 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()

    ◆ 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()

    ◆ kvaDbGetAttributeByName()

    KvaDbStatus kvaDbGetAttributeByName ( KvaDbHnd  dh,
    const char *  attrName,
    KvaDbAttributeHnd ah 
    )

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

    Parameters
    [in]dhA handle to a database
    [in]attrNameThe attribute name to search for
    [out]ahAn 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]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

    ◆ kvaDbGetAttributeDefinitionEnumeration()

    KvaDbStatus kvaDbGetAttributeDefinitionEnumeration ( KvaDbAttributeDefHnd  adh,
    int *  def 
    )

    Get default 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

    ◆ 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]adhA handle to a attribute definition
    [out]eValueThe value of the enumeration entry
    [out]eNameBuffer to receive enumeration name
    [in]buflenBuffer 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]adhA handle to a attribute definition
    [in]eValueThe value of the enumeration entry
    [out]bufBuffer to receive enumeration name
    [out]buflenBuffer 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]adhA handle to a attribute definition
    [out]eValueThe value of the enumeration entry
    [out]eNameBuffer to receive enumeration name
    [in]buflenBuffer 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]adhA handle to a attribute definition
    [in]eNameThe name of the enumeration entry
    [out]eValueThe 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]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

    ◆ 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]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

    ◆ 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]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()

    ◆ 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()

    ◆ 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]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

    ◆ 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()

    ◆ 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]ahA 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()

    ◆ 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()

    ◆ 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()

    ◆ 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()

    ◆ 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()

    ◆ 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]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()

    ◆ kvaDbGetFirstAttribute()

    KvaDbStatus kvaDbGetFirstAttribute ( KvaDbHnd  dh,
    KvaDbAttributeHnd nah 
    )

    Get a handle to the first attribute for a database

    Parameters
    [in]dhA handle to an database
    [out]nahAn 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]dhA handle to a database
    [out]adhFirst attribute definition handle
    Returns
    kvaDbOK (zero) if success
    kvaDbErr_xxx (negative) if failure
    See also
    kvaDbGetNextAttributeDefinition()

    ◆ 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()

    ◆ 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()

    ◆ 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 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

    ◆ 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
    kvaDbGetFirstAttribute()
    kvaDbGetFirstMsgAttribute()
    kvaDbGetFirstSignalAttribute()
    kvaDbGetFirstNodeAttribute()

    ◆ 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()

    ◆ 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

    ◆ 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]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()

    ◆ 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

    ◆ 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

    ◆ 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

    ◆ 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

    ◆ 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]adhA handle to a attribute definition
    [in]adNameThe 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]adhA handle to a attribute definition
    [in]adOwnerThe 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]adhA handle to a attribute definition
    [in]bufThe 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]adhA handle to a attribute definition
    [in]adTypeThe 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]ahA handle to an attribute
    [in]valThe value to set
    Returns
    kvaDbOK (zero) if success
    kvaDbErr_xxx (negative) if failure
    See also
    kvaDbGetAttributeValueEnumeration()

    ◆ 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()

    ◆ 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()

    ◆ 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()
    【网站地图】【sitemap】