Snapdragon® Telematics Application Framework (TelAF) Interface Specification
le_cfg_common.h File Reference
#include "legato.h"

Go to the source code of this file.

Macros

#define IFGEN_LE_CFG_PROTOCOL_ID   "4db45ee4887ce0305738f97e9c15d721"
 
#define IFGEN_LE_CFG_MSG_SIZE   9239
 
#define LE_CFG_STR_LEN   511
 
#define LE_CFG_STR_LEN_BYTES   512
 
#define LE_CFG_BINARY_LEN   8704
 
#define LE_CFG_NAME_LEN   255
 
#define LE_CFG_NAME_LEN_BYTES   256
 

Typedefs

typedef struct le_cfg_Iterator * le_cfg_IteratorRef_t
 
typedef struct le_cfg_ChangeHandler * le_cfg_ChangeHandlerRef_t
 
typedef void(* le_cfg_ChangeHandlerFunc_t) (void *contextPtr)
 

Enumerations

enum  le_cfg_nodeType_t {
  LE_CFG_TYPE_EMPTY = 0, LE_CFG_TYPE_STRING = 1, LE_CFG_TYPE_BOOL = 2, LE_CFG_TYPE_INT = 3,
  LE_CFG_TYPE_FLOAT = 4, LE_CFG_TYPE_STEM = 5, LE_CFG_TYPE_DOESNT_EXIST = 6
}
 

Functions

LE_SHARED bool ifgen_le_cfg_HasLocalBinding (void)
 
LE_SHARED void ifgen_le_cfg_InitCommonData (void)
 
LE_SHARED void ifgen_le_cfg_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_le_cfg_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED le_cfg_IteratorRef_t ifgen_le_cfg_CreateReadTxn (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL basePath)
 
LE_SHARED le_cfg_IteratorRef_t ifgen_le_cfg_CreateWriteTxn (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL basePath)
 
LE_SHARED void ifgen_le_cfg_CommitTxn (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef)
 
LE_SHARED void ifgen_le_cfg_CancelTxn (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef)
 
LE_SHARED void ifgen_le_cfg_GoToNode (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL newPath)
 
LE_SHARED le_result_t ifgen_le_cfg_GoToParent (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef)
 
LE_SHARED le_result_t ifgen_le_cfg_GoToFirstChild (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef)
 
LE_SHARED le_result_t ifgen_le_cfg_GoToNextSibling (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef)
 
LE_SHARED le_result_t ifgen_le_cfg_GetPath (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *pathBuffer, size_t pathBufferSize)
 
LE_SHARED le_cfg_nodeType_t ifgen_le_cfg_GetNodeType (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
 
LE_SHARED le_result_t ifgen_le_cfg_GetNodeName (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *name, size_t nameSize)
 
LE_SHARED le_cfg_ChangeHandlerRef_t ifgen_le_cfg_AddChangeHandler (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL newPath, le_cfg_ChangeHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_le_cfg_RemoveChangeHandler (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_ChangeHandlerRef_t handlerRef)
 
LE_SHARED void ifgen_le_cfg_DeleteNode (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
 
LE_SHARED bool ifgen_le_cfg_IsEmpty (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
 
LE_SHARED void ifgen_le_cfg_SetEmpty (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
 
LE_SHARED bool ifgen_le_cfg_NodeExists (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
 
LE_SHARED le_result_t ifgen_le_cfg_GetString (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *value, size_t valueSize, const char *LE_NONNULL defaultValue)
 
LE_SHARED void ifgen_le_cfg_SetString (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, const char *LE_NONNULL value)
 
LE_SHARED le_result_t ifgen_le_cfg_GetBinary (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, uint8_t *valuePtr, size_t *valueSizePtr, const uint8_t *defaultValuePtr, size_t defaultValueSize)
 
LE_SHARED void ifgen_le_cfg_SetBinary (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, const uint8_t *valuePtr, size_t valueSize)
 
LE_SHARED int32_t ifgen_le_cfg_GetInt (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t defaultValue)
 
LE_SHARED void ifgen_le_cfg_SetInt (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t value)
 
LE_SHARED double ifgen_le_cfg_GetFloat (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, double defaultValue)
 
LE_SHARED void ifgen_le_cfg_SetFloat (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, double value)
 
LE_SHARED bool ifgen_le_cfg_GetBool (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool defaultValue)
 
LE_SHARED void ifgen_le_cfg_SetBool (le_msg_SessionRef_t _ifgen_sessionRef, le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool value)
 
LE_SHARED void ifgen_le_cfg_QuickDeleteNode (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path)
 
LE_SHARED void ifgen_le_cfg_QuickSetEmpty (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path)
 
LE_SHARED le_result_t ifgen_le_cfg_QuickGetString (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, char *value, size_t valueSize, const char *LE_NONNULL defaultValue)
 
LE_SHARED void ifgen_le_cfg_QuickSetString (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, const char *LE_NONNULL value)
 
LE_SHARED le_result_t ifgen_le_cfg_QuickGetBinary (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, uint8_t *valuePtr, size_t *valueSizePtr, const uint8_t *defaultValuePtr, size_t defaultValueSize)
 
LE_SHARED void ifgen_le_cfg_QuickSetBinary (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, const uint8_t *valuePtr, size_t valueSize)
 
LE_SHARED int32_t ifgen_le_cfg_QuickGetInt (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, int32_t defaultValue)
 
LE_SHARED void ifgen_le_cfg_QuickSetInt (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, int32_t value)
 
LE_SHARED double ifgen_le_cfg_QuickGetFloat (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, double defaultValue)
 
LE_SHARED void ifgen_le_cfg_QuickSetFloat (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, double value)
 
LE_SHARED bool ifgen_le_cfg_QuickGetBool (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, bool defaultValue)
 
LE_SHARED void ifgen_le_cfg_QuickSetBool (le_msg_SessionRef_t _ifgen_sessionRef, const char *LE_NONNULL path, bool value)
 

Macro Definition Documentation

◆ IFGEN_LE_CFG_PROTOCOL_ID

#define IFGEN_LE_CFG_PROTOCOL_ID   "4db45ee4887ce0305738f97e9c15d721"

◆ IFGEN_LE_CFG_MSG_SIZE

#define IFGEN_LE_CFG_MSG_SIZE   9239

◆ LE_CFG_STR_LEN

#define LE_CFG_STR_LEN   511

Length of the strings used by this API.

◆ LE_CFG_STR_LEN_BYTES

#define LE_CFG_STR_LEN_BYTES   512

Length of the strings used by this API, including the trailing NULL.

◆ LE_CFG_BINARY_LEN

#define LE_CFG_BINARY_LEN   8704

Length of the binary data used by this API.

◆ LE_CFG_NAME_LEN

#define LE_CFG_NAME_LEN   255

Allowed length of a node name.

◆ LE_CFG_NAME_LEN_BYTES

#define LE_CFG_NAME_LEN_BYTES   256

The node name length, including a trailing NULL.

Typedef Documentation

◆ le_cfg_IteratorRef_t

typedef struct le_cfg_Iterator* le_cfg_IteratorRef_t

Reference to a tree iterator object.

◆ le_cfg_ChangeHandlerRef_t

typedef struct le_cfg_ChangeHandler* le_cfg_ChangeHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_cfg_Change'

◆ le_cfg_ChangeHandlerFunc_t

typedef void(* le_cfg_ChangeHandlerFunc_t) (void *contextPtr)

Handler for node change notifications.

Enumeration Type Documentation

◆ le_cfg_nodeType_t

Identifies the data type of node.

Enumerator
LE_CFG_TYPE_EMPTY 

A node with no value.

LE_CFG_TYPE_STRING 

A string encoded as utf8.

LE_CFG_TYPE_BOOL 

Boolean value.

LE_CFG_TYPE_INT 

Signed 32-bit.

LE_CFG_TYPE_FLOAT 

64-bit floating point value.

LE_CFG_TYPE_STEM 

Non-leaf node, this node is the parent of other nodes.

LE_CFG_TYPE_DOESNT_EXIST 

Node doesn't exist.

Function Documentation

◆ ifgen_le_cfg_HasLocalBinding()

LE_SHARED bool ifgen_le_cfg_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_le_cfg_InitCommonData()

LE_SHARED void ifgen_le_cfg_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_le_cfg_CleanupCommonData()

LE_SHARED void ifgen_le_cfg_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_le_cfg_OpenSession()

LE_SHARED le_result_t ifgen_le_cfg_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_le_cfg_CreateReadTxn()

LE_SHARED le_cfg_IteratorRef_t ifgen_le_cfg_CreateReadTxn ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  basePath 
)

Create a read transaction and open a new iterator for traversing the config tree.

This action creates a read lock on the given tree, which will start a read-timeout. Once the read timeout expires, all active read iterators on that tree will be expired and their clients will be killed.

Note
A tree transaction is global to that tree; a long-held read transaction will block other user's write transactions from being committed.
Returns
This will return the newly created iterator reference.
Parameters
[in]basePathPath to the location to create the new iterator.

◆ ifgen_le_cfg_CreateWriteTxn()

LE_SHARED le_cfg_IteratorRef_t ifgen_le_cfg_CreateWriteTxn ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  basePath 
)

Create a write transaction and open a new iterator for both reading and writing.

This action creates a write transaction. If the app holds the iterator for longer than the configured write transaction timeout, the iterator will cancel the transaction. Other reads will fail to return data, and all writes will be thrown away.

Note
A tree transaction is global to that tree; a long-held write transaction will block other user's write transactions from being started. Other trees in the system won't be affected.
Returns
This will return a newly created iterator reference.
Parameters
[in]basePathPath to the location to create the new iterator.

◆ ifgen_le_cfg_CommitTxn()

LE_SHARED void ifgen_le_cfg_CommitTxn ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef 
)

Closes the write iterator and commits the write transaction. This updates the config tree with all of the writes that occurred within the iterator.

Note
This operation will also delete the iterator object.
Parameters
[in]iteratorRefIterator object to commit.

◆ ifgen_le_cfg_CancelTxn()

LE_SHARED void ifgen_le_cfg_CancelTxn ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef 
)

Closes and frees the given iterator object. If the iterator is a write iterator, the transaction will be canceled. If the iterator is a read iterator, the transaction will be closed. No data is written to the tree

Note
This operation will also delete the iterator object.
Parameters
[in]iteratorRefIterator object to close.

◆ ifgen_le_cfg_GoToNode()

LE_SHARED void ifgen_le_cfg_GoToNode ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  newPath 
)

Changes the location of iterator. The path passed can be an absolute or a relative path from the iterators current location.

The target node does not need to exist. Writing a value to a non-existent node will automatically create that node and any ancestor nodes (parent, parent's parent, etc.) that also don't exist.

Parameters
[in]iteratorRefIterator to move.
[in]newPathAbsolute or relative path from the current location.

◆ ifgen_le_cfg_GoToParent()

LE_SHARED le_result_t ifgen_le_cfg_GoToParent ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef 
)

Move the iterator to the parent of the current node (moves up the tree).

Returns
Return code will be one of the following values:
    - LE_OK        - Commit was completed successfully.
    - LE_NOT_FOUND - Current node is the root node: has no parent.
Parameters
[in]iteratorRefIterator to move.

◆ ifgen_le_cfg_GoToFirstChild()

LE_SHARED le_result_t ifgen_le_cfg_GoToFirstChild ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef 
)

Moves the iterator to the the first child of the node from the current location.

For read iterators without children, this function will fail. If the iterator is a write iterator, then a new node is automatically created. If this node or newly created children of this node are not written to, then this node will not persist even if the iterator is committed.

Returns
Return code will be one of the following values:
    - LE_OK        - Move was completed successfully.
    - LE_NOT_FOUND - The given node has no children.
Parameters
[in]iteratorRefIterator object to move.

◆ ifgen_le_cfg_GoToNextSibling()

LE_SHARED le_result_t ifgen_le_cfg_GoToNextSibling ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef 
)

Jumps the iterator to the next child node of the current node. Assuming the following tree:

baseNode
|
+childA
|
+valueA
|
+valueB

If the iterator is moved to the path, "/baseNode/childA/valueA". After the first GoToNextSibling the iterator will be pointing at valueB. A second call to GoToNextSibling will cause the function to return LE_NOT_FOUND.

Returns
Returns one of the following values:
    - LE_OK            - Commit was completed successfully.
    - LE_NOT_FOUND     - Iterator has reached the end of the current list of siblings.
                         Also returned if the the current node has no siblings.
Parameters
[in]iteratorRefIterator to iterate.

◆ ifgen_le_cfg_GetPath()

LE_SHARED le_result_t ifgen_le_cfg_GetPath ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
char *  pathBuffer,
size_t  pathBufferSize 
)

Get path to the node where the iterator is currently pointed.

Assuming the following tree:

baseNode
|
+childA
|
+valueA
|
+valueB

If the iterator was currently pointing at valueA, GetPath would return the following path:

/baseNode/childA/valueA

Optionally, a path to another node can be supplied to this function. So, if the iterator is again on valueA and the relative path ".." is supplied then this function will return the the path relative to the node given:

/baseNode/childA/
Returns
- LE_OK - The write was completed successfully.
  • LE_OVERFLOW - The supplied string buffer was not large enough to hold the value.
Parameters
[in]iteratorRefIterator to move.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[out]pathBufferAbsolute path to the iterator's current node.
[in]pathBufferSize

◆ ifgen_le_cfg_GetNodeType()

LE_SHARED le_cfg_nodeType_t ifgen_le_cfg_GetNodeType ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path 
)

Get the data type of node where the iterator is currently pointing.

Returns
le_cfg_nodeType_t value indicating the stored value.
Parameters
[in]iteratorRefIterator object to use to read from the tree.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.

◆ ifgen_le_cfg_GetNodeName()

LE_SHARED le_result_t ifgen_le_cfg_GetNodeName ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
char *  name,
size_t  nameSize 
)

Get the name of the node where the iterator is currently pointing.

Returns
- LE_OK Read was completed successfully.
  • LE_OVERFLOW Supplied string buffer was not large enough to hold the value.
Parameters
[in]iteratorRefIterator object to use to read from the tree.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[out]nameRead the name of the node object.
[in]nameSize

◆ ifgen_le_cfg_AddChangeHandler()

LE_SHARED le_cfg_ChangeHandlerRef_t ifgen_le_cfg_AddChangeHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  newPath,
le_cfg_ChangeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_cfg_Change'

This event provides information on changes to the given node object, or any of it's children, where a change could be either a read, write, create or delete operation.

Parameters
[in]newPathPath to the object to watch.
[in]handlerPtrHandler to receive change notification
[in]contextPtr

◆ ifgen_le_cfg_RemoveChangeHandler()

LE_SHARED void ifgen_le_cfg_RemoveChangeHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_ChangeHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'le_cfg_Change'

Parameters
[in]handlerRef

◆ ifgen_le_cfg_DeleteNode()

LE_SHARED void ifgen_le_cfg_DeleteNode ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path 
)

Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child nodes are also deleted.

If the path is empty, the iterator's current node is deleted.

This function is only valid during a write transaction.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.

◆ ifgen_le_cfg_IsEmpty()

LE_SHARED bool ifgen_le_cfg_IsEmpty ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path 
)

Check if the given node is empty. A node is also considered empty if it doesn't yet exist. A node is also considered empty if it has no value or is a stem with no children.

If the path is empty, the iterator's current node is queried for emptiness.

Valid for both read and write transactions.

Returns
A true if the node is considered empty, false if not.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.

◆ ifgen_le_cfg_SetEmpty()

LE_SHARED void ifgen_le_cfg_SetEmpty ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path 
)

Clears out the node's value. If the node doesn't exist it will be created, and have no value.

If the path is empty, the iterator's current node will be cleared. If the node is a stem then all children will be removed from the tree.

Only valid during a write transaction.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.

◆ ifgen_le_cfg_NodeExists()

LE_SHARED bool ifgen_le_cfg_NodeExists ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path 
)

Checks to see if a given node in the config tree exists.

Returns
True if the specified node exists in the tree. False if not.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.

◆ ifgen_le_cfg_GetString()

LE_SHARED le_result_t ifgen_le_cfg_GetString ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
char *  value,
size_t  valueSize,
const char *LE_NONNULL  defaultValue 
)

Reads a string value from the config tree. If the value isn't a string, or if the node is empty or doesn't exist, the default value will be returned.

Valid for both read and write transactions.

If the path is empty, the iterator's current node will be read.

Returns
- LE_OK - Read was completed successfully.
  • LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[out]valueBuffer to write the value into.
[in]valueSize
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_SetString()

LE_SHARED void ifgen_le_cfg_SetString ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
const char *LE_NONNULL  value 
)

Writes a string value to the config tree. Only valid during a write transaction.

If the path is empty, the iterator's current node will be set.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]valueValue to write.

◆ ifgen_le_cfg_GetBinary()

LE_SHARED le_result_t ifgen_le_cfg_GetBinary ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
uint8_t *  valuePtr,
size_t *  valueSizePtr,
const uint8_t *  defaultValuePtr,
size_t  defaultValueSize 
)

Read a binary data from the config tree. If the the node has a wrong type, is empty or doesn't exist, the default value will be returned.

Valid for both read and write transactions.

If the path is empty, the iterator's current node will be read.

Responds With:

This function will respond with one of the following values:

    - LE_OK             - Read was completed successfully.
    - LE_FORMAT_ERROR   - if data can't be decoded.
    - LE_OVERFLOW       - Supplied buffer was not large enough to hold the value.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[out]valuePtrBuffer to write the value into.
[in,out]valueSizePtr
[in]defaultValuePtrDefault value to use if the original can't be read.
[in]defaultValueSize

◆ ifgen_le_cfg_SetBinary()

LE_SHARED void ifgen_le_cfg_SetBinary ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
const uint8_t *  valuePtr,
size_t  valueSize 
)

Write a binary data to the config tree. Only valid during a write transaction.

If the path is empty, the iterator's current node will be set.

Note
Binary data cannot be written to the 'system' tree.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]valuePtrValue to write.
[in]valueSize

◆ ifgen_le_cfg_GetInt()

LE_SHARED int32_t ifgen_le_cfg_GetInt ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
int32_t  defaultValue 
)

Reads a signed integer value from the config tree.

If the underlying value is not an integer, the default value will be returned instead. The default value is also returned if the node does not exist or if it's empty.

If the value is a floating point value, then it will be rounded and returned as an integer.

Valid for both read and write transactions.

If the path is empty, the iterator's current node will be read.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_SetInt()

LE_SHARED void ifgen_le_cfg_SetInt ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
int32_t  value 
)

Writes a signed integer value to the config tree. Only valid during a write transaction.

If the path is empty, the iterator's current node will be set.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]valueValue to write.

◆ ifgen_le_cfg_GetFloat()

LE_SHARED double ifgen_le_cfg_GetFloat ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
double  defaultValue 
)

Reads a 64-bit floating point value from the config tree.

If the value is an integer then the value will be promoted to a float. Otherwise, if the underlying value is not a float or integer, the default value will be returned.

If the path is empty, the iterator's current node will be read.

Note
Floating point values will only be stored up to 6 digits of precision.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_SetFloat()

LE_SHARED void ifgen_le_cfg_SetFloat ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
double  value 
)

Writes a 64-bit floating point value to the config tree. Only valid during a write transaction.

If the path is empty, the iterator's current node will be set.

Note
Floating point values will only be stored up to 6 digits of precision.
Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]valueValue to write.

◆ ifgen_le_cfg_GetBool()

LE_SHARED bool ifgen_le_cfg_GetBool ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
bool  defaultValue 
)

Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default value is returned. Default value is also returned if the node is a different type than expected.

Valid for both read and write transactions.

If the path is empty, the iterator's current node will be read.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_SetBool()

LE_SHARED void ifgen_le_cfg_SetBool ( le_msg_SessionRef_t  _ifgen_sessionRef,
le_cfg_IteratorRef_t  iteratorRef,
const char *LE_NONNULL  path,
bool  value 
)

Writes a boolean value to the config tree. Only valid during a write transaction.

If the path is empty, the iterator's current node will be set.

Parameters
[in]iteratorRefIterator to use as a basis for the transaction.
[in]pathPath to the target node. Can be an absolute path, or a path relative from the iterator's current position.
[in]valueValue to write.

◆ ifgen_le_cfg_QuickDeleteNode()

LE_SHARED void ifgen_le_cfg_QuickDeleteNode ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path 
)

Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child nodes are also deleted.

Parameters
[in]pathPath to the node to delete.

◆ ifgen_le_cfg_QuickSetEmpty()

LE_SHARED void ifgen_le_cfg_QuickSetEmpty ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path 
)

Clears the current value of a node. If the node doesn't currently exist then it is created as a new empty node.

Parameters
[in]pathAbsolute or relative path to read from.

◆ ifgen_le_cfg_QuickGetString()

LE_SHARED le_result_t ifgen_le_cfg_QuickGetString ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
char *  value,
size_t  valueSize,
const char *LE_NONNULL  defaultValue 
)

Reads a string value from the config tree. If the value isn't a string, or if the node is empty or doesn't exist, the default value will be returned.

Returns
- LE_OK - Commit was completed successfully.
  • LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
Parameters
[in]pathPath to read from.
[out]valueValue read from the requested node.
[in]valueSize
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_QuickSetString()

LE_SHARED void ifgen_le_cfg_QuickSetString ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
const char *LE_NONNULL  value 
)

Writes a string value to the config tree.

Parameters
[in]pathPath to the value to write.
[in]valueValue to write.

◆ ifgen_le_cfg_QuickGetBinary()

LE_SHARED le_result_t ifgen_le_cfg_QuickGetBinary ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
uint8_t *  valuePtr,
size_t *  valueSizePtr,
const uint8_t *  defaultValuePtr,
size_t  defaultValueSize 
)

Reads a binary data from the config tree. If the node type is different, or if the node is empty or doesn't exist, the default value will be returned.

Returns
- LE_OK - Commit was completed successfully.
  • LE_FORMAT_ERROR - if data can't be decoded.
  • LE_OVERFLOW - Supplied buffer was not large enough to hold the value.
Parameters
[in]pathPath to the target node.
[out]valuePtrBuffer to write the value into.
[in,out]valueSizePtr
[in]defaultValuePtrDefault value to use if the original can't be read.
[in]defaultValueSize

◆ ifgen_le_cfg_QuickSetBinary()

LE_SHARED void ifgen_le_cfg_QuickSetBinary ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
const uint8_t *  valuePtr,
size_t  valueSize 
)

Writes a binary data to the config tree.

Parameters
[in]pathPath to the target node.
[in]valuePtrValue to write.
[in]valueSize

◆ ifgen_le_cfg_QuickGetInt()

LE_SHARED int32_t ifgen_le_cfg_QuickGetInt ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
int32_t  defaultValue 
)

Reads a signed integer value from the config tree. If the value is a floating point value, then it will be rounded and returned as an integer. Otherwise If the underlying value is not an integer or a float, the default value will be returned instead.

If the value is empty or the node doesn't exist, the default value is returned instead.

Parameters
[in]pathPath to the value to write.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_QuickSetInt()

LE_SHARED void ifgen_le_cfg_QuickSetInt ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
int32_t  value 
)

Writes a signed integer value to the config tree.

Parameters
[in]pathPath to the value to write.
[in]valueValue to write.

◆ ifgen_le_cfg_QuickGetFloat()

LE_SHARED double ifgen_le_cfg_QuickGetFloat ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
double  defaultValue 
)

Reads a 64-bit floating point value from the config tree. If the value is an integer, then it is promoted to a float. Otherwise, if the underlying value is not a float, or an integer the default value will be returned.

If the value is empty or the node doesn't exist, the default value is returned.

Note
Floating point values will only be stored up to 6 digits of precision.
Parameters
[in]pathPath to the value to write.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_QuickSetFloat()

LE_SHARED void ifgen_le_cfg_QuickSetFloat ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
double  value 
)

Writes a 64-bit floating point value to the config tree.

Note
Floating point values will only be stored up to 6 digits of precision.
Parameters
[in]pathPath to the value to write.
[in]valueValue to write.

◆ ifgen_le_cfg_QuickGetBool()

LE_SHARED bool ifgen_le_cfg_QuickGetBool ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
bool  defaultValue 
)

Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default value is returned. This is also true if the node is a different type than expected.

If the value is empty or the node doesn't exist, the default value is returned instead.

Parameters
[in]pathPath to the value to write.
[in]defaultValueDefault value to use if the original can't be read.

◆ ifgen_le_cfg_QuickSetBool()

LE_SHARED void ifgen_le_cfg_QuickSetBool ( le_msg_SessionRef_t  _ifgen_sessionRef,
const char *LE_NONNULL  path,
bool  value 
)

Writes a boolean value to the config tree.

Parameters
[in]pathPath to the value to write.
[in]valueValue to write.