Read Access¶
The following functions allow to retrieve actual item values from the tree:
Some functions retrieve item meta information, reveilling hidden information proprietary JSON extensions or general structure information.
GetBinary¶
-
template<typename T>
static inline void Ensenso::sealed::GetBinary(int result, String itemPath, array<T> destinationBuffer, int bytesCopied, double timestamp)¶ Wraps nxLibGetBinary()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
destinationBuffer – A pointer to the memory, where the item content should be copied.
bytesCopied – Pointer to an integer, can be 0. If non-zero the value will be set to the number of bytes actually copied to the user’s buffer.
timestamp – The timestamp of the binary blob copied to the buffer.
GetBinaryInfo¶
-
static inline void Ensenso::sealed::GetBinaryInfo(int result, String itemPath, int width, int height, int channelCount, int bytesPerElement, bool isFloat, double timestamp)¶
Wraps nxLibGetBinaryInfo()
Note
The entire size of the binary blob is width*height*channelCount*bytesPerElement. A 24bit RGB image of VGA resolution would have width == 640, height == 480, channelCount == 3, bytesPerElement == 1 and isFloat == NXLIBFALSE.
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
width – The width of the array (consecutive elements in memory).
height – The height of the array (number of rows of width*channelCount elements)
channelCount – Number of channels for a single item.
bytesPerElement – Size in bytes of a single value of an item.
isFloat – Specifies whether the element data type is a floating point type.
timestamp – The current timestamp of the binary blob queried.
GetBool¶
-
static inline bool Ensenso::sealed::GetBool(int result, String itemPath)¶
Wraps nxLibGetBool()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The boolean value of the item.
GetCount¶
-
static inline int Ensenso::sealed::GetCount(int result, String itemPath)¶
Wraps nxLibGetCount()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The amount of subitems.
GetDouble¶
-
static inline double Ensenso::sealed::GetDouble(int result, String itemPath)¶
Wraps nxLibGetDouble()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The double value of the item.
GetInt¶
-
static inline int Ensenso::sealed::GetInt(int result, String itemPath)¶
Wraps nxLibGetInt()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The integer value of the item.
GetJson¶
-
static inline String Ensenso::sealed::GetJson(int result, String itemPath, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)¶
Wraps nxLibGetJson()
- Parameters
result – The error code oder operation.
itemPath – The path of the item to access.
prettyPrint – When true the JSON string will be formatted with line breaks and tabs.
numberPrecision – Specifies the accuracy of numbers.
scientificNumberFormat – Specifies if the scientific exponential notation should be used.
- Returns
A String formatted as Json.
GetJsonMeta¶
-
static inline String Ensenso::sealed::GetJsonMeta(int result, String itemPath, int numLevels, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)¶
Wraps nxLibGetJsonMeta()
- Parameters
result – The error code of operation.
itemPath – The path of th item to access.
numLevels – The depth of the returned subtree. Nodes in lower levels will be omitted.
prettyPrint – Specify true here to format the resulting string with line breaks and tabs.
numberPrecision – Specifies the accuracy of numbers.
scientificNumberFormat – Specifies whether to use scientific notation for all numbers.
- Returns
A String formatted as Json with meta information.
GetName¶
-
static inline String Ensenso::sealed::GetName(int result, String itemPath)¶
Wraps nxLibGetName()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The name of the item.
GetString¶
-
static inline String Ensenso::sealed::GetString(int result, String itemPath)¶
Wraps nxLibGetString()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The string value of the item.
GetType¶
-
static inline int Ensenso::sealed::GetType(int result, String itemPath)¶
Wraps nxLibGetType()
- Parameters
result – The error code of operation.
itemPath – The path of the item to access.
- Returns
The enum value of the item type.