Add, delete and modify nodes. More...

Functions

KvaDbStatus kvaDbGetFirstNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbGetNextNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbGetNodeByName (KvaDbHnd dh, const char *node_name, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbAddNode (KvaDbHnd dh, KvaDbNodeHnd *nh)
 
KvaDbStatus kvaDbDeleteNode (KvaDbHnd dh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbSetNodeName (KvaDbNodeHnd nh, char *buf)
 
KvaDbStatus kvaDbGetNodeName (KvaDbNodeHnd nh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbSetNodeComment (KvaDbNodeHnd nh, char *buf)
 
KvaDbStatus kvaDbGetNodeComment (KvaDbNodeHnd nh, char *buf, size_t buflen)
 
KvaDbStatus kvaDbAddReceiveNodeToSignal (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbRemoveReceiveNodeFromSignal (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 
KvaDbStatus kvaDbSignalContainsReceiveNode (KvaDbSignalHnd sh, KvaDbNodeHnd nh)
 

Detailed Description

Add, delete and modify nodes.

Function Documentation

kvaDbAddNode()

KvaDbStatus kvaDbAddNode ( KvaDbHnd  dh,
KvaDbNodeHnd *  nh 
)

Add a new node to a database.

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

kvaDbAddReceiveNodeToSignal()

KvaDbStatus kvaDbAddReceiveNodeToSignal ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Add a receiving node to a signal.

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

kvaDbDeleteNode()

KvaDbStatus kvaDbDeleteNode ( KvaDbHnd  dh,
KvaDbNodeHnd  nh 
)

Delete a node from a database.

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

kvaDbGetFirstNode()

KvaDbStatus kvaDbGetFirstNode ( KvaDbHnd  dh,
KvaDbNodeHnd *  nh 
)

Get the first node.

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

kvaDbGetNextNode()

KvaDbStatus kvaDbGetNextNode ( KvaDbHnd  dh,
KvaDbNodeHnd *  nh 
)

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

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

kvaDbGetNodeByName()

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

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

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

kvaDbGetNodeComment()

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

Get the comment for a node as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.

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

kvaDbGetNodeName()

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

Get the name of a node as a null-terminated string. A truncated string will be returned if buf is too small and status will be kvaDbOK.

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

kvaDbRemoveReceiveNodeFromSignal()

KvaDbStatus kvaDbRemoveReceiveNodeFromSignal ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Remove a receiving node from a signal.

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

kvaDbSetNodeComment()

KvaDbStatus kvaDbSetNodeComment ( KvaDbNodeHnd  nh,
char *  buf 
)

Set the node comment.

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

kvaDbSetNodeName()

KvaDbStatus kvaDbSetNodeName ( KvaDbNodeHnd  nh,
char *  buf 
)

Set the node name.

Parameters
[in]nhA node handle
[in]bufThe buffer that contains the node name.
Returns
kvaDbOK (zero) if success
kvaDbErr_xxx (negative) if failure
Note
Please note that allowed characters in identiers are digits, letters and "_" (underscore).
Identifiers shall also start with a letter or underscore.

kvaDbSignalContainsReceiveNode()

KvaDbStatus kvaDbSignalContainsReceiveNode ( KvaDbSignalHnd  sh,
KvaDbNodeHnd  nh 
)

Check if a signal contains a specific receiving node

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